tracing

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Tracing is disabled by default; set LSTK_OTEL=1 to enable it. Spans are exported via OTLP/HTTP to localhost:4318 by default.

To start a local trace backend (Jaeger):

docker compose -f docker-compose.tracing.yaml up -d

Then open http://localhost:16686 to browse traces. Configure the exporter via standard OTel env vars (OTEL_EXPORTER_OTLP_ENDPOINT, etc.), which the SDK reads automatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithRemoteParent added in v0.11.0

func ContextWithRemoteParent(ctx context.Context, getenv func(string) string) context.Context

ContextWithRemoteParent extracts a span context from the TRACEPARENT and TRACESTATE environment variables — the inverse of SubprocessEnv.

func Init

func Init(ctx context.Context, logger log.Logger) func(context.Context) error

func SubprocessEnv added in v0.11.0

func SubprocessEnv(ctx context.Context) []string

SubprocessEnv returns env entries (TRACEPARENT, TRACESTATE) carrying the span context from ctx, or nil when tracing is disabled or no span is active.

Types

This section is empty.

Jump to

Keyboard shortcuts

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