Documentation ¶
Index ¶
- Variables
- func NewClient(options ClientOptions) (otlptrace.Client, error)
- func NewResource(ctx context.Context, provider ServiceNameProvider) (*resource.Resource, error)
- func NewSampler(options SamplerOptions) (trace.Sampler, error)
- func NewSpanExporters(ctx context.Context, options SpanExportersOptions) ([]trace.SpanExporter, error)
- func NewTextMapPropagator(propagators Propagators) propagation.TextMapPropagator
- func NewTracerProvider(ctx context.Context, options TracerProviderOptions) (*trace.TracerProvider, func())
- type BatchTimeout
- type ClientOptions
- type Compression
- type Endpoint
- type Exporter
- type Exporters
- type Propagator
- type Propagators
- type Protocol
- type Sampler
- type SamplerArg
- type SamplerOptions
- type ServiceNameProvider
- type SpanExportersOptions
- type TracerProviderOptions
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidCompression = errors.New("not a valid Compression")
var ErrInvalidExporter = errors.New("not a valid Exporter")
var ErrInvalidPropagator = errors.New("not a valid Propagator")
var ErrInvalidProtocol = errors.New("not a valid Protocol")
var ErrInvalidSampler = errors.New("not a valid Sampler")
Functions ¶
func NewResource ¶
func NewSampler ¶
func NewSampler(options SamplerOptions) (trace.Sampler, error)
func NewSpanExporters ¶
func NewSpanExporters(ctx context.Context, options SpanExportersOptions) ([]trace.SpanExporter, error)
func NewTextMapPropagator ¶
func NewTextMapPropagator(propagators Propagators) propagation.TextMapPropagator
func NewTracerProvider ¶
func NewTracerProvider(ctx context.Context, options TracerProviderOptions) (*trace.TracerProvider, func())
Types ¶
type BatchTimeout ¶
BatchTimeout represents a duration used for timeout configurations.
type ClientOptions ¶
type ClientOptions struct { Protocol Protocol Endpoint Endpoint Compression Compression }
type Compression ¶
type Compression string
Compression defines the compression type to use on OTLP. ENUM(none, gzip)
const ( // CompressionNone is a Compression of type none. CompressionNone Compression = "none" // CompressionGzip is a Compression of type gzip. CompressionGzip Compression = "gzip" )
func ParseCompression ¶
func ParseCompression(name string) (Compression, error)
ParseCompression attempts to convert a string to a Compression.
func (Compression) IsValid ¶
func (x Compression) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (Compression) String ¶
func (x Compression) String() string
String implements the Stringer interface.
type Exporter ¶
type Exporter string
Exporter defines a trace exporter type responsible for delivering spans to external receivers. ENUM(zipkin, otlp, none, jaeger, logging)
const ( // ExporterZipkin is a Exporter of type zipkin. ExporterZipkin Exporter = "zipkin" // ExporterOtlp is a Exporter of type otlp. ExporterOtlp Exporter = "otlp" // ExporterNone is a Exporter of type none. ExporterNone Exporter = "none" // ExporterJaeger is a Exporter of type jaeger. ExporterJaeger Exporter = "jaeger" // ExporterLogging is a Exporter of type logging. ExporterLogging Exporter = "logging" )
func ParseExporter ¶
ParseExporter attempts to convert a string to a Exporter.
type Exporters ¶
type Exporters []Exporter
Exporters is a slice of Exporter instances representing multiple trace exporters.
type Propagator ¶
type Propagator string
Propagator determine which distributed tracing header formats are used, and which baggage propagation header formats are used. ENUM(tracecontext, baggage, b3, b3multi, jaeger, xray, ottrace)
const ( // PropagatorTracecontext is a Propagator of type tracecontext. PropagatorTracecontext Propagator = "tracecontext" // PropagatorBaggage is a Propagator of type baggage. PropagatorBaggage Propagator = "baggage" // PropagatorB3 is a Propagator of type b3. PropagatorB3 Propagator = "b3" // PropagatorB3multi is a Propagator of type b3multi. PropagatorB3multi Propagator = "b3multi" // PropagatorJaeger is a Propagator of type jaeger. PropagatorJaeger Propagator = "jaeger" // PropagatorXray is a Propagator of type xray. PropagatorXray Propagator = "xray" // PropagatorOttrace is a Propagator of type ottrace. PropagatorOttrace Propagator = "ottrace" )
func ParsePropagator ¶
func ParsePropagator(name string) (Propagator, error)
ParsePropagator attempts to convert a string to a Propagator.
func (Propagator) IsValid ¶
func (x Propagator) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (Propagator) String ¶
func (x Propagator) String() string
String implements the Stringer interface.
type Propagators ¶
type Propagators []Propagator
Propagators is a slice of Propagator instances representing multiple propagators.
type Protocol ¶
type Protocol string
Protocol defines the encoding of telemetry data and the protocol used to exchange spans between the client and the server. ENUM(grpc, http/protobuf)
func ParseProtocol ¶
ParseProtocol attempts to convert a string to a Protocol.
type Sampler ¶
type Sampler string
Sampler configures whether spans will be recorded. ENUM(always_on, always_off, traceidratio, parentbased_always_on, parentbased_always_off, parentbased_traceidratio)
const ( // SamplerAlwaysOn is a Sampler of type always_on. SamplerAlwaysOn Sampler = "always_on" // SamplerAlwaysOff is a Sampler of type always_off. SamplerAlwaysOff Sampler = "always_off" // SamplerTraceidratio is a Sampler of type traceidratio. SamplerTraceidratio Sampler = "traceidratio" // SamplerParentbasedAlwaysOn is a Sampler of type parentbased_always_on. SamplerParentbasedAlwaysOn Sampler = "parentbased_always_on" // SamplerParentbasedAlwaysOff is a Sampler of type parentbased_always_off. SamplerParentbasedAlwaysOff Sampler = "parentbased_always_off" // SamplerParentbasedTraceidratio is a Sampler of type parentbased_traceidratio. SamplerParentbasedTraceidratio Sampler = "parentbased_traceidratio" )
func ParseSampler ¶
ParseSampler attempts to convert a string to a Sampler.
type SamplerArg ¶
type SamplerArg float64
SamplerArg represents an argument used by certain samplers, specifically for traceidratio and parentbased_traceidratio.
type SamplerOptions ¶
type SamplerOptions struct { Sampler Sampler SamplerArg SamplerArg }
type ServiceNameProvider ¶ added in v1.1.0
type SpanExportersOptions ¶
type TracerProviderOptions ¶
type TracerProviderOptions struct { Resource *resource.Resource Sampler trace.Sampler Exporters []trace.SpanExporter BatchTimeout BatchTimeout Propagator propagation.TextMapPropagator Logger logr.Logger }