-
Notifications
You must be signed in to change notification settings - Fork 8
Phase 2 Service Onboarding
OTel auto-instrumentation for all 8 services. Each service has two issues: code changes (instrumentation library setup) and Helm chart changes (environment variable injection). Services are independent and can be done in any order.
Total estimated effort: ~25h across all 8 services
Recommended starting points: acapy-agent and traction
For detailed per-service technical specs see report/index.html → Repository Telemetry Assessments.
Labels: phase-2 instrumentation python acapy
Estimated Effort: ~2.5h
Description: Add OpenTelemetry auto-instrumentation to acapy-agent to enable distributed tracing for HTTP endpoints and PostgreSQL queries.
Requirements:
- Add
opentelemetry-api,opentelemetry-sdk,opentelemetry-exporter-otlp,opentelemetry-instrumentation-aiohttp-serverto dependencies - Initialize OTel SDK in
acapy_agent/__main__.py - Add aiohttp server middleware in
acapy_agent/admin/server.py - Add PostgreSQL tracing via
opentelemetry-instrumentation-psycopg(psycopg v3)
Acceptance Criteria:
- OTel SDK initializes on startup without errors
- Inbound HTTP requests to the admin API generate trace spans visible in Tempo
- PostgreSQL queries appear as child spans within HTTP request traces
- No regression in existing test suite
Labels: phase-2 helm acapy
Estimated Effort: ~30min
Description: Inject OTel environment variables into the acapy-agent deployment via Helm chart.
Requirements:
- Add
OTEL_SERVICE_NAME,OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLEDto the deployment env block - Values should be configurable via
values.yamlwith sensible defaults
Acceptance Criteria:
- Env vars present in deployed pod (
kubectl execverify) - Traces appear in Tempo after deployment
- Helm chart change reviewed and merged
Labels: phase-2 instrumentation python vc-authn
Estimated Effort: ~2h
Description: Add OTel auto-instrumentation to the FastAPI backend with MongoDB and Redis driver tracing.
Requirements:
- Add
opentelemetry-instrumentation-fastapi,opentelemetry-instrumentation-httpx,opentelemetry-instrumentation-pymongo,opentelemetry-instrumentation-redis - Initialize OTel SDK in
oidc-controller/api/main.py - Apply
FastAPIInstrumentor.instrument_app(app)
Acceptance Criteria:
- FastAPI request spans visible in Tempo
- MongoDB and Redis operations appear as child spans
- No regression in existing test suite
Labels: phase-2 helm vc-authn
Estimated Effort: ~30min
Description: Inject OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_ENDPOINT into the deployment.
Acceptance Criteria:
- Env vars present in deployed pod
- Traces appear in Tempo after deployment
Labels: phase-2 instrumentation nodejs python traction
Estimated Effort: ~3h
Description: Add OTel instrumentation to both the tenant-ui (Node.js/Express) and the ACA-Py plugin (Python/aiohttp) components.
Requirements:
-
tenant-ui: Add
@opentelemetry/sdk-node,@opentelemetry/auto-instrumentations-node; createsrc/tracing.ts; import before Express starts insrc/index.ts -
ACA-Py plugin: Wrap startup command with
opentelemetry-instrumentCLI inplugins/docker/Dockerfile; addopentelemetry-instrumentation-asyncpgfor PostgreSQL
Acceptance Criteria:
- tenant-ui HTTP spans visible in Tempo
- ACA-Py plugin spans visible in Tempo, linked to tenant-ui parent spans
- PostgreSQL spans appear as children of ACA-Py spans
- No regression in existing test suite
Labels: phase-2 helm traction
Estimated Effort: ~30min
Description: Inject OTel env vars into both the tenant-ui and ACA-Py plugin deployments.
Requirements:
-
OTEL_SERVICE_NAMEandOTEL_EXPORTER_OTLP_ENDPOINTfor both deployments - Values configurable via
values.yaml
Acceptance Criteria:
- Env vars present in both deployed pods
- Traces from both components visible and linked in Tempo
Labels: phase-2 instrumentation python endorser
Estimated Effort: ~2h
Description: Add OTel auto-instrumentation to the FastAPI endorser service with asyncpg and SQLAlchemy tracing.
Requirements:
- Add
opentelemetry-instrumentation-fastapi,opentelemetry-instrumentation-aiohttp-client,opentelemetry-instrumentation-asyncpg,opentelemetry-instrumentation-sqlalchemy - Initialize OTel SDK in
endorser/api/main.py
Acceptance Criteria:
- FastAPI request spans visible in Tempo
- Database query spans (asyncpg / SQLAlchemy) appear as children
- No regression in existing test suite
Labels: phase-2 helm endorser
Estimated Effort: ~30min
Description: Inject OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_ENDPOINT into the endorser deployment.
Acceptance Criteria:
- Env vars present in deployed pod
- Traces appear in Tempo after deployment
Labels: phase-2 instrumentation python didwebvh
Estimated Effort: ~5h
Description: Add OTel auto-instrumentation to the didwebvh FastAPI server including centralized OTel init and SQLAlchemy database tracing.
Requirements:
- Add
opentelemetry-instrumentation-fastapi,opentelemetry-instrumentation-logging,opentelemetry-instrumentation-sqlalchemytoserver/pyproject.toml - Create
server/app/otel.pyfor centralized TracerProvider + BatchSpanProcessor + OTLPExporter setup - Call OTel init from
server/main.pybeforeuvicorn.run - Apply
FastAPIInstrumentor.instrument_app(app)inserver/app/__init__.py - Apply
SQLAlchemyInstrumentor().instrument(engine=self.engine)inserver/app/plugins/storage.py
Acceptance Criteria:
- FastAPI request spans visible in Tempo
- SQLAlchemy/psycopg2 query spans appear as children
- Log correlation enabled (
OTEL_PYTHON_LOG_CORRELATION=true) - No regression in existing test suite
Labels: phase-2 helm didwebvh
Estimated Effort: ~30min
Description: Inject OTel env vars into the didwebvh-server-py deployment.
Requirements:
-
OTEL_SERVICE_NAME,OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_PYTHON_LOG_CORRELATION
Acceptance Criteria:
- Env vars present in deployed pod
- Traces appear in Tempo after deployment
Labels: phase-2 instrumentation typescript credo
Estimated Effort: ~2h
Description: Add OTel instrumentation via a preloader bootstrap wrapper for the credo-ts library and its consuming services.
Requirements:
- Add
@opentelemetry/sdk-node,@opentelemetry/api,@opentelemetry/auto-instrumentations-node,@opentelemetry/exporter-trace-otlp-grpc - Create
otel-wrapper.tsbootstrap preloader - Initialize in the client agent constructor in
packages/core/src/agent/Agent.ts - Add
@opentelemetry/instrumentation-pgfor PostgreSQL or@opentelemetry/instrumentation-sqlite3for SQLite
Note: credo-ts is a library — Helm chart changes target the consuming service's chart.
Acceptance Criteria:
- OTel spans generated for outbound HTTP calls and DB queries
- Traces visible in Tempo from a consuming service
- No regression in existing test suite
Labels: phase-2 helm credo
Estimated Effort: ~30min
Description: Inject OTel env vars into the consuming service's deployment (credo-ts is a library; env vars go on the host service chart).
Requirements:
-
OTEL_SERVICE_NAMEandOTEL_EXPORTER_OTLP_ENDPOINTon the consuming service deployment
Acceptance Criteria:
- Env vars present in consuming service pod
- Traces from credo-ts operations visible in Tempo
Labels: phase-2 instrumentation typescript mediator
Estimated Effort: ~2.5h
Description: Resolve the existing Dockerfile OTel exporter build issue and add OTel instrumentation via a preloader file.
Requirements:
- Resolve Dockerfile build failure: add
@opentelemetry/exporter-trace-otlp-httpand@opentelemetry/exporter-metrics-otlp-httpin the compilation phase - Create/update
apps/mediator/instrumentation.jsas the Node.js preloader - Enable
enhancedDatabaseReporting: truefor@opentelemetry/instrumentation-pgto capture queue operations
Acceptance Criteria:
- Docker image builds without OTel exporter errors
- Mediator HTTP and pg spans visible in Tempo
- No regression in existing behaviour
Labels: phase-2 helm mediator
Estimated Effort: ~30min
Description: Inject OTel env vars into the mediator deployment.
Requirements:
-
OTEL_SERVICE_NAME,OTEL_EXPORTER_OTLP_ENDPOINT(port 4318 HTTP for this service)
Acceptance Criteria:
- Env vars present in deployed pod
- Traces appear in Tempo after deployment
Labels: phase-2 instrumentation typescript bc-wallet
Estimated Effort: ~6h
Description: Add OTel auto-instrumentation to the bc-wallet-demo server with MongoDB/Mongoose database tracing.
Requirements:
- Create
server/src/instrumentation.tsusingNodeSDKwithgetNodeAutoInstrumentations() - Import as first line of
server/src/index.ts(or use--requireflag in start script) - Add
@opentelemetry/instrumentation-mongooseand@opentelemetry/instrumentation-mongodbfor MongoDB
Acceptance Criteria:
- Server HTTP spans visible in Tempo
- MongoDB/Mongoose operations appear as child spans
- No regression in existing test suite
Labels: phase-2 helm bc-wallet
Estimated Effort: ~30min
Description: Inject OTel env vars into the bc-wallet-demo server deployment.
Requirements:
-
OTEL_SERVICE_NAME,OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_NODEJS_AUTO_INSTRUMENTATIONS_ENABLED
Acceptance Criteria:
- Env vars present in deployed pod
- Traces appear in Tempo after deployment