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

Aperta
#11,800 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
TypeScript
Stelle
165
Fork
84
Merge medio
5h 57m
PR unite (30g)
390

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/gh-aw-firewall

Tutte le issue di github/gh-aw-firewall

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.