Documentation ¶
Index ¶
- func GetCachedAttrs() []attribute.KeyValue
- func PutCachedAttrs(attrs []attribute.KeyValue)
- type AlwaysClientExtractor
- type AlwaysConsumerExtractor
- type AlwaysInternalExtractor
- type AlwaysProducerExtractor
- type AlwaysServerExtractor
- type AttributesExtractor
- type AttrsShadower
- type Builder
- func (b *Builder[REQUEST, RESPONSE]) AddAttributesExtractor(attributesExtractor ...AttributesExtractor[REQUEST, RESPONSE]) *Builder[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) AddContextCustomizers(contextCustomizers ...ContextCustomizer[REQUEST]) *Builder[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) AddOperationListeners(operationListener ...OperationListener) *Builder[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) BuildInstrumenter() *InternalInstrumenter[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) BuildPropagatingFromUpstreamInstrumenter(carrierGetter func(REQUEST) propagation.TextMapCarrier, ...) *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) BuildPropagatingToDownstreamInstrumenter(carrierGetter func(REQUEST) propagation.TextMapCarrier, ...) *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) Init() *Builder[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) SetInstrumentEnabler(enabler InstrumentEnabler) *Builder[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) SetInstrumentationScope(scope instrumentation.Scope) *Builder[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) SetSpanKindExtractor(spanKindExtractor SpanKindExtractor[REQUEST]) *Builder[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) SetSpanNameExtractor(spanNameExtractor SpanNameExtractor[REQUEST]) *Builder[REQUEST, RESPONSE]
- func (b *Builder[REQUEST, RESPONSE]) SetSpanStatusExtractor(spanStatusExtractor SpanStatusExtractor[REQUEST, RESPONSE]) *Builder[REQUEST, RESPONSE]
- type ContextCustomizer
- type InstrumentEnabler
- type Instrumenter
- type InternalInstrumenter
- func (i *InternalInstrumenter[REQUEST, RESPONSE]) End(ctx context.Context, request REQUEST, response RESPONSE, err error, ...)
- func (i *InternalInstrumenter[REQUEST, RESPONSE]) ShouldStart(parentContext context.Context, request REQUEST) bool
- func (i *InternalInstrumenter[REQUEST, RESPONSE]) Start(parentContext context.Context, request REQUEST, ...) context.Context
- func (i *InternalInstrumenter[REQUEST, RESPONSE]) StartAndEnd(parentContext context.Context, request REQUEST, response RESPONSE, err error, ...)
- func (i *InternalInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions(parentContext context.Context, request REQUEST, response RESPONSE, err error, ...)
- type NoneStrategy
- type NoopAttrsShadower
- type NoopSpanSuppressor
- type OperationListener
- type PropagatingFromUpstreamInstrumenter
- func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) End(ctx context.Context, request REQUEST, response RESPONSE, err error, ...)
- func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) ShouldStart(parentContext context.Context, request REQUEST) bool
- func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) Start(parentContext context.Context, request REQUEST, ...) context.Context
- func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) StartAndEnd(parentContext context.Context, request REQUEST, response RESPONSE, err error, ...)
- func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions(parentContext context.Context, request REQUEST, response RESPONSE, err error, ...)
- type PropagatingToDownstreamInstrumenter
- func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) End(ctx context.Context, request REQUEST, response RESPONSE, err error, ...)
- func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) ShouldStart(parentContext context.Context, request REQUEST) bool
- func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) Start(parentContext context.Context, request REQUEST, ...) context.Context
- func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) StartAndEnd(parentContext context.Context, request REQUEST, response RESPONSE, err error, ...)
- func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions(parentContext context.Context, request REQUEST, response RESPONSE, err error, ...)
- type SemConvStrategy
- type SpanKeyProvider
- type SpanKeySuppressor
- type SpanKindExtractor
- type SpanKindStrategy
- type SpanKindSuppressor
- type SpanNameExtractor
- type SpanStatusExtractor
- type SpanSuppressor
- type SpanSuppressorStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCachedAttrs ¶ added in v0.4.0
func PutCachedAttrs ¶ added in v0.4.0
Types ¶
type AlwaysClientExtractor ¶
type AlwaysClientExtractor[REQUEST any] struct { }
type AlwaysConsumerExtractor ¶
type AlwaysConsumerExtractor[REQUEST any] struct { }
type AlwaysInternalExtractor ¶
type AlwaysInternalExtractor[REQUEST any] struct { }
type AlwaysProducerExtractor ¶
type AlwaysProducerExtractor[REQUEST any] struct { }
type AlwaysServerExtractor ¶
type AlwaysServerExtractor[REQUEST any] struct { }
type AttributesExtractor ¶
type AttributesExtractor[REQUEST any, RESPONSE any] interface { OnStart(attributes []attribute.KeyValue, parentContext context.Context, request REQUEST) ([]attribute.KeyValue, context.Context) OnEnd(attributes []attribute.KeyValue, ctx context.Context, request REQUEST, response RESPONSE, err error) ([]attribute.KeyValue, context.Context) }
type AttrsShadower ¶
type Builder ¶
type Builder[REQUEST any, RESPONSE any] struct { Enabler InstrumentEnabler SpanNameExtractor SpanNameExtractor[REQUEST] SpanKindExtractor SpanKindExtractor[REQUEST] SpanStatusExtractor SpanStatusExtractor[REQUEST, RESPONSE] AttributesExtractors []AttributesExtractor[REQUEST, RESPONSE] OperationListeners []OperationListener ContextCustomizers []ContextCustomizer[REQUEST] SpanSuppressor SpanSuppressor InstVersion string Scope instrumentation.Scope }
func (*Builder[REQUEST, RESPONSE]) AddAttributesExtractor ¶
func (b *Builder[REQUEST, RESPONSE]) AddAttributesExtractor(attributesExtractor ...AttributesExtractor[REQUEST, RESPONSE]) *Builder[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) AddContextCustomizers ¶
func (b *Builder[REQUEST, RESPONSE]) AddContextCustomizers(contextCustomizers ...ContextCustomizer[REQUEST]) *Builder[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) AddOperationListeners ¶
func (b *Builder[REQUEST, RESPONSE]) AddOperationListeners(operationListener ...OperationListener) *Builder[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) BuildInstrumenter ¶
func (b *Builder[REQUEST, RESPONSE]) BuildInstrumenter() *InternalInstrumenter[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) BuildPropagatingFromUpstreamInstrumenter ¶
func (b *Builder[REQUEST, RESPONSE]) BuildPropagatingFromUpstreamInstrumenter(carrierGetter func(REQUEST) propagation.TextMapCarrier, prop propagation.TextMapPropagator) *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) BuildPropagatingToDownstreamInstrumenter ¶
func (b *Builder[REQUEST, RESPONSE]) BuildPropagatingToDownstreamInstrumenter(carrierGetter func(REQUEST) propagation.TextMapCarrier, prop propagation.TextMapPropagator) *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) SetInstrumentEnabler ¶
func (b *Builder[REQUEST, RESPONSE]) SetInstrumentEnabler(enabler InstrumentEnabler) *Builder[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) SetInstrumentationScope ¶ added in v0.4.0
func (b *Builder[REQUEST, RESPONSE]) SetInstrumentationScope(scope instrumentation.Scope) *Builder[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) SetSpanKindExtractor ¶
func (b *Builder[REQUEST, RESPONSE]) SetSpanKindExtractor(spanKindExtractor SpanKindExtractor[REQUEST]) *Builder[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) SetSpanNameExtractor ¶
func (b *Builder[REQUEST, RESPONSE]) SetSpanNameExtractor(spanNameExtractor SpanNameExtractor[REQUEST]) *Builder[REQUEST, RESPONSE]
func (*Builder[REQUEST, RESPONSE]) SetSpanStatusExtractor ¶
func (b *Builder[REQUEST, RESPONSE]) SetSpanStatusExtractor(spanStatusExtractor SpanStatusExtractor[REQUEST, RESPONSE]) *Builder[REQUEST, RESPONSE]
type ContextCustomizer ¶
type InstrumentEnabler ¶
type InstrumentEnabler interface {
Enable() bool
}
func NewDefaultInstrumentEnabler ¶
func NewDefaultInstrumentEnabler() InstrumentEnabler
type Instrumenter ¶
type Instrumenter[REQUEST any, RESPONSE any] interface { ShouldStart(parentContext context.Context, request REQUEST) bool StartAndEnd(parentContext context.Context, request REQUEST, response RESPONSE, err error, startTime, endTime time.Time) StartAndEndWithOptions(parentContext context.Context, request REQUEST, response RESPONSE, err error, startTime, endTime time.Time, startOptions []trace.SpanStartOption, endOptions []trace.SpanEndOption) Start(parentContext context.Context, request REQUEST, options ...trace.SpanStartOption) context.Context End(ctx context.Context, request REQUEST, response RESPONSE, err error, options ...trace.SpanEndOption) }
type InternalInstrumenter ¶ added in v0.0.2
type InternalInstrumenter[REQUEST any, RESPONSE any] struct { // contains filtered or unexported fields }
func (*InternalInstrumenter[REQUEST, RESPONSE]) End ¶ added in v0.0.2
func (i *InternalInstrumenter[REQUEST, RESPONSE]) End(ctx context.Context, request REQUEST, response RESPONSE, err error, options ...trace.SpanEndOption)
func (*InternalInstrumenter[REQUEST, RESPONSE]) ShouldStart ¶ added in v0.6.0
func (i *InternalInstrumenter[REQUEST, RESPONSE]) ShouldStart(parentContext context.Context, request REQUEST) bool
func (*InternalInstrumenter[REQUEST, RESPONSE]) Start ¶ added in v0.0.2
func (i *InternalInstrumenter[REQUEST, RESPONSE]) Start(parentContext context.Context, request REQUEST, options ...trace.SpanStartOption) context.Context
func (*InternalInstrumenter[REQUEST, RESPONSE]) StartAndEnd ¶ added in v0.0.2
func (*InternalInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions ¶ added in v0.4.0
func (i *InternalInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions(parentContext context.Context, request REQUEST, response RESPONSE, err error, startTime, endTime time.Time, startOptions []trace.SpanStartOption, endOptions []trace.SpanEndOption)
type NoneStrategy ¶ added in v0.6.0
type NoneStrategy struct{}
type NoopAttrsShadower ¶
type NoopAttrsShadower struct{}
type NoopSpanSuppressor ¶
type NoopSpanSuppressor struct { }
func NewNoopSpanSuppressor ¶
func NewNoopSpanSuppressor() *NoopSpanSuppressor
func (*NoopSpanSuppressor) ShouldSuppress ¶
type OperationListener ¶
type OperationListener interface { OnBeforeStart(parentContext context.Context, startTimestamp time.Time) context.Context OnBeforeEnd(context context.Context, startAttributes []attribute.KeyValue, startTimestamp time.Time) context.Context OnAfterStart(context context.Context, endTimestamp time.Time) OnAfterEnd(context context.Context, endAttributes []attribute.KeyValue, endTimestamp time.Time) }
type PropagatingFromUpstreamInstrumenter ¶
type PropagatingFromUpstreamInstrumenter[REQUEST any, RESPONSE any] struct { // contains filtered or unexported fields }
func (*PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) End ¶
func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) End(ctx context.Context, request REQUEST, response RESPONSE, err error, options ...trace.SpanEndOption)
func (*PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) ShouldStart ¶ added in v0.6.0
func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) ShouldStart(parentContext context.Context, request REQUEST) bool
func (*PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) Start ¶
func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) Start(parentContext context.Context, request REQUEST, options ...trace.SpanStartOption) context.Context
func (*PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) StartAndEnd ¶ added in v0.0.2
func (*PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions ¶ added in v0.4.0
func (p *PropagatingFromUpstreamInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions(parentContext context.Context, request REQUEST, response RESPONSE, err error, startTime, endTime time.Time, startOptions []trace.SpanStartOption, endOptions []trace.SpanEndOption)
type PropagatingToDownstreamInstrumenter ¶
type PropagatingToDownstreamInstrumenter[REQUEST any, RESPONSE any] struct { // contains filtered or unexported fields }
func (*PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) End ¶
func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) End(ctx context.Context, request REQUEST, response RESPONSE, err error, options ...trace.SpanEndOption)
func (*PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) ShouldStart ¶ added in v0.6.0
func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) ShouldStart(parentContext context.Context, request REQUEST) bool
func (*PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) Start ¶
func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) Start(parentContext context.Context, request REQUEST, options ...trace.SpanStartOption) context.Context
func (*PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) StartAndEnd ¶ added in v0.0.2
func (*PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions ¶ added in v0.4.0
func (p *PropagatingToDownstreamInstrumenter[REQUEST, RESPONSE]) StartAndEndWithOptions(parentContext context.Context, request REQUEST, response RESPONSE, err error, startTime, endTime time.Time, startOptions []trace.SpanStartOption, endOptions []trace.SpanEndOption)
type SemConvStrategy ¶ added in v0.6.0
type SemConvStrategy struct{}
type SpanKeyProvider ¶
type SpanKeySuppressor ¶
type SpanKeySuppressor struct {
// contains filtered or unexported fields
}
func NewSpanKeySuppressor ¶
func NewSpanKeySuppressor(spanKeys []attribute.Key) *SpanKeySuppressor
func (*SpanKeySuppressor) ShouldSuppress ¶
type SpanKindExtractor ¶
type SpanKindStrategy ¶ added in v0.6.0
type SpanKindStrategy struct{}
type SpanKindSuppressor ¶ added in v0.6.0
type SpanKindSuppressor struct {
// contains filtered or unexported fields
}
func NewSpanKindSuppressor ¶ added in v0.6.0
func NewSpanKindSuppressor() *SpanKindSuppressor
func (*SpanKindSuppressor) ShouldSuppress ¶ added in v0.6.0
type SpanNameExtractor ¶
type SpanStatusExtractor ¶
type SpanSuppressor ¶
type SpanSuppressorStrategy ¶ added in v0.6.0
type SpanSuppressorStrategy interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.