profiler: use only one service version value #2322
Merged
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?
Users can set the version tag for profiles in three ways: via
WithVersion
, theDD_VERSION
environment variable, or viaWithTags
. Aservice should only have one version tag at a time for profile
comparison with a "recent" version to work properly in the UI. Today,
all of these options can be used at once and the profiles for a service
can have multiple version tags.
To be consistent with the tracer, we should supply a single version and
it should be configured with the following priority order: first,
WithVersion
is used. If that option is not set, thenDD_VERSION
will beused. If either of those are used, then they get priority over any
version tags supplied via
WithTags
. That is, version tags are removed ifthe version is explicity set.
Reviewer's Checklist
For Datadog employees:
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!