Documentation
¶
Index ¶
- func RecordCacheLookup(ctx context.Context, result, typ string)
- func RecordUpstreamFetch(ctx context.Context, result string)
- func RecordUpstreamFetchDuration(ctx context.Context, result string, duration time.Duration)
- func RegisterExporter(traceExporter, url, service, env string, samplingFraction float64) (func(), error)
- func RegisterStatsExporter(r *mux.Router, statsExporter, service string) (func(), error)
- func StartSpan(ctx context.Context, op string) (context.Context, oteltrace.Span)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecordCacheLookup ¶ added in v0.17.0
func RecordUpstreamFetch ¶ added in v0.17.0
func RecordUpstreamFetchDuration ¶ added in v0.17.0
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
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.
Types ¶
This section is empty.