P2 of the instrumentation plan (research/observability/2026-10-28-instrumentation-portal-registry-db.md). Portal and tenant-registry already trace on stage; Prüfwerk was the gap.
What
Propagation:init_telemetry sets the W3C TraceContextPropagator. RegistryClient::request() (entitlements, tenants, projects, audit, API-key verify, usage) adds traceparent, so the registry's spans become children of Prüfwerk's trace.
Server spans:api/trace.rs gives TraceLayer its own span: INFO (the default was DEBUG and the INFO filter dropped it, so the agent had no HTTP server spans at all), named METHOD <route template> from MatchedPath (GET unmatched otherwise), continues an incoming traceparent (portal, registry), records the status, 5xx = error. /api/v1/health gets no span. No path, query or client address (the default recorded the full URI).
Log ↔ trace:opentelemetry-appender-tracing with experimental_use_tracing_span_context, so OTLP log records carry trace_id/span_id and SigNoz links them (today 0 Prüfwerk log lines carry a trace id).
Helpers in compliance-core::telemetry (trace_context_headers, continue_trace), so the agent needs no direct OTel dependency.
Checks
cargo fmt --check; clippy -D warnings for core, agent, dashboard (server); cargo test -p compliance-core -p compliance-agent --lib (954 + 183, incl. new: traceparent continued and passed on with the child's own span id, root without one, no headers outside a trace; span named after the route, path/query never recorded, 5xx marks the span, health untraced, unmatched); cargo audit green.
Not in this PR
deployment.environment comes from OTEL_RESOURCE_ATTRIBUTES (the resource builder reads it) — one env line per service in orca-platform. P1 (drop the duplicate docker copy of Prüfwerk logs) is separate.
P2 of the instrumentation plan (`research/observability/2026-10-28-instrumentation-portal-registry-db.md`). Portal and tenant-registry already trace on stage; Prüfwerk was the gap.
## What
- **Propagation:** `init_telemetry` sets the W3C `TraceContextPropagator`. `RegistryClient::request()` (entitlements, tenants, projects, audit, API-key verify, usage) adds `traceparent`, so the registry's spans become children of Prüfwerk's trace.
- **Server spans:** `api/trace.rs` gives `TraceLayer` its own span: INFO (the default was DEBUG and the INFO filter dropped it, so the agent had **no HTTP server spans** at all), named `METHOD <route template>` from `MatchedPath` (`GET unmatched` otherwise), continues an incoming `traceparent` (portal, registry), records the status, 5xx = error. `/api/v1/health` gets no span. No path, query or client address (the default recorded the full URI).
- **Log ↔ trace:** `opentelemetry-appender-tracing` with `experimental_use_tracing_span_context`, so OTLP log records carry `trace_id`/`span_id` and SigNoz links them (today 0 Prüfwerk log lines carry a trace id).
- Helpers in `compliance-core::telemetry` (`trace_context_headers`, `continue_trace`), so the agent needs no direct OTel dependency.
## Checks
`cargo fmt --check`; clippy `-D warnings` for core, agent, dashboard (server); `cargo test -p compliance-core -p compliance-agent --lib` (954 + 183, incl. new: traceparent continued and passed on with the child's own span id, root without one, no headers outside a trace; span named after the route, path/query never recorded, 5xx marks the span, health untraced, unmatched); `cargo audit` green.
## Not in this PR
`deployment.environment` comes from `OTEL_RESOURCE_ATTRIBUTES` (the resource builder reads it) — one env line per service in orca-platform. P1 (drop the duplicate docker copy of Prüfwerk logs) is separate.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
- W3C propagator in init_telemetry; calls to the registry carry
traceparent, so the registry's spans join Prüfwerk's trace.
- The agent's HTTP server opens one INFO span per request, named after
the route template and continuing an incoming traceparent (portal,
registry). The default TraceLayer span was DEBUG (dropped by the INFO
filter) and recorded the full URI. No path, query or client address.
- opentelemetry-appender-tracing experimental_use_tracing_span_context:
OTLP log records carry trace_id/span_id, so SigNoz links logs and traces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
P2 of the instrumentation plan (
research/observability/2026-10-28-instrumentation-portal-registry-db.md). Portal and tenant-registry already trace on stage; Prüfwerk was the gap.What
init_telemetrysets the W3CTraceContextPropagator.RegistryClient::request()(entitlements, tenants, projects, audit, API-key verify, usage) addstraceparent, so the registry's spans become children of Prüfwerk's trace.api/trace.rsgivesTraceLayerits own span: INFO (the default was DEBUG and the INFO filter dropped it, so the agent had no HTTP server spans at all), namedMETHOD <route template>fromMatchedPath(GET unmatchedotherwise), continues an incomingtraceparent(portal, registry), records the status, 5xx = error./api/v1/healthgets no span. No path, query or client address (the default recorded the full URI).opentelemetry-appender-tracingwithexperimental_use_tracing_span_context, so OTLP log records carrytrace_id/span_idand SigNoz links them (today 0 Prüfwerk log lines carry a trace id).compliance-core::telemetry(trace_context_headers,continue_trace), so the agent needs no direct OTel dependency.Checks
cargo fmt --check; clippy-D warningsfor core, agent, dashboard (server);cargo test -p compliance-core -p compliance-agent --lib(954 + 183, incl. new: traceparent continued and passed on with the child's own span id, root without one, no headers outside a trace; span named after the route, path/query never recorded, 5xx marks the span, health untraced, unmatched);cargo auditgreen.Not in this PR
deployment.environmentcomes fromOTEL_RESOURCE_ATTRIBUTES(the resource builder reads it) — one env line per service in orca-platform. P1 (drop the duplicate docker copy of Prüfwerk logs) is separate.🤖 Generated with Claude Code
https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
8249404a85to85c7998f01