Documentation ¶
Overview ¶
Package xtel provides a set of tools for OpenTelemetry.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var DisableClientAutoTracing = &disableClientTracing{}
DisableClientAutoTracing controls automatic tracing of downstream client connection. This is ENABLED by default.
Functions ¶
This section is empty.
Types ¶
type MeterProvider ¶
type MeterProvider = metric.MeterProvider
MeterProvider handles the creation and coordination of Meters. All Meters created by a MeterProvider will be associated with the same Resource, have the same Views applied to them, and have their produced metric telemetry passed to the configured Readers.
type MetricReaderFunc ¶
MetricReaderFunc is used to create a new metric.Reader.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider helps manage the lifecycle and configuration of different Exporter(s) and other service level configurations for tracing and metrics.
func NewProvider ¶
func NewProvider(serviceName string, opts ...ProviderOption) (*Provider, error)
NewProvider creates a new Provider for the given ProviderOption.
func (*Provider) MeterProvider ¶
func (p *Provider) MeterProvider() *MeterProvider
MeterProvider provides an OpenTelemetry MeterProvider over a given Provider which will be used to provide meters to instrumentation.
func (*Provider) Run ¶
Run will start running the Provider and associated processes. This method blocks until the passed context has been cancelled and then calls Stop. This makes Provider compatible with https://pkg.go.dev/github.com/gojekfarm/xrun package.
func (*Provider) Start ¶
Start starts Provider and initialises any related processes used for tracing.
func (*Provider) TracerProvider ¶
func (p *Provider) TracerProvider() *TracerProvider
TracerProvider provides an OpenTelemetry TracerProvider over a given Provider which will be used to provide tracers to instrumentation.
type ProviderOption ¶
type ProviderOption interface {
// contains filtered or unexported methods
}
ProviderOption changes the behaviour of Provider.
type SamplingFraction ¶
type SamplingFraction float64
SamplingFraction configures sampling decision of traces. It makes a sampling decision based on the TraceID ratio. SamplingFraction >= 1 will always sample. SamplingFraction < 0 are treated as zero.
type TraceExporterFunc ¶
type TraceExporterFunc func(context.Context) (trace.SpanExporter, error)
TraceExporterFunc is used to create a new trace.SpanExporter.
type TracerProvider ¶
type TracerProvider = trace.TracerProvider
TracerProvider is an OpenTelemetry TracerProvider. It provides Tracers to instrumentation, so it can trace operational flow through a system.