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
func WithSample ¶
func WithSample(f func(c *gin.Context) trace.Sampler) TraceOption
type TraceOptions ¶
type TraceOptions struct { // DefaultAttributes will be set to each span as default. DefaultAttributes []trace.Attribute // IsPublicEndpoint should be set to true for publicly accessible HTTP(S) // servers. If true, any trace metadata set on the incoming request will // be added as a linked trace instead of being added as a parent of the // current trace. IsPublicEndpoint bool // Sample is applied to the span started by this Handler around each // request. default is 0.0001 Sample func(c *gin.Context) trace.Sampler }
Click to show internal directories.
Click to hide internal directories.