-
Notifications
You must be signed in to change notification settings - Fork 167
Implement new SSI configuration telemetry #3301
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
Conversation
Benchmarks [ tracer ]Benchmark execution time: 2025-07-21 16:24:12 Comparing candidate commit c525ae0 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 177 metrics, 0 unstable metrics. scenario:PDOBench/benchPDOBaseline-opcache
|
loader/dd_library_loader.c
Outdated
| } | ||
| char **ddtrace_ssi_forced_injection_enabled = (char **)DL_FETCH_SYMBOL(module->handle, "ddtrace_ssi_forced_injection_enabled"); | ||
| if (ddtrace_ssi_forced_injection_enabled) { | ||
| *ddtrace_ssi_forced_injection_enabled = getenv("DD_INJECTION_FORCE"); |
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.
| *ddtrace_ssi_forced_injection_enabled = getenv("DD_INJECTION_FORCE"); | |
| *ddtrace_ssi_forced_injection_enabled = force_load ? "True" : "False"; |
At least according to the document it should be only one of those values, not the raw value?
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.
I implemented it the same way as in Ruby: https://github.com/DataDog/dd-trace-rb/pull/4737/files#diff-106f688b0baf1218c65023cab312b14ccff2fbf78f07e09bb9c2dde05da93f95R145-R157
@mabdinur what do you think?
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.
Well, at least it would not report it correctly when force_load is set via ini.
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.
Good catch!
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.
Updated as you suggested
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.
Yup it should ideally be a Boolean but this behavior is not consistent across libraries. The .NET tracer reports raw configuration values to the instrumentation telemetry platform. Python reports the processed values. Other libraries do a mix of the two. This issue should be resolved by the config chaining initiative. Here we should go with the simplest implementation.
The ruby implementation is incomplete. I'll update it later today.
loader/dd_library_loader.c
Outdated
| } | ||
| char **ddtrace_ssi_injection_enabled = (char **)DL_FETCH_SYMBOL(module->handle, "ddtrace_ssi_injection_enabled"); | ||
| if (ddtrace_ssi_injection_enabled) { | ||
| *ddtrace_ssi_injection_enabled = getenv("DD_INJECTION_ENABLED"); |
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.
Stupid question, not related to this PR, but we don't make use of that variable at all currently, right?
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.
You're correct. We don't need it.
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.
Then this configuration feels misleading, I think we only should report what we actually use. We don't use that config, so we should not report it.
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.
cc @mabdinur WDYT? Again, it is similar to what's done in Ruby I think
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.
This is the same approach we also used in Java and .NET. It was used to simplify the implementation and testing. These fields could also be used in debug logs or by other products (I believe it's used by the profiler in Python).
I dont have a strong opinion here. As long as we capture the right telemetry names and values this change looks good to me.
9c29c6c to
33719c5
Compare
33719c5 to
75d6075
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3301 +/- ##
==========================================
- Coverage 61.92% 61.80% -0.12%
==========================================
Files 140 140
Lines 12356 12356
Branches 1616 1616
==========================================
- Hits 7651 7637 -14
- Misses 3995 4008 +13
- Partials 710 711 +1 see 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
bwoebi
left a comment
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.
All comments addressed, nice :-)
Description
Implement https://docs.google.com/document/d/1wydXj2fW0V0jaWU6W9pIbipT_AXD15tmbTtOPXFBEy4/edit?tab=t.nun42691l9k2 for PHP
https://datadoghq.atlassian.net/browse/INPLAT-577
System-tests PR: DataDog/system-tests#4797
Reviewer checklist