Support span links for auto-instrumented network spans on Android

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
32/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
android, kotlin

調査の方向性

No Android networking integration, context-management files, or tests are named. Start by locating the Android auto-instrumented network-span and span/context APIs, then compare the linked OpenTelemetry and Sentry span-link guidance. Done requires an agreed API or instrumentation hook that preserves the existing parent, supports explicit links, and has verified Trace View behavior.

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

説明

Android Feature Platform: Java Spans
Problem Statement

An Android application using Kotlin needs to associate an auto-instrumented network span with other relevant operations while retaining one parent.

A simplified illustration of the requested workflow:

  1. Operation A supplies the current context for network span parenting.
  2. Operation B is also running outside that context.
  3. A network request creates span N under A.
  4. The requester wants to link N to B as well, potentially across traces.

The requester described bindToScope in their mobile setup and asked for both Cocoa and Android support. They have not supplied the Android networking integration or context-management code. This is not a verified Android bug reproduction.

  • Choosing one parent leaves other overlapping operations out of the debugging context.
  • The requester thinks viewing and following links in Trace View may be sufficient. Navigation direction and a need for search, filtering, or aggregation remain unconfirmed.
  • No workaround for the additional relationships has been reported. A rollout blocker and quantified debugging cost have not been established.
  • A seven-day telemetry sample observed sentry.java.android 8.53.0 and 8.47.0 on September 24, 2026. These are deployed versions, not verified minimum affected versions. Kotlin Multiplatform is not confirmed and is outside this request's scope.
Solution Brainstorm

Provide a supported way to add links to auto-instrumented network spans without replacing their parent or duplicating the span.

  • OpenTelemetry's span-link documentation describes links to one or more spans as causal relationships. The requester asked to link all active spans but welcomes guidance. Time overlap alone does not establish causality, so automatic linking to every active span is not a requirement.
  • Sentry's span-link development guidance describes links at span creation and an addLink method on the span interface. Links identify the target trace and span. This is the proposed model, not evidence that Android implements these APIs.
  • Assess which API or instrumentation hook would let application code attach links to automatically created network spans. The desired result is to inspect and follow those relationships in Trace View. Cross-trace behavior and navigation direction need assessment.

If better parent selection or a view of concurrent operations fits the need better, guidance on that alternative would help.

Related Cocoa request: sentry-cocoa #9165.

via ben.davis.

--

View Junior Session [Sentry]

主要言語
Kotlin
スター
1.4k
フォーク
483
平均マージ
2日 54分
マージ済み PR(30日)
207

環境構築

はじめの一歩

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

getsentry/sentry-java のほかの issue

getsentry/sentry-java の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

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

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