observ

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 20 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecordCacheLookup added in v0.17.0

func RecordCacheLookup(ctx context.Context, result, typ string)

func RecordUpstreamFetch added in v0.17.0

func RecordUpstreamFetch(ctx context.Context, result string)

func RecordUpstreamFetchDuration added in v0.17.0

func RecordUpstreamFetchDuration(ctx context.Context, result string, duration time.Duration)

func RegisterExporter

func RegisterExporter(traceExporter, url, service, env string, samplingFraction float64) (func(), error)

RegisterExporter configures the OpenTelemetry TracerProvider used to export traces.

Athens exports traces via OTLP. The traceExporter argument acts as a toggle: "otlp" enables export, an empty value disables it. The url argument, when set, overrides the OTLP endpoint; otherwise the standard OTEL_EXPORTER_OTLP_* environment variables are honored. samplingFraction is the fraction of root traces sampled outside of development (0 samples nothing, 1 samples everything). RegisterExporter returns a cleanup function that flushes and shuts down the provider; the caller is responsible for calling it at shutdown.

func RegisterStatsExporter added in v0.3.0

func RegisterStatsExporter(r *mux.Router, statsExporter, service string) (func(), error)

RegisterStatsExporter configures the OpenTelemetry MeterProvider used to collect stats. Currently it supports: prometheus. It returns a cleanup function that shuts down the provider; the caller is responsible for calling it at shutdown.

func StartSpan

func StartSpan(ctx context.Context, op string) (context.Context, oteltrace.Span)

StartSpan takes in a Context and opName and starts a span. It returns the new context carrying the span and the span itself.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL