Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiddleWare ¶
NewMiddleWare creates a MiddleWare that provides OpenTelemetry Parameter service should describe the name of the (virtual) server handling the request. The OTelMiddleWare can be configured using the provided Options.
Types ¶
type Handler ¶
Handler implements the http.Handler interface and provides trace and metrics to beego web apps.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option applies a configuration to the given config.
func WithFilter ¶
WithFilter adds the given filter for use in the middleware. Defaults to no filters.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter. If none is specified, the global provider is used.
func WithPropagators ¶
func WithPropagators(propagators propagation.TextMapPropagator) Option
WithPropagators sets the propagators used in the middleware. Defaults to global.Propagators().
func WithSpanNameFormatter ¶
func WithSpanNameFormatter(f SpanNameFormatter) Option
WithSpanNameFormatter sets the formatter to be used to format span names. Defaults to the path template.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.