fix: apply //dd:orchestrion-enabled to tracer-internal modules#223
Conversation
The //dd:orchestrion-enabled directive aspect is currently not applied to tracer-internal modules. dd-trace-go will rely on this directive to detect whether it was built with Orchestrion. So, set "tracer-internal: true" for the directive. I happened to notice this was broken while trying to add Orchestrion-related information to the profiler uploads. The `internal/orchestrion.Enabled` function in dd-trace-go was always returning false, even when built with Orchestrion.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #223 +/- ##
=======================================
Coverage 61.82% 61.82%
=======================================
Files 93 93
Lines 5027 5027
=======================================
Hits 3108 3108
Misses 1592 1592
Partials 327 327
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@eliottness The integration tests are failling with this change. Example. I think it's due to this part in dd-trace-go: The |
If the log level is set via `--log-level`, set the corresponding environment variables so that the child processes will get it. This was done for `--log-file` already, but only if it was originally a relative path. Propagate it always. I noticed this when investigating #223. I was setting the log level to "trace" via the command line and didn't see much output. It took me a bit to realize that the setting wasn't picked up by all the workers. I set the env var instead, but ideally the command line argument works the same way :)
### What does this PR do? If the log level is set via `--log-level`, set the corresponding environment variables so that the child processes will get it. This was done for `--log-file` already, but only if it was originally a relative path. Propagate it always. ### Motivation I noticed this when investigating #223. I was setting the log level to "trace" via the command line and didn't see much output. It took me a bit to realize that the setting wasn't picked up by all the workers. I set the env var instead, but ideally the command line argument works the same way :) ### Reviewer's Checklist - [ ] Changed code has unit tests for its functionality.
|
This particular fix is also present in #225, which also includes a monkey-patch for the current issue in |
…on-enabled-internal # Conflicts: # _integration-tests/go.mod # _integration-tests/go.sum # go.mod # go.sum # internal/injector/builtin/generated.go # samples/go.mod # samples/go.sum
|
This actually needs #232 before the CI will consistently pass; it is currently flaky due to re-use of improperly cleaned up |
//dd:orchestrion-enabled to tracer-internal modules
…on-enabled-internal # Conflicts: # internal/injector/builtin/generated.go
What does this PR do?
The //dd:orchestrion-enabled directive aspect is currently not applied to
tracer-internal modules. dd-trace-go will rely on this directive to detect
whether it was built with Orchestrion. So, set "tracer-internal: true" for the
directive.
Nothing seems to be broken right now. I'm not sure the best way to test this, at
least in this PR. I'm working on an integration test for the profiler when
built with Orchestrion. Once that's up and running, it will break if the
profiler relies on the directive to add Orchestrion-related info. And
presumably once we start relying on goroutine-local storage for context, stuff
will break if the directive doesn't work in dd-trace-go?
Motivation
I happened to notice this was broken while trying to add Orchestrion-related
information to the profiler uploads. The
internal/orchestrion.Enabledfunction in dd-trace-go was always returning false, even when built with
Orchestrion.
Reviewer's Checklist