-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(opentelemetry): sampling rate configuration option #12054
Merged
Merged
Conversation
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
5a274fa
to
dd86fae
Compare
bbe9d37
to
d9a8f15
Compare
2ca76af
to
ee064c8
Compare
ee064c8
to
312cbc8
Compare
312cbc8
to
45242fa
Compare
f103f9a
to
708200b
Compare
45242fa
to
32f754c
Compare
Sampling rate can now be set via the Opentelemetry plugin instead of it just being a global setting for the gateway. It also fixes a small bug where, in the edge case of opentelemetry being used for propagation only (instrumentations disabled), the `sampled` flag was incorrectly set to `true` although no span was sampled for that request. Includes tests to cover more configuration scenarios (esp. different sampling rates) and verify propagation is done correctly.
32f754c
to
ec80b2a
Compare
brentos
reviewed
Dec 20, 2023
chobits
reviewed
Dec 21, 2023
hanshuebner
approved these changes
Dec 21, 2023
brentos
approved these changes
Dec 21, 2023
chobits
approved these changes
Dec 22, 2023
chobits
pushed a commit
to chobits/kong
that referenced
this pull request
Dec 22, 2023
Sampling rate can now be set via the Opentelemetry plugin instead of it just being a global setting for the gateway. It also fixes a small bug where, in the edge case of opentelemetry being used for propagation only (instrumentations disabled), the `sampled` flag was incorrectly set to `true` although no span was sampled for that request. Includes tests to cover more configuration scenarios (esp. different sampling rates) and verify propagation is done correctly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Sampling rate can now be configured by plugin (OTel) instead of it just being a global setting
If not configured, the global setting still applies.
This also fixes a small bug where, in the edge case of opentelemetry being used for propagation only (instrumentations disabled), the
sampled
flag was incorrectly set totrue
although no span was sampled for that request.Includes tests to cover more configuration scenarios (esp. different sampling rates) and verify propagation is done correctly.
Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdFull changelog
config.sampling_rate
that allows setting sampling_rate "by plugin" instead of globally.Issue reference
KAG-3126