Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Span in Kotlin `withTimeout` has wrong parent

Aperta
#9,890 3 commenti 1 reazione 1 assegnatario Vedi su GitHub

@mcculls ci sta già lavorando.

Dal 19/11/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
Java
Stelle
737
Fork
361
Merge medio
3g 20h
PR unite (30g)
173

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DataDog/dd-trace-java

Tutte le issue di DataDog/dd-trace-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.