-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
github-actions
bot
added
core/pdk
core/clustering
core/tracing
plugins/opentelemetry
labels
Nov 17, 2023
samugi
force-pushed
the
feat/sampling-rate-by-plugin
branch
from
November 17, 2023 18:00
5a274fa
to
dd86fae
Compare
samugi
changed the title
feat(tracing): sampling rate by plugin
feat(tracing): sampling rate in plugin config
Nov 17, 2023
samugi
force-pushed
the
feat/sampling-rate-by-plugin
branch
3 times, most recently
from
November 20, 2023 16:07
bbe9d37
to
d9a8f15
Compare
samugi
force-pushed
the
feat/sampling-rate-by-plugin
branch
6 times, most recently
from
November 22, 2023 11:11
2ca76af
to
ee064c8
Compare
samugi
changed the title
feat(tracing): sampling rate in plugin config
feat(tracing): Opentelemetry sampling rate configuration option
Nov 22, 2023
samugi
force-pushed
the
feat/sampling-rate-by-plugin
branch
from
November 22, 2023 12:07
ee064c8
to
312cbc8
Compare
samugi
changed the title
feat(tracing): Opentelemetry sampling rate configuration option
feat(opentelemetry): sampling rate configuration option
Nov 22, 2023
samugi
force-pushed
the
feat/sampling-rate-by-plugin
branch
from
November 22, 2023 14:57
312cbc8
to
45242fa
Compare
samugi
force-pushed
the
refactor/tracing-context
branch
2 times, most recently
from
November 24, 2023 16:24
f103f9a
to
708200b
Compare
samugi
force-pushed
the
feat/sampling-rate-by-plugin
branch
from
November 28, 2023 11:12
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.
hanshuebner
force-pushed
the
feat/sampling-rate-by-plugin
branch
from
December 20, 2023 13:35
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