Documentation
¶
Index ¶
- func Extract(ctx context.Context, propagators propagation.TextMapPropagator) context.Context
- func Inject(ctx context.Context, propagators propagation.TextMapPropagator) context.Context
- func TraceIDFromContext(ctx context.Context, requireSampled bool) string
- type Option
- func WithAddress(address string) Option
- func WithAttributes(attrs ...attribute.KeyValue) Option
- func WithBatchTimeout(delay time.Duration) Option
- func WithBlocking() Option
- func WithExportTimeout(timeout time.Duration) Option
- func WithExporter(exporter string) Option
- func WithMaxExportBatchSize(size int) Option
- func WithMaxQueueSize(size int) Option
- func WithSamplerParam(p float64) Option
- func WithServiceName(service string) Option
- func WithServiceVersion(version string) Option
- func WithWriter(w io.Writer) Option
- type TracerProvider
- type Tracing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶ added in v0.0.11
func Extract(ctx context.Context, propagators propagation.TextMapPropagator) context.Context
Extract returns the correlation context and span context that another service encoded in the gRPC metadata object with Inject. This function is meant to be used on incoming requests.
func Inject ¶ added in v0.0.11
func Inject(ctx context.Context, propagators propagation.TextMapPropagator) context.Context
Inject injects correlation context and span context into the gRPC metadata object. This function is meant to be used on outgoing requests.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option specifies instrumentation configuration options.
func WithAddress ¶
func WithAttributes ¶
WithAttributes specifies additional attributes to be added to the span.
func WithBatchTimeout ¶ added in v0.0.2
WithBatchTimeout returns a Option that configures the maximum delay allowed for a BatchSpanProcessor before it will export any held span (whether the queue is full or not).
func WithBlocking ¶ added in v0.0.2
func WithBlocking() Option
WithBlocking returns a Option that configures a BatchSpanProcessor to wait for enqueue operations to succeed instead of dropping data when the queue is full.
func WithExportTimeout ¶ added in v0.0.2
WithExportTimeout returns a Option that configures the amount of time a BatchSpanProcessor waits for an exporter to export before abandoning the export.
func WithExporter ¶
func WithMaxExportBatchSize ¶ added in v0.0.2
WithMaxExportBatchSize returns a Option that configures the maximum export batch size allowed for a BatchSpanProcessor.
func WithMaxQueueSize ¶ added in v0.0.2
WithMaxQueueSize returns a Option that configures the maximum queue size allowed for a BatchSpanProcessor.
func WithSamplerParam ¶
func WithServiceName ¶
func WithServiceVersion ¶
func WithWriter ¶ added in v0.0.9
WithWriter sets the export stream destination.
type TracerProvider ¶ added in v0.0.7
type TracerProvider interface { embedded.TracerProvider Tracer(name string, options ...trace.TracerOption) trace.Tracer Shutdown(ctx context.Context) error }
func NewProfilingTracerProvider ¶
func NewProfilingTracerProvider(tp TracerProvider) TracerProvider
NewProfilingTracerProvider creates a new tracer provider that annotates pprof samples with span_id label. This allows to establish a relationship between pprof profiles and reported tracing spans.
type Tracing ¶
type Tracing struct { embedded.TracerProvider // contains filtered or unexported fields }