Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTracerProvider ¶
func SemVersion ¶
func SemVersion() string
SemVersion is the semantic version to be supplied to tracer/meter creation.
Types ¶
type FallbackSampler ¶ added in v0.2.4
type FallbackSampler struct {
// contains filtered or unexported fields
}
FallbackSampler does the sampling at a rate of 1 req/sec and 5% of additional requests.
func NewFallbackSampler ¶ added in v0.2.4
func NewFallbackSampler(fraction float64) *FallbackSampler
NewFallbackSampler returns a FallbackSampler which samples 1 req/sec and additional 5% of requests using traceIDRatioBasedSampler.
func (*FallbackSampler) Description ¶ added in v0.2.4
func (fs *FallbackSampler) Description() string
Description returns description of the sampler being used.
func (*FallbackSampler) ShouldSample ¶ added in v0.2.4
func (fs *FallbackSampler) ShouldSample(parameters sdktrace.SamplingParameters) sdktrace.SamplingResult
ShouldSample implements the logic of borrowing 1 req/sec and then use traceIDRatioBasedSampler to sample 5% of additional requests.
type Jaeger ¶
type Jaeger struct{}
Jaeger propagator serializes SpanContext to/from Jaeger Headers
Jaeger format:
uber-tracer-id: {tracer-id}:{span-id}:{parent-span-id}:{flags}
func (Jaeger) Extract ¶
func (jaeger Jaeger) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
Extract extracts a context from the carrier if it contains Jaeger headers.
func (Jaeger) Inject ¶
func (jaeger Jaeger) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject injects a context to the carrier following jaeger format. The parent span ID is set to an dummy parent span id as the most implementations do.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option specifies instrumentation configuration options.
func WithPropagators ¶
func WithPropagators(propagators propagation.TextMapPropagator) Option
WithPropagators specifies propagators to use for extracting information from the HTTP requests. If none are specified, global ones will be used.
func WithProvider ¶ added in v0.2.1
func WithProvider(provider oteltrace.TracerProvider) Option
WithProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
type Server ¶
type Server struct {
Tracer oteltrace.Tracer
TracerProvider oteltrace.TracerProvider
Propagators propagation.TextMapPropagator
// contains filtered or unexported fields
}