-
Notifications
You must be signed in to change notification settings - Fork 375
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
Tracing Dynamic Configuration #2848
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
marcotc
force-pushed
the
tracing-remote-configuration
branch
from
June 19, 2023 21:32
2ad7381
to
c4871d7
Compare
marcotc
force-pushed
the
tracing-remote-configuration
branch
from
June 19, 2023 21:34
c4871d7
to
a734980
Compare
github-actions
bot
added
dev/ci
Involves CircleCI, GitHub Actions, or GitLab
dev/github
Github repository maintenance and automation
dev/testing
Involves testing processes (e.g. RSpec)
docs
Involves documentation
release
Official release
and removed
tracing
core
Involves Datadog core libraries
labels
Jun 19, 2023
marcotc
added
feature
Involves a product feature
and removed
release
Official release
dev/github
Github repository maintenance and automation
dev/testing
Involves testing processes (e.g. RSpec)
dev/ci
Involves CircleCI, GitHub Actions, or GitLab
docs
Involves documentation
labels
Jun 22, 2023
marcotc
force-pushed
the
tracing-remote-configuration
branch
from
July 20, 2023 22:16
d74d5b1
to
df3227d
Compare
github-actions
bot
added
appsec
Application Security monitoring product
core
Involves Datadog core libraries
integrations
Involves tracing integrations
tracing
labels
Jul 20, 2023
Codecov Report
@@ Coverage Diff @@
## master #2848 +/- ##
==========================================
- Coverage 98.08% 98.08% -0.01%
==========================================
Files 1309 1316 +7
Lines 73439 73820 +381
Branches 3378 3385 +7
==========================================
+ Hits 72031 72403 +372
- Misses 1408 1417 +9
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
TonyCTHsu
approved these changes
Jul 25, 2023
marcotc
force-pushed
the
tracing-remote-configuration
branch
from
July 26, 2023 19:32
746dea5
to
afb8bee
Compare
Merged
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.
Adds support for the
ddtrace
to receiveAPM_LIBRARY
Dynamic Configuration, through the existing Remote Configuration channel, and applies these changes to the local application.Dynamic Configuration has precedence over locally configured values.
Dynamic Configuration can be disabled at any point in time, restore the locally configured values.
This PR passes our new system-tests for Dynamic Configuration: DataDog/system-tests#1172
Notes
All components are safely reconfigured on-the-fly;
ddtrace
doesn't need to be reconfigured (Datadog.configure{}
) for them to apply.In fact, invoking
Datadog.configure{}
to apply Remote Configuration has several issues:Datadog.configure{}
every 5 seconds. We could track the value changes ourselves, but now we are adding an unnecessary complexity layer on a system that has already solved it for us.Datadog.configure{}
, which causes the reconfiguration process itself to be aborted (the active thread is killed) andddtrace
ends up in an inconsistent state.Datadog.configure{}
to a separate execution context (e.g. another thread) opens room for race conditions, especially when the new Remote Configuration component initializes and tries to apply Remote Configuration values very quickly. I tried adding synchronization mechanisms, buy my tests were consistently deadlocking.Moving Remote Configuration outside of Components is likely an option, but the complexity is quite large was we'd need a separate lifecycle management mechanism for it, and it depends on configuration values (e.g.
agent.host
,remote.enabled
), which are naturally configured alongside the Component lifecycle management. I did not attempt this, as it seemed like its own project, but I think it's worth discussing.