ADR 0008: The analytics projector sets up telemetry; every backend Deployment sets ENVIRONMENT
Status
Accepted (2026-10-13, ecosystem gap fix D21). Additive: no contract, table or topic changes.
Context
product-master ships four binaries. cmd/api, cmd/mcp and
cmd/product-reports call telemetry.Setup
(internal/adapters/outbound/telemetry): an OTLP/gRPC TracerProvider and
MeterProvider, the W3C trace-context + baggage propagator and Go runtime
metrics, with the resource attributes service.name, service.version
(SERVICE_VERSION) and deployment.environment.name (ENVIRONMENT).
cmd/product-projector (ADR 0006) did not:
it exported nothing, so the analytics writer was the one process of the
context invisible in the Collector.
The chart had the matching gap: the reports Deployment did not set
ENVIRONMENT, so in-cluster the reports binary reported local, and the
projector Deployment set none of the telemetry variables.
The fleet decision (gap-fix wave 2026-10-12, D21) is observability parity:
projectors and reports binaries that lack telemetry get telemetry.Setup
like their siblings, and reports Deployments get ENVIRONMENT.
Decision
cmd/product-projectorcallstelemetry.Setupat boot, after the config is validated and before the analytical database is opened, with service nameproduct-master-projector,SERVICE_VERSION(defaultdev) andOTEL_EXPORTER_OTLP_ENDPOINT(defaultlocalhost:4317);ENVIRONMENTis read by the telemetry adapter as in the other binaries. It logstelemetry configuredand flushes the providers (5 s bound) after the consumer and the pool are closed. Export stays non-blocking: an unreachable Collector only drops telemetry.- The projector opens no spans and serves no
/metricsbecause of this ADR; it gains Go runtime metrics, the resource identity and the propagator. - The chart sets
ENVIRONMENT(fromenvironment) andSERVICE_VERSIONon every backend Deployment (api, mcp, projector, reports), andOTEL_EXPORTER_OTLP_ENDPOINTon all four whenotel.enabled.
Consequences
- The projector appears in the Collector as
product-master-projectorwith version and environment, and reports Go runtime metrics every 30 s. - The reports binary reports its real environment in-cluster.
- One more process exports to the Collector.
- Sensors:
TestSetupTelemetry_InstallsTheSDKProviders(cmd/product-projector) and the D21 block ofcharts/product-master/tests/render_test.sh(CI jobchart-tests).