-
Notifications
You must be signed in to change notification settings - Fork 160
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
Implement OTel config remapping #2691
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2691 +/- ##
============================================
- Coverage 79.33% 77.78% -1.55%
Complexity 2223 2223
============================================
Files 200 227 +27
Lines 22371 26531 +4160
Branches 0 988 +988
============================================
+ Hits 17747 20637 +2890
- Misses 4624 5368 +744
- Partials 0 526 +526
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 26 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
OTEL_METRICS_EXPORTER=none | ||
--INI-- | ||
OTEL_SERVICE_NAME=other service | ||
OTEL_LOG_LEVEL=warn |
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's also a special case where OTEL_LOG_LEVEL=debug
should set DD_TRACE_DEBUG=true
. Is that change achievable with the current code?
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.
We have it the other way round: DD_TRACE_DEBUG=true sets DD_TRACE_LOG_LEVEL=debug. So it does not make much sense to do that here, except that it would confuse telemetry to distinguish the provenance of the configs.
BenchmarksBenchmark execution time: 2024-06-07 15:02:45 Comparing candidate commit 89bcbe1 in PR branch Found 0 performance improvements and 3 performance regressions! Performance is the same for 175 metrics, 0 unstable metrics. scenario:LaravelBench/benchLaravelBaseline-opcache
scenario:MessagePackSerializationBench/benchMessagePackSerialization
scenario:PDOBench/benchPDOOverheadWithDBM
|
7287b9d
to
969e9ae
Compare
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 from the API side
ext/otel_config.c
Outdated
|
||
static void report_otel_cfg_telemetry_invalid(const char *otel_cfg, const char *dd_cfg) { | ||
if (ddtrace_sidecar && get_DD_INSTRUMENTATION_TELEMETRY_ENABLED()) { | ||
UNUSED(otel_cfg, dd_cfg); |
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.
to be removed?
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.
yes
ext/otel_config.c
Outdated
tags.len = asprintf((char **)&tags.ptr, "config.opentelemetry:%s,config.datadog:%s", otel_cfg, dd_cfg); | ||
ddog_sidecar_telemetry_add_span_metric_point_buffer(buffer, DDOG_CHARSLICE_C("tracers.otel.env.invalid"), 1, tags); | ||
free((char *)tags.ptr); | ||
ddog_sidecar_telemetry_buffer_flush(&ddtrace_sidecar, ddtrace_sidecar_instance_id, &DDTRACE_G(telemetry_queue_id), buffer); |
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.
Are you sure DDTRACE_G(telemetry_queue_id);
is initialized at that point?
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.
No, it isn't, good point.
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.
Except 1 comment, 👍
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
…d is allocated Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
4d63cda
to
52d87bc
Compare
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
52d87bc
to
89bcbe1
Compare
* Implement OTel config remapping Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com> * Use global buffer for telemetry to avoid sending before the request id is allocated Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com> * Fix c&P failure * Update libdatadog Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com> --------- Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
As per GDoc.