Technical Debt — Observability & Tracing Gaps
By Engineering Team•September 24, 2026•4 min read
| Metadata | Details |
|---|---|
| System | Platform-Wide Observability & Distributed Tracing |
| Document ID | TD-2026-OBS-001 |
| Author | Engineering Team |
| Status | Open |
This document tracks known implementation gaps in the tracing contract as first-class, ongoing debt items — not as passing “not implemented” notes inside the requirements or architecture docs. SR-003 and the architecture doc link here rather than restating the gap detail.
TD-01 — gRPC-originated Pub/Sub publishes get an empty correlation_id
- Status: Open
- Severity: Medium — the trace still connects via
traceparent(OTel context is unaffected), but the one identifier meant to be “guaranteed the same value on both sides of any hop” (per the central rule’s own rule of thumb) is silently empty for this specific path, breaking a support/on-call agent’s ability to search bycorrelation_idalone for an operation that started as a gRPC call. - Affected component:
rust_lang_core_lib::pubsub::current_message_header, and any Rust gRPC handler that publishes a Pub/Sub message directly from within that handler — confirmed inpayment-service’screate_payment_order(a gRPC-invoked handler that publishes a document-audit event). - Evidence:
rust-lang-core-lib/src/src/pubsub/publisher.rs(lines 26–32) carries its own doc comment: “correlation_idis only ever populated on theREQUEST_CONTEXTtask-local by the HTTP/Axumrequest_loggermiddleware — a gRPC handler … hascorrelation_idas atracingspan field only …, whichget_correlation_id()cannot read back. Calling this from a gRPC-originated context yields an emptycorrelation_iduntil a gRPC-side task-local equivalent exists.” Independently confirmed inrust-lang-core-lib/CLAUDE.md’s own description ofcurrent_message_header, which states the same gap explicitly as “Flagged, not silently swallowed.” - Impact: a
document-auditPub/Sub envelope published frompayment-service’s gRPC-invokedcreate_payment_order(as opposed to its Axum-hosted Razorpay webhook handler) carriestraceparentbut an emptycorrelation_id— the resultingdocument_track/audit record for that specific transaction cannot be found via acorrelation_idsearch, only viatraceparentor its owntransaction_id. - Remediation direction: build a gRPC-side task-local (or span-field read-back) equivalent to the HTTP/Axum
REQUEST_CONTEXTtask-local thatget_correlation_id()currently reads, socurrent_message_headercan resolvecorrelation_ididentically regardless of whether the calling context is HTTP or gRPC. This is scoped torust-lang-core-lib’spubsub/request_logger/grpc::servermodules — no publisher-side change is needed once fixed. - Related requirement: SR-003 NFR-03
TD-02 — Node’s runWithRequestContext wrapping has no codegen safety net
- Status: Open
- Severity: Low — no known production incident yet; a structural risk rather than an observed failure.
- Affected component: every NestJS service/repository/controller method in
tenant-migration/tenant-migration-orchestratorand any future Node service built onnode-lang-core-lib. - Evidence:
node-lang-core-lib/CLAUDE.md’s own “Known gaps” list states directly: “Nogowrap-equivalent tracing-decorator codegen —runWithRequestContextcalls are added by hand at each layer boundary.” Go’sotel.WithSpan[T]wrapping is enforced structurally via ago:generate gowrapdecorator generated once per interface and regenerated on every interface change (see SR-003 FR-11); Rust’s#[tracing::instrument]is a compiler-visible attribute a reviewer can see is missing. Node’s equivalent is a plain function call a developer must remember to add by hand inside every new method body, with nothing that fails a build or a lint pass if it’s forgotten. - Impact: a new Node service/repository/controller method that omits
runWithRequestContextsilently breaks trace continuity for that one method — its logs and spans fall outside the request’sAsyncLocalStoragescope, so it won’t carrytenant_id/correlation_id/traceparent— with no automated signal (test failure, lint error, or build warning) that this happened. - Remediation direction: either a lint rule that flags an exported service/repository/controller method body not calling
runWithRequestContext, or a TypeScript codegen/decorator approach oncenode-lang-core-libgains the.d.tscoverage tracked separately in that library’s own known-gaps list. Out of scope to design fully here — flagged so a future Node-tracing task starts from this gap rather than rediscovering it. - Related requirement: SR-003 FR-10
TD-03 — No cloud/production monitoring integration exists; OTel is wired for local development only
- Status: Open
- Severity: Medium — no production incident possible yet since no production deployment exists, but this is a hard blocker the day a real cloud deployment target is scheduled; better tracked now than discovered under deadline pressure then.
- Affected component: the platform’s entire observability pipeline (traces, logs, metrics) — currently 100% local-Docker-scoped, with no equivalent wiring for any cloud environment.
- Evidence: a repo-wide search found zero Terraform files (
*.tf) or aterraform/directory anywhere in the monorepo (outside unrelated worktree sandboxes and one unrelated blog post about Kong/Terraform); zero references toGOOGLE_CLOUD_PROJECT,otlp.googleapis.com, GCP Cloud Monitoring/Cloud Trace, AWS CloudWatch, or Datadog in any service code or config;.claude/rules/07-deployment-and-local-infra.md(read in full) is entirely Docker-Compose-local-dev scoped, with no cloud deployment target of any kind documented. The local stack itself is real and complete — OTel Collector, Tempo, Prometheus, Loki, Vector, and Grafana are all defined and wired indevelopment/docker-compose.ymlanddevelopment/otel/(see Architecture: Observability Pipeline’s “Local Development Architecture” section) — this gap is specifically about the absence of a cloud counterpart, not a gap in local tooling. - Impact: the moment this platform is deployed anywhere other than a developer’s local Docker stack, there is no monitoring, alerting, log search, or trace lookup available in that environment — an incident in a hypothetical staging/production deployment today would be debugged with no observability tooling at all.
- Remediation direction: introduce infrastructure-as-code (Terraform is the natural choice given no other IaC tool is used anywhere in this repo) that provisions a cloud monitoring workspace (e.g. a GCP project’s Cloud Monitoring/Cloud Trace/Cloud Logging, or an equivalent on another provider) and configures the OTel Collector with an additional cloud exporter (e.g.
googlecloud) alongside its existing local exporters — see Architecture: Observability Pipeline’s “Target Cloud Architecture” table for the component-by-component mapping. This is deliberately scoped as a future task, not designed in full here, since no cloud provider or deployment timeline has been decided. - Related requirement: SR-003 FR-21, BRD-003 BR-08
TD-04 — Central rules document “cadvisor”; the deployed container-metrics service is actually docker-exporter
- Status: Open
- Severity: Low — no functional impact (the deployed service performs the same role, container-level resource metrics via the Docker socket), but a documentation/reality drift that would mislead anyone searching
development/docker-compose.ymlfor a service literally namedcadvisor. - Affected component:
.claude/rules/05-performance-and-metrics.md(“Container-level resource metrics” section) and at least one core-libCLAUDE.md(go-lang-core-lib/CLAUDE.md) both describe this component ascadvisor. - Evidence: no service named
cadvisorexists indevelopment/docker-compose.yml. The actual service isdocker-exporter(imageghcr.io/dlepaux/docker-exporter:latest, host port8091:9713), mounting/var/run/docker.sock:ro— the same role, different tool. - Impact: low — purely a documentation-accuracy issue. This
appDocsset (FR-15, and the Local Development Architecture table above) documents the real name,docker-exporter, rather than repeating the stalecadvisorreference. - Remediation direction: update
.claude/rules/05-performance-and-metrics.mdand any core-libCLAUDE.mdstill sayingcadvisorto saydocker-exporterinstead, in a small, standalone documentation-only change — out of scope for thisappDocsdoc set itself to edit central rules files. - Related requirement: SR-003 FR-15
TD-05 — Flutter’s client-side spans are created but never exported (no-op span processor)
- Status: Open
- Severity: Low — the request is still fully traceable from Nginx onward via the injected
traceparent; only the client-side portion of the trace (time spent inside the mobile app itself, before/after the network call) is invisible. - Affected component:
ui-application/src/lib/core/services/init/otel_tracing_service.dart’sOtelTracingService.init(). - Evidence:
OTel.initialize(...)is called withspanProcessor: _NoopSpanProcessor()— the class’s own code comment states plainly that no collector is wired up yet and spans are created but never exported anywhere. No mobile-reachable OTLP endpoint exists in the codebase to export to even if the processor were swapped. - Impact: a mobile-originated slowdown that happens entirely client-side (e.g. slow local processing before a request is even sent) leaves no trace evidence — only server-side spans starting at Nginx are visible in Tempo.
- Remediation direction: replace
_NoopSpanProcessorwith a realBatchSpanProcessorexporting OTLP to a collector endpoint reachable from a mobile device (notlocalhost— needs a public/VPN-reachable ingress, which doesn’t exist for the local dev OTel Collector today; likely blocked on the same cloud-deployment gap as TD-03 above). - Related requirement: SR-003 NFR-10
TD-06 — React’s frontend logging has no structured format, unlike Flutter’s backend-matching log shape
- Status: Open
- Severity: Low — a readability/correlation gap, not a functional break;
X-Correlation-ID/traceparentheader injection (which is what actually ties a browser request to its backend logs) is unaffected. - Affected component:
ui-admin-application’s frontend logging, built on theloglevelpackage. - Evidence:
ui-admin-application/CLAUDE.md’s “Structured Frontend Logging withloglevel” section requireslog.debug/warn/errorcalls with plain[Component] message-style prefixes (confirmed inapiClient.ts,main.tsx,TenantRepository.ts, and others) — no JSON fields, notrace_id/span_id/correlation_idembedded in the log line itself, unlike Flutter’sAppLog(see FR-23) or any backend core lib’s structured logger. - Impact: a React admin-panel log line cannot be visually or programmatically correlated to its matching backend/trace log the way a Flutter log line can — an engineer debugging from browser devtools console output has no
trace_id/correlation_idprinted alongside the message to cross-reference in Grafana. - Remediation direction: extend
ui-admin-application’s logging wrapper to append the sametrace_id/span_id/correlation_idfields Flutter’sAppLogdoes, sourced from the active OTel span context (already available via the@opentelemetry/apidependency already inpackage.json) — a moderate-sized, self-contained frontend change, not blocked on any other gap in this document. - Related requirement: SR-003 NFR-11