-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tracing): ensure sampling decisions apply to correct trace ID
Kong generates a temporary trace ID when spans are created, this trace ID can be overwritten if tracing headers are passed in the request. Before this change, the global sampling rate from kong.conf was applied to the temporary trace ID, which was only valid for traces created by Kong, and not in distributed tracing scenarios. This commit ensures the sampling decision is only taken once, after headers have been read, when the trace id is final. This ensures Kong's sampling decision matches that of other tracing systems and therefore guarantees that traces are not broken when sampling rates are set to the same values.
- Loading branch information
Showing
3 changed files
with
81 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
message: "**OpenTelemetry:** improved accuracy of sampling decisions." | ||
type: bugfix | ||
scope: Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters