tracing

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tracing wires the control plane into OpenTelemetry, giving an OTel observability fan-out (Langfuse, Phoenix, Jaeger, Datadog, any OTLP backend) for free: this package contains almost no custom exporter logic because otlptracegrpc/otlptracehttp already read every standard OTEL_EXPORTER_OTLP_* env var (endpoint, headers for hosted backends' auth tokens, TLS, compression, timeout) per the OTel spec. Any backend that speaks OTLP works without a single line of runkite-specific config.

Disabled by default (zero-dependency spirit): if OTEL_EXPORTER_OTLP_ENDPOINT / OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is unset, Init is a no-op and every Tracer() call returns the OTel API's built-in no-op tracer -- no background connection attempts, no overhead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context) (shutdown func(context.Context) error, err error)

Init configures the global TracerProvider from standard OTEL_* env vars. Returns a shutdown func to flush/close on exit (always non-nil, always safe to call/defer even when tracing was never enabled).

func Traceparent

func Traceparent(ctx context.Context) string

Traceparent extracts a run's W3C traceparent header value from a span's context, for embedding in the RunAssignment sent to a runner (see transport.TraceContext) -- real trace propagation instead of a fake hand-rolled ID, so a runner's own spans (e.g. LangChain's OTel callback handler) become children of this run's span in whatever backend is configured, not an orphaned, disconnected trace.

func Tracer

func Tracer() trace.Tracer

Tracer returns the runkite tracer from whatever TracerProvider is currently installed globally -- the OTel API's no-op provider if Init was never called or found no endpoint configured, so every call site using this is safe and free with tracing disabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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