Auto-instrument sanctions with OpenTelemetry zero-code

Add opentelemetry-distro/exporter-otlp (pinned pair) and run
opentelemetry-bootstrap at build time; wrap the sanctions command with
opentelemetry-instrument and configure the SDK via OTEL_* env (traces
only, OTLP/HTTP to otlp.vione.cloud). create-secrets.sh now writes the
base64 OTLP auth header into .env.observability.

The G10 guard test (no observability libraries in requirements) is
expected to fail from here until the guard suite is retired in Phase 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Movses Aslanyan
2026-10-12 20:09:38 +03:30
co-authored by Claude Opus 5.5
parent 995c93982a
commit f721df3063
4 changed files with 21 additions and 3 deletions
+10 -1
View File
@@ -139,7 +139,16 @@ services:
environment:
<<: *app-env
SERVICE_NAME: sanctions
command: uvicorn services.sanctions.app:app --host 0.0.0.0 --port 8003 --reload --no-access-log
OTEL_SERVICE_NAME: sanctions
OTEL_RESOURCE_ATTRIBUTES: deployment.environment.name=prod
OTEL_EXPORTER_OTLP_ENDPOINT: https://otlp.vione.cloud
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: none
OTEL_LOGS_EXPORTER: none
env_file:
- .env.observability
command: opentelemetry-instrument uvicorn services.sanctions.app:app --host 0.0.0.0 --port 8003 --reload --no-access-log
ports:
- "8003:8003"
healthcheck: