Commit 7efa75b
authored
Enable publishing process context by default (#11288)
Enable publishing process context by default
**What does this PR do?**
This PR changes the default of `PROFILING_PROCESS_CONTEXT_ENABLED` to
`true`, thus enabling publishing of the
[OpenTelemetry process context](open-telemetry/opentelemetry-specification#4719)
by default.
**Motivation:**
When we added this feature, the specification linked above was still a
work-in-progress and that's why we chose to not enable it by default.
As of version 1.62.0 of dd-trace-java we already ship
with the latest version of the spec (that got accepted by
opentelemetry).
Publishing this information will enable the Datadog Full Host Profiler
(which itself is based on the OTel eBPF Profiler) to provide a better
experience when profiling apps using dd-trace-java. (And there's plans
for more features built atop it -- e.g. in the Datadog agent).
This feature is already turned on by default in libdatadog (thus
dd-trace-rb, dd-trace-py, dd-trace-dotnet) + dd-trace-rs + dd-trace-go
and we're working to make sure every lib has it enabled.
**Additional Notes:**
Note that the process context is only supported on Linux, so you won't
see anything on macOS/Linux (outside of docker). The code already
turns those into a no-op, so there's no problem there, just calling it
out for folks interested in testing.
**How to test the change?**
Other than the unit tests, the `otel_process_ctx_dump.sh` script from
[this repo](https://github.com/open-telemetry/sig-profiling/tree/main/process-context/c-and-cpp)
can be used to see the feature working.
Co-authored-by: ivo.anjo <ivo.anjo@datadoghq.com>1 parent ed1f6f9 commit 7efa75b
2 files changed
Lines changed: 4 additions & 19 deletions
File tree
- dd-java-agent/agent-profiling/src/test/java/com/datadog/profiling/agent
- dd-trace-api/src/main/java/datadog/trace/api/config
Lines changed: 3 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 83 | + | |
| 84 | + | |
100 | 85 | | |
101 | 86 | | |
102 | 87 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
0 commit comments