Feature: allow custom tags on JUnit 4 ignored tests (onTestIgnore / fireTestIgnored)
メンテナーはふだん 2 日以内に返信
@daniel-mohedano がすでに取り組んでいます。
2026年5月22日 から。
評価
この issue はまだ評価されていません。
説明
Library Name
dd-java-agent
Library Version(s)
1.60.3
Describe the feature you'd like
| Section | Content |
|---|---|
| Problem | Need is_ignored custom tags (and optional skip reason) on agent-reported ignored tests in CI with javaagent + Gradle. |
| Current behavior | onTestIgnore does start → skip → end synchronously; app RunListener.testIgnored runs outside that window, so Span.current() / manual DDTest either don’t tag the agent test or create a second session (suite conflicts). |
| Desired behavior | Hook to set tags on the same test span Datadog creates for @Ignore / fireTestIgnored, e.g. public API, TestEventsHandler callback, or documented extension point. |
| Environment | JUnit 4, dd-java-agent 1.60.3, Kotlin kotlin.test.Ignore + JVM Robolectric, Buildkite. |
Is your feature request related to a problem?
I try to set custom tag on @Ignore test with Datadog Test Optimization with Java Tests on an android project, and notice that there is no active span, as Span.current() is not working for @Ignore test.
Below is the sample code:
class TestIgnoredListener : RunListener() {
override fun testIgnored(description: Description) {
Span.current().setAttribute("is_ignored", true)
}
}
class CustomRobolectricTestRunner(testClass: Class<*>) : RobolectricTestRunner(testClass) {
...
override fun run(notifier: RunNotifier) {
notifier.addListener(TestIgnoredListener())
super.run(notifier)
}
...
}
@RunWith(CustomRobolectricTestRunner::class)
class CreateThreadPickMediaTest {
...
@Test
@Ignore(
"java.lang.SecurityException: " +
"Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider" +
" requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs"
)
fun givenPickMediaIntent_whenPickMedia_thenImagePreviewContentIsShown() {
...
}
...
}
Describe alternatives you've considered
Tried Manual Testing API (CIVisibility + DDTest#setTag) only without javaagent, too much works to write all the RunListener on my own (similar to dd-java-agent JUnit4TracingListener).
Additional context
No response
- 主要言語
- Java
- スター
- 736
- フォーク
- 364
- 平均マージ
- 3日 13時間
- マージ済み PR(30日)
- 213
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DataDog/dd-trace-java のほかの issue
-
type: bug report
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DataDog/dd-trace-java#12818 ·
メンテナーはふだん 2 日以内に返信
-
Update DEFAULT_HTTP_CLIENT_ERROR_STATUSES to include 5xx status codes再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンtype: feature request
難易度 1/5 1〜3時間 初心者へのやさしさ 70/100
DataDog/dd-trace-java#10245 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Startup ~2x slower with AOT class linking: agent retransforms ~22k preloaded classes (JDK 25, 1.67.0)対応中かも @mcculls が 2 日前に担当しました。 オープンtype: bug report
DataDog/dd-trace-java#12795 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
gRPC server instrumentations (grpc-1.5, armeria-grpc) don't make extracted W3C baggage current in the handler対応中かも @mcculls が 12 日前に担当しました。 オープンcomp: context propagation inst: grpc type: feature request
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
DataDog/dd-trace-java#12654 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
DataDog/dd-trace-java#12608 ·
メンテナーはふだん 2 日以内に返信
DataDog/dd-trace-java の issue をすべて見る
似ている issue
-
`GET /v1/event/token/{uuid}` can report a BOM upload as done before policy evaluation and metrics have finished対応中かも @Zargath が今日担当しました。 オープンdefect in triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DependencyTrack/dependency-track#7646 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
floci-io/floci#5425 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
objectionary/eo-graphs#80 ·
-
WebMvcStreamableServerTransportProvider: idle-session eviction stops permanently after a NullPointerException when a session is deleted mid-sweep対応中かも @lejuho が今日担当しました。 オープンstatus: waiting-for-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
spring-projects/spring-ai#7133 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
objectionary/jucs#141 ·
メンテナーはふだん 1 日以内に返信