Documentation
¶
Overview ¶
Package otel provides an OpenTelemetry plugin for RoadRunner that enables distributed tracing and metrics collection. It configures exporters, samplers, and propagators, and provides HTTP middleware that creates root server spans for incoming requests.
Index ¶
- func HTTPHandler(next http.Handler, middleware httpMiddleware) http.Handler
- func TemporalHandler(interceptor temporalInterceptor) interceptor.WorkerInterceptor
- type Client
- type Config
- type Configurer
- type Exporter
- type Logger
- type Plugin
- func (p *Plugin) Init(cfg Configurer, log Logger) error
- func (p *Plugin) Middleware(next http.Handler) http.Handler
- func (p *Plugin) Name() string
- func (p *Plugin) Serve() chan error
- func (p *Plugin) Stop(ctx context.Context) error
- func (p *Plugin) Tracer() *sdktrace.TracerProvider
- func (p *Plugin) WorkerInterceptor() interceptor.WorkerInterceptor
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TemporalHandler ¶
func TemporalHandler(interceptor temporalInterceptor) interceptor.WorkerInterceptor
Types ¶
type Config ¶
type Config struct {
// Resource describes an entity about which identifying information and metadata is exposed.
Resource *Resource `mapstructure:"resource"`
// Insecure endpoint (http)
Insecure bool `mapstructure:"insecure"`
// Compress - use gzip compression
Compress bool `mapstructure:"compress"`
// Exporter type, can be zipkin,stdout or otlp
Exporter Exporter `mapstructure:"exporter"`
// CustomURL to use to send spans, has effect only for the HTTP exporter
CustomURL string `mapstructure:"custom_url"`
// Client
Client Client `mapstructure:"client"`
// Endpoint to connect
Endpoint string `mapstructure:"endpoint"`
// ServiceName describes the service in the attributes
ServiceName string `mapstructure:"service_name"`
// ServiceVersion in semver format
ServiceVersion string `mapstructure:"service_version"`
// Headers for the otlp protocol
Headers map[string]string `mapstructure:"headers"`
}
func (*Config) InitDefault ¶
type Configurer ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Tracer ¶
func (p *Plugin) Tracer() *sdktrace.TracerProvider
func (*Plugin) WorkerInterceptor ¶
func (p *Plugin) WorkerInterceptor() interceptor.WorkerInterceptor
type Resource ¶
type Resource struct {
ServiceNameKey string `mapstructure:"service_name"`
ServiceNamespaceKey string `mapstructure:"service_namespace"`
ServiceInstanceIDKey string `mapstructure:"service_instance_id"`
ServiceVersionKey string `mapstructure:"service_version"`
}
Resource describes an entity about which identifying information and metadata is exposed. Resource is an immutable object, equivalent to a map from key to unique value
Click to show internal directories.
Click to hide internal directories.