Skip to content

Add Jaeger tracing and OTEL verification to E2E#12

Open
AquiGorka wants to merge 6 commits intomainfrom
feat/otel-instrumentation
Open

Add Jaeger tracing and OTEL verification to E2E#12
AquiGorka wants to merge 6 commits intomainfrom
feat/otel-instrumentation

Conversation

@AquiGorka
Copy link
Contributor

@AquiGorka AquiGorka commented Mar 12, 2026

Summary

  • Adds Jaeger all-in-one container to docker-compose.yml with healthcheck, and to up.sh/down.sh with readiness poll and log routing
  • Adds OTel adapter (tracer.ts) implementing SDK's MoonlightTracer with withActiveSpan for W3C traceparent propagation
  • Wraps all E2E steps in withE2ESpan for distributed tracing; passes sdkTracer through deposit/send/receive/withdraw flows
  • Adds auth.* and bundle.* spans with 429 retry logic in bundle submission
  • Collects trace IDs and writes e2e-trace-ids.json for deterministic verification
  • Adds verify-otel.ts with 16 checks using hybrid query strategy (trace-by-ID + time-windowed)
  • Adds step-by-step Jaeger UI navigation guide to e2e/README.md
  • Last commit switches SDK import from local path to jsr:@moonlight/moonlight-sdk@^0.7.0

Note: The last commit (chore: switch SDK import from local path to JSR) switches the E2E SDK dependency to JSR @moonlight/moonlight-sdk@^0.7.0. This version has not been published yet — it requires the SDK OTEL work (moonlight-sdk#30) to be merged and released first. The E2E CI is expected to fail until then. To test locally, revert the last commit so the SDK resolves from the local path.

Test plan

  • ./up.sh starts Jaeger with readiness check before provider
  • deno task e2e passes and writes e2e-trace-ids.json
  • deno task verify-otel passes 16/16 checks
  • Jaeger UI shows 7 E2E traces with distributed SDK → provider spans
  • ./down.sh cleans up Jaeger container and log file

@AquiGorka AquiGorka requested review from fazzatti and toruguera March 12, 2026 17:53
@AquiGorka AquiGorka force-pushed the feat/otel-instrumentation branch from 68f103e to 83d0afd Compare March 12, 2026 18:08
Adds Jaeger all-in-one container to docker-compose with OTLP HTTP
receiver on port 4318 and UI on port 16686. Includes healthcheck,
readiness poll in up.sh, and log routing to jaeger.log. down.sh
cleans up Jaeger logs on teardown.
Adds OTel adapter (tracer.ts) implementing MoonlightTracer with
withActiveSpan for W3C traceparent propagation. All E2E steps wrapped
in withE2ESpan for distributed tracing. SDK tracer passed through to
deposit, receive, send, and withdraw flows. Trace IDs collected and
written to e2e-trace-ids.json for verify-otel consumption. Includes
429 rate limit retry logic in bundle submission.
Validates OpenTelemetry traces in Jaeger after E2E run with 16 checks:
provider function-level spans, auth pipeline, bundle processing,
background services, SDK step/auth/bundle/channel/account spans,
and distributed tracing (shared trace IDs + CHILD_OF references).

Uses hybrid query strategy: trace-by-ID for SDK and distributed
tracing checks, time-windowed service query for provider app spans.
The Jaeger Alpine image doesn't include curl. Switch to wget which
is available by default.
@AquiGorka AquiGorka force-pushed the feat/otel-instrumentation branch 3 times, most recently from 9f13369 to 67ab523 Compare March 12, 2026 18:47
- Add step-by-step Jaeger UI navigation guide to e2e/README.md
- Add Jaeger to architecture diagram and services list
- Update repo README with Jaeger stage, verify-otel command, and troubleshooting
Replaces local path import (../../moonlight-sdk/mod.ts) with
jsr:@moonlight/moonlight-sdk@^0.7.0 and removes transitive
dependency entries that JSR resolves automatically.

Requires SDK 0.7.0+ to be published with tracing support.
@AquiGorka AquiGorka force-pushed the feat/otel-instrumentation branch from 67ab523 to 15e3472 Compare March 12, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant