@sentry/cloudflare: stubs from namespace.jurisdiction() bypass Durable Object instrumentation
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
packages/cloudflare/src/instrumentations/instrumentDurableObjectNamespace.ts から始めます。ここでは現在、get トラップが get と getByName を特別扱いしています。他の namespace 関数がどのようにバインドされているかを追跡し、jurisdiction() が RPC トレースの伝播を伴う再帰的に計装された namespace を返すことを確認します。完了の条件は、jurisdiction に制限された namespace を通じて取得したスタブが、直接の namespace 呼び出しと同じ fetch スパンおよび sentry_rpc_meta の動作を生成することです。
索引モデルが issue の本文から書いたものです。
説明
Environment
@sentry/cloudflare: 10.74.0 (also present ondevelopand11.0.0-beta.2)- Caller wrapped with
Sentry.withSentry(),enableRpcTracePropagation: true - Durable Object namespace restricted to a jurisdiction (
env.MY_DO.jurisdiction('eu'))
Description
instrumentDurableObjectNamespace wraps get and getByName so the returned stub gets fetch spans and
RPC trace propagation. Every other function on the namespace, including jurisdiction, goes through
value.bind(target), so a jurisdiction-restricted namespace is the raw binding. Stubs from it get
no fetch span and never append __sentry_rpc_meta__.
That applies to every Durable Object call from an app that uses data-location jurisdictions (for
example EU residency). The traces break at the Durable Object boundary. Combined with the receiver-side gap in #24443, the receiver
also loses all of its telemetry.
Reproduction
const ns = env.MY_DO.jurisdiction('eu');
const stub = ns.get(ns.idFromName('x'));
await stub.someRpcMethod('a'); // receiver sees no __sentry_rpc_meta__; no caller-side span
Compare with env.MY_DO.get(env.MY_DO.idFromName('x')), which does propagate.
Expected
jurisdiction() returns a namespace instrumented the same way, i.e.
instrumentDurableObjectNamespace(value.apply(target, args), propagateRpcTrace).
Code
packages/cloudflare/src/instrumentations/instrumentDurableObjectNamespace.ts: the get trap only
special-cases get/getByName.
- 主要言語
- TypeScript
- スター
- 8.7k
- フォーク
- 1.9k
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 576
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-javascript のほかの issue
-
Browser Bug Next.js Traces Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/sentry-javascript#24672 · コメント 1 件 ·
-
Flaky Test React Router Framework Spans Tests
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-javascript#24348 · コメント 1 件 ·
-
javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/sentry-javascript#24200 · コメント 2 件 ·
-
javascript Task
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
getsentry/sentry-javascript#24134 · コメント 1 件 ·
-
Cloudflare Workers javascript Tests
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-javascript#24051 · コメント 1 件 ·
getsentry/sentry-javascript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·