ocgin

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerFunc

func HandlerFunc(opts ...TraceOption) gin.HandlerFunc

Types

type TraceOption

type TraceOption func(o *TraceOptions)

func WithDefaultAttributes

func WithDefaultAttributes(attrs ...trace.Attribute) TraceOption

WithDefaultAttributes will be set to each span as default.

func WithPublicEndpoint

func WithPublicEndpoint(isPublic bool) TraceOption

WithPublicEndpoint receive true when server is public

func WithSample

func WithSample(f func(c *gin.Context) trace.Sampler) TraceOption

WithSample receive a function with gin.Context to decide sample with each request

type TraceOptions

type TraceOptions struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL