Skip to content

feat(telemetry): opt-in OpenTelemetry trace export over OTLP#186

Merged
Shine-neko merged 2 commits into
mainfrom
feat/opentelemetry-traces
Jul 4, 2026
Merged

feat(telemetry): opt-in OpenTelemetry trace export over OTLP#186
Shine-neko merged 2 commits into
mainfrom
feat/opentelemetry-traces

Conversation

@Shine-neko

Copy link
Copy Markdown
Contributor

Opt-in OpenTelemetry distributed tracing, exported over OTLP/gRPC.

What

  • New [server.telemetry.traces] config block. Off by default: with it disabled no exporter is built and the server behaves exactly as before.
  • ring server start emits one span per HTTP request (stable HTTP-server semantic-convention attributes, span named {method} {route}) and one scheduler.cycle span per reconciliation cycle that has work to do — idle scheduler ticks produce no spans.
  • Configurable endpoint, service_name and sampler (always_on, always_off, parent_based_always_on, parent_based_always_off, ratio:<0..1>). Standard OTEL_* environment variables override the TOML values.
  • An unreachable collector degrades gracefully: the error is logged and the server keeps running without traces.

Traces only; logs and metrics export are intentionally out of scope here and the config block is shaped to accommodate them later.

Tests

  • Unit tests: sampler parsing, config resolution (env > TOML > default), telemetry disabled by default.
  • E2E (server/t15): server boots and serves requests with tracing enabled against an unreachable collector, and the startup log confirms export was enabled.
  • Full suite green (742 unit tests; server E2E passing aside from two failures that predate this branch).

Docs

  • documentation/reference/config-toml.md documents [server.telemetry.traces].

@Shine-neko Shine-neko merged commit 7ba97d1 into main Jul 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant