-
Notifications
You must be signed in to change notification settings - Fork 309
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
Active tracing configuration #3928
Conversation
Overall package sizeSelf size: 6.13 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3928 +/- ##
==========================================
+ Coverage 84.99% 85.24% +0.24%
==========================================
Files 247 247
Lines 10736 10848 +112
Branches 33 33
==========================================
+ Hits 9125 9247 +122
+ Misses 1611 1601 -10 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-02-26 19:25:13 Comparing candidate commit fec9045 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 260 metrics, 6 unstable metrics. |
…Dog/dd-trace-js into ida613/active-tracing-configuration
Co-authored-by: simon-id <[email protected]>
…Dog/dd-trace-js into ida613/active-tracing-configuration
…Dog/dd-trace-js into ida613/active-tracing-configuration
Co-authored-by: Attila Szegedi <[email protected]>
Co-authored-by: Attila Szegedi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for appsec config.
I've noticed some inconsistencies in the config entries types with _set{type}()
functions, but nothing that can't be fixed later by our team 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good from ci vis' perspective
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config refactor looks good to me for Serverless. Let me know when an RC build is available and I can test it out a bit inside Lambda
I know the PR is merged, but just for clarification, config is split by type instead of by option by design in the new code. This is to make sure that all the options are set for one type before moving on to the other type so that everything happens and is tracked in stages, and is applied in the correct order. Doing every option one by one with some sort of fluent interface would definitely be cleaner, but it wouldn't achieve the intended goal of this PR. |
Co-authored-by: Thomas Hunter II <[email protected]> Co-authored-by: Igor Unanua <[email protected]> Co-authored-by: simon-id <[email protected]> Co-authored-by: Attila Szegedi <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]> Co-authored-by: Igor Unanua <[email protected]> Co-authored-by: simon-id <[email protected]> Co-authored-by: Attila Szegedi <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]> Co-authored-by: Igor Unanua <[email protected]> Co-authored-by: simon-id <[email protected]> Co-authored-by: Attila Szegedi <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]> Co-authored-by: Igor Unanua <[email protected]> Co-authored-by: simon-id <[email protected]> Co-authored-by: Attila Szegedi <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]> Co-authored-by: Igor Unanua <[email protected]> Co-authored-by: simon-id <[email protected]> Co-authored-by: Attila Szegedi <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]> Co-authored-by: Igor Unanua <[email protected]> Co-authored-by: simon-id <[email protected]> Co-authored-by: Attila Szegedi <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]> Co-authored-by: Igor Unanua <[email protected]> Co-authored-by: simon-id <[email protected]> Co-authored-by: Attila Szegedi <[email protected]>
Co-authored-by: Thomas Hunter II <[email protected]> Co-authored-by: Igor Unanua <[email protected]> Co-authored-by: simon-id <[email protected]> Co-authored-by: Attila Szegedi <[email protected]>
What does this PR do?
Adds origin field in telemetry event app-started configuration
Architecture
Each configuration value is set in the following priority: options user passes to the
Config
constructor, environment variable, then default. Telemetry app-started requires the tracer to send configuration values along with which of the three ways each value is set. So for the config values telemetry wants to report, instead of callingcoalesce
, we first call_applyDefaults
, which sets all of them to their default values. Then we call_applyEnvironment
, which sets the config values to their corresponding environment variables if they are available. Lastly we call_setOptions
which applies the available options. The function_merge
finds out which configuration values have been changed and whichcontainer
they are in. This way, we can send the configuration value changes to telemetry, along with their origin.Since this PR changes how a lot of config values are set, we are requesting reviews from ASM, profiling and ci-visibility to make sure everything works as it should.
Additional Notes
Security
Datadog employees:
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!