Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
iunanua committed Nov 14, 2024
1 parent 55aeb13 commit c52e69a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/dd-trace/src/appsec/sdk/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ function getRootSpan (tracer) {
const parent = started.find(s => s.context()._spanId === parentId)
const pContext = parent?.context()

if (pContext) {
parentId = pContext._parentId

if (!pContext._tags?._inferred_span) {
span = parent
}
} else {
break
if (!pContext) break

parentId = pContext._parentId

if (!pContext._tags?._inferred_span) {
span = parent
}
}

Expand Down

0 comments on commit c52e69a

Please sign in to comment.