feat(observability): opt-in OpenTelemetry tracing for manager and dns-server - #70
Conversation
…-server Add OpenTelemetry tracing support with opt-in gate via OTEL_EXPORTER_OTLP_ENDPOINT: - Zero overhead when disabled (no SDK init, lazy import) - Manager (Flask): TracerProvider + Flask/Requests instrumentation - DNS-server (Quart/ASGI): TracerProvider + ASGI middleware + Requests instrumentation - Service metadata: service.name + service.version in resource - Exact-pinned compatible dependencies (api/sdk/exporter/instrumentation) - Tests: verify disabled-by-default, InMemorySpanExporter for testing - Docs: enable/config/sampling in DEVELOPMENT.md Manager: opentelemetry-api/sdk/exporter/instrumentation-flask/instrumentation-requests DNS-server: same + instrumentation-asgi for ASGI middleware All tests pass (147 manager + 63 dns-server). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
🧙 Sourcery is reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Sorry @PenguinzTech, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
requirements.in/.txt: both sides added dependencies (boto3 for KMS, opentelemetry-* for #70's tracing, already merged) -- combined, neither dropped. No hash conflicts (unhashed pins). Both packages already present in the shared venv; import-verified. flake8-bugbear (enforced since #78 merged) caught one genuine unused import surfaced by the combine: typing.List in auth_service.py. Full manager suite: 255/255 passing. flake8 clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Opt-in OpenTelemetry tracing for the manager (Flask + requests instrumentation) and dns-server (ASGI middleware + requests). Initializes ONLY when
OTEL_EXPORTER_OTLP_ENDPOINTis set — default is completely off: lazy imports, no provider, apps boot fine without the packages loaded. W3C traceparent propagation manager↔dns-server,service.name/version resource attributes, OTLP HTTP exporter with BatchSpanProcessor. Deps exact-pinned (otel 1.24.0 / instrumentation 0.45b0) in both services' requirements. Ops section added to docs/DEVELOPMENT.md (enablement, sampling knobs, Jaeger example).Tests: 210 green (147 manager + 63 dns-server; 10 new using InMemorySpanExporter — no collector dependency, disabled-by-default proven).
Stack note: bases on
chore/dedup-reusable-code(top of the #53–#59 chain); auto-retargets towardv2.1.xas the stack merges bottom-up.🤖 Generated with Claude Code
Summary by Sourcery
Add opt-in OpenTelemetry tracing for the manager and DNS server, initializing only when configured via environment and remaining disabled by default.
New Features:
Enhancements:
Build:
Documentation:
Tests: