Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Span in Kotlin `withTimeout` has wrong parent

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

@mcculls がすでに取り組んでいます。

2025年11月19日 から。

評価

この issue はまだ評価されていません。

説明

type: bug report
Tracer Version(s)

1.54.0

Java Version(s)

21.0.7

JVM Vendor

Other (please specify in comments)

Bug Report

Hi! I have the following code in a Kotlin Ktor server application, when handling an incoming HTTP request:

post("/foo") {
    span("withTimeoutOutside") {
        delay(100)
        withTimeout(500) {
            span("withTimeoutInside") {
                delay(100)
            }
        }
    }
}

I'd expect the root span (for the HTTP request) to have a child of withTimeoutOutside, which has a child of withTimeoutInside. Instead, what I see is this:

Image

This is possibly related to the fixes put in place for https://github.com/DataDog/dd-trace-java/issues/7215.

Let me know if you need me to provide anything else to help with this.

Thanks in advance!

(Am running on OpenJDK 64-Bit Server VM Temurin-21.0.7+6)

Expected Behavior

I'd expect the root span (for the HTTP request) to have a child of withTimeoutOutside, which has a child of withTimeoutInside.

Reproduction Code

No response

主要言語
Java
スター
737
フォーク
361
平均マージ
3日 20時間
マージ済み PR(30日)
173

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

DataDog/dd-trace-java のほかの issue

DataDog/dd-trace-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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