ddtrace/tracer: put hostname detection behind a compat environment variable #2786
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Sets hostname detection off by default and behind a compat environment variable
DD_TRACE_CLIENT_HOSTNAME_COMPAT
to allow customers relying in this feature - if any - to activate it. Valid value to use it isv1.66.0
.Deprecates the environment variable
DD_CLIENT_HOSTNAME_ENABLED
because it wasn't publicly documented, as it was part of an experiment.In case somebody internally wants to keep generating the
_dd.tracer_hostname
, the new environment variable will allow them to do it, but we are defaulting to disable it to reduce impact in customers, as benchmarks show.Note: this feature will be deleted after 6 releases, unless we find people relying on it.
Motivation
Hostname detection on the tracer was introduced as an experiment. After some time, we've decided to deprecate this by setting it off by default as it's causing some nuisances in customers.
Reviewer's Checklist
Unsure? Have a question? Request a review!