Documentation
¶
Index ¶
- func NewAxiomProvider(ctx context.Context, otelService *observability.Service, ...) (*trace.TracerProvider, func(ctx context.Context), error)
- func NewAxiomProviderFromEnv(ctx context.Context, otelService *observability.Service, options ...Option) (*trace.TracerProvider, func(ctx context.Context), error)
- func NewOtelProvider(ctx context.Context, otelService *observability.Service, options ...Option) (*trace.TracerProvider, func(ctx context.Context), error)
- func NewOtelProviderWithProcessors(otelService *observability.Service, processors ...trace.SpanProcessor) *trace.TracerProvider
- func NewOtelSpanProcessor(ctx context.Context, options ...Option) (trace.SpanProcessor, error)
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAxiomProvider ¶
func NewAxiomProvider(ctx context.Context, otelService *observability.Service, dataset, apiKey string, options ...Option) (*trace.TracerProvider, func(ctx context.Context), error)
NewAxiomProvider creates a new OpenTelemetry tracer provider that sends traces to Axiom to the given dataset and authenticating with the given API key.
func NewAxiomProviderFromEnv ¶
func NewAxiomProviderFromEnv(ctx context.Context, otelService *observability.Service, options ...Option) (*trace.TracerProvider, func(ctx context.Context), error)
NewAxiomProviderFromEnv creates a new OpenTelemetry tracer provider that sends traces to Axiom. It reads the following environment variables:
- AXIOM_API_KEY: The Axiom API key.
- AXIOM_TRACES_DATASET: The dataset where traces should be stored.
func NewOtelProvider ¶
func NewOtelProvider(ctx context.Context, otelService *observability.Service, options ...Option) (*trace.TracerProvider, func(ctx context.Context), error)
NewOtelProvider creates a new OpenTelemetry tracer provider.
func NewOtelProviderWithProcessors ¶
func NewOtelProviderWithProcessors(otelService *observability.Service, processors ...trace.SpanProcessor) *trace.TracerProvider
NewOtelProviderWithProcessors creates a new OpenTelemetry tracer provider with the given processors.
func NewOtelSpanProcessor ¶
NewOtelSpanProcessor creates a new OpenTelemetry HTTP span processor.
Types ¶
type Option ¶
type Option func(*Options)
func WithEndpointURL ¶
WithEndpointURL sets the target endpoint URL (scheme, host, port, path) the Exporter will connect to.
func WithExportInterval ¶
WithExportInterval sets the maximum duration between batched exports. If set to 0, traces will not be batched.
Defaults to 5s.
func WithHeaders ¶
WithHeaders sets headers to send on each HTTP request.