Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(serverName string, opts ...HTTPMiddlewareOption) func(next http.Handler) http.Handler
Middleware sets up a handler to start tracing the incoming requests. The serverName parameter should describe the name of the (virtual) server handling the request.
Types ¶
type HTTPMiddlewareOption ¶
type HTTPMiddlewareOption interface {
// contains filtered or unexported methods
}
HTTPMiddlewareOption specifies instrumentation configuration options.
func WithPropagators ¶
func WithPropagators(propagators propagation.TextMapPropagator) HTTPMiddlewareOption
WithPropagators specifies propagators to use for extracting information from the HTTP requests. If none are specified, global ones will be used.
func WithTracerProvider ¶
func WithTracerProvider(provider oteltrace.TracerProvider) HTTPMiddlewareOption
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a wrapper around the open telemetry tracer.Provider It helps initialize an OTLP exporter, and configures the corresponding trace provider
func NewProvider ¶
NewProvider creates a new instance of TraceProvider