Context
SubTrackr spans mobile, backend, ML service, smart contracts, and SDK layers. Diagnosing performance issues and errors across this distributed architecture currently requires manually correlating logs from each service—there is no unified trace context propagating across service boundaries.
\
\
Current Limitation
\
- No trace context propagation across service calls
\
- Request latency breakdown by service is unavailable
\
- Error correlation across services requires manual log scraping
\
- Mobile-to-backend trace context is not propagated
\
- ML model inference latency cannot be attributed to specific user requests
\
\
Expected Outcome
End-to-end distributed tracing with W3C Trace Context propagation across mobile app, backend API, ML service, and webhook callbacks, enabling flame graph visualization of request flows and latency attribution to individual service hops.
\
\
Acceptance Criteria
\
\
Technical Scope
\
- Files:
backend/services/shared/monitoring.ts, ml-service/main.py, src/services/network/apiClient.ts, backend/services/notification/webhook.ts, infra/ (otel-collector config)
\
- APIs: OpenTelemetry JS SDK, OpenTelemetry Python SDK, W3C Trace Context, Zipkin/Jaeger exporters
\
- Edge cases: Trace context header size limits, sampling decision consistency across services, dropped trace contexts on retry, privacy (PII in span attributes)
Context
SubTrackr spans mobile, backend, ML service, smart contracts, and SDK layers. Diagnosing performance issues and errors across this distributed architecture currently requires manually correlating logs from each service—there is no unified trace context propagating across service boundaries.
\
\
Current Limitation
\
\
\
\
\
\
\
Expected Outcome
End-to-end distributed tracing with W3C Trace Context propagation across mobile app, backend API, ML service, and webhook callbacks, enabling flame graph visualization of request flows and latency attribution to individual service hops.
\
\
Acceptance Criteria
\
\
\
\
\
\
\
\
\
\
\
Technical Scope
\
backend/services/shared/monitoring.ts,ml-service/main.py,src/services/network/apiClient.ts,backend/services/notification/webhook.ts,infra/(otel-collector config)\
\