[smoke-otel-tracing] OTEL smoke: jest flag silently skipped, diagnostic path mismatch, api-proxy spans unverified

Open
#11,800 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, typescript

Research direction

Start with .github/workflows/smoke-otel-tracing.md and its compiled .lock.yml; compare the Jest command and diagnostic log paths, then trace the api-proxy log host mapping from containers/api-proxy/otel.js. The issue reports that --testPathPatterns passes 75 tests. Confirm the mapping and span output in the post-step; done when the workflow fails on Jest errors, reads the correct log, and verifies api-proxy spans and token attributes.

Written by the indexing model from the issue text.

Description

automation otel smoke-test tracing

Smoke run 44409831996 (PR #11794) found three defects in .github/workflows/smoke-otel-tracing.md and its compiled .lock.yml.

1. Test step never runs tests (unexpected failure)

The "Run api-proxy OTEL tests" step runs npx jest --verbose --ci --testPathPattern='otel' 2>&1 || true. The installed Jest (30.1.3) rejects --testPathPattern with Option "testPathPattern" was replaced by "--testPathPatterns" and exits 1. The || true hides this, so the step reports success with no tests run.

Running npx jest --ci --testPathPatterns='otel' in containers/api-proxy passes: 3 suites, 75/75 tests (otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js).

Fix: use --testPathPatterns in both the .md and .lock.yml, and remove || true so a failing invocation fails the step.

2. Diagnostic path mismatch
  • smoke-otel-tracing.md post-step reads /tmp/gh-aw/sandbox/firewall/logs/api-proxy/otel.jsonl.
  • The compiled .lock.yml reads /tmp/gh-aw/sandbox/firewall/logs/api-proxy-logs/otel.jsonl.

The api-proxy writes /var/log/api-proxy/otel.jsonl inside the container (containers/api-proxy/otel.js). Confirm the host mapping, fix the source, and recompile.

3. api-proxy span export not verified

At agent time, /tmp/gh-aw/sandbox/firewall/logs was empty. The only exported span was gh-aw.agent.setup (in /tmp/gh-aw/otel.jsonl), not an api-proxy request span, so no gen_ai.usage.* attributes were observed. The post-step runs after the agent, so confirm span export and token attributes in that step's output for this run.

Passing scenarios
  • otel.js loads; isEnabled() returns true; exports include startRequestSpan, setTokenAttributes, endSpan, endSpanError, shutdown.
  • Env forwarding: GITHUB_AW_OTEL_TRACE_ID and GITHUB_AW_OTEL_PARENT_SPAN_ID in env-passthrough.ts; GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, and both trace IDs in api-proxy-env-config.ts.
  • onUsage hook present in containers/api-proxy/token-tracker-http.js.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

  • expires on Nov 25, 2026, 10:37 PM UTC
Dominant language
TypeScript
Stars
165
Forks
84
Avg merge
5h 57m
Merged PRs (30d)
390

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-aw-firewall

All issues in github/gh-aw-firewall

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.