feat: Allow to record spans from nodejs child process

オープン
#4,766 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

  • #4943 @vjymisal0 による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
node.js, typescript
領域
observability

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
16.5k
フォーク
1.5k
平均マージ
1日 15時間
マージ済み PR(30日)
17

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

triggerdotdev/trigger.dev のほかの issue

triggerdotdev/trigger.dev の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。