Skip to content

Commit

Permalink
check concatenated string
Browse files Browse the repository at this point in the history
  • Loading branch information
nenadnoveljic committed Nov 19, 2024
1 parent 0be2f15 commit f95f8e4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ public void setApplicationName(AgentSpan span, Connection connection) {
return;
}
final String traceParent = DECORATE.traceParent(span, priority);
if (traceParent == null
|| !traceParent.matches("^00-[a-f0-9]{32}-[a-f0-9]{16}-[a-f0-9]{2}$")) {
throw new IllegalArgumentException("Invalid trace parent: " + traceParent);
}
final String traceContext = "_DD_" + traceParent;

// SET doesn't work with parameters
Expand Down

0 comments on commit f95f8e4

Please sign in to comment.