feat: Allow to record spans from nodejs child process

Aperta
#4,766 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #4943 di @vjymisal0 — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
node.js, typescript
Ambito
observability

Direzione di ricerca

Start by reading the run context and how it exposes OTEL_EXPORTER_OTLP_ENDPOINT; then check the linked pull request (#4943) for prior implementation attempts. Explore whether the run context can expose OTEL_EXPORTER_OTLP_HEADERS or an SDK entry point for a child process. Done means a child process can export spans to the correct Trigger.dev run, with the behavior covered by tests.

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

Descrizione

Is your feature request related to a problem? Please describe.

We have a trigger.dev task that clones a repo and spawns a child process to run a script there. Obviously no traces reach the global trigger.dev tracer from separate node process. What would work is if we could register NodeTracerProvider with OTLPTraceExporter set to OTEL_EXPORTER_OTLP_ENDPOINT/OTEL_EXPORTER_OTLP_HEADERS of trigger.dev task (parent process).

OTEL_EXPORTER_OTLP_ENDPOINT is there, but OTEL_EXPORTER_OTLP_HEADERS is not exposed, so no way to direct spans to the right trigger run's trace provider

Describe the solution you'd like to see

Export something like runTracerSdk or maybe expose OTEL_EXPORTER_OTLP_HEADERS as variable on run ctx

Describe alternate solutions

No idea, I currently send child spans through IPC, but it sucks

Additional information

No response

Lingua principale
TypeScript
Stelle
16.5k
Fork
1.5k
Merge medio
1g 15h
PR unite (30g)
17

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 triggerdotdev/trigger.dev

Tutte le issue di triggerdotdev/trigger.dev

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.