Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTracedHttpHandler ¶
Types ¶
type Config ¶
type Config struct { // Specifies the service name to use on the tracer. ServiceName string `json:"service_name" alias:"appName"` // Set this to the tracing backend you wish to use. // If omitted or empty, tracing will be disabled. Provider string `json:"provider" default:"jaeger"` // Use synchronous span exporter processor. // // This is not recommended for production use. Sync bool `json:"sync" default:"false"` Stdout StdOutConfig `json:"stdout" validate:"dive"` OTLP OTLPConfig `json:"otlp" validate:"dive"` Jaeger JaegerConfig `json:"jaeger" validate:"dive"` Zipkin ZipkinConfig `json:"zipkin" validate:"dive"` }
type JaegerConfig ¶
type JaegerConfig struct { AgentHost string `json:"agent_host"` AgentPort string `json:"agent_port"` }
JaegerConfig encapsulates jaeger's configuration.
type OTLPConfig ¶
type OTLPConfig struct { Endpoint string `json:"endpoint"` Insecure bool `json:"insecure" default:"true"` Headers map[string]string `json:"headers"` Compression string `json:"compression"` Timeout time.Duration `json:"timeout"` Protocol string `json:"protocol" default:"grpc"` }
OTLPConfig encapsulates OTLP exporter configuration.
type StdOutConfig ¶
type StdOutConfig struct { PrettyPrint bool `json:"pretty_print" default:"false"` Timestamps bool `json:"timestamps" default:"true"` }
StdOutConfig encapsulates STDOUT exporter configuration.
type Tracer ¶
type Tracer struct { Config Config // contains filtered or unexported fields }
Tracer encapsulates tracing abilities.
func (*Tracer) TracerProvider ¶
func (t *Tracer) TracerProvider() trace.TracerProvider
TracerProvider returns the wrapped tracer.
type ZipkinConfig ¶
type ZipkinConfig struct {
ServerURL string `json:"server_url"`
}
ZipkinConfig encapsulates zipkin's configuration.
Click to show internal directories.
Click to hide internal directories.