-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[dsd] Support container ID field from dogstatsd 1.2 #10659
Conversation
45b902f
to
d2df487
Compare
d00bc11
to
abe1cb5
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.
Small edit.
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.
Looking good overall. We would need to update our official documentation here to add a new section for version 1.2
.
7f484ba
to
c30af3b
Compare
01ca6e7
to
b428db0
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.
Added a nit-pick on the release note. Looks good otherwise
Co-authored-by: maxime mouial <[email protected]>
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.
Would it make sense to c
// We use the UDS socket origin if no origin ID was specify in the tags | ||
// or 'dogstatsd_entity_id_precedence' is set to False (default false). | ||
if entityIDValue == "" || !entityIDPrecedenceEnabled { | ||
if originFromTag == "" || !entityIDPrecedenceEnabled { |
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.
Should we skip originFromUDS
if we are going to use originFromMsg
? It would be nice to avoid tagging metrics with two container tags if a proxy is using UDS to send metrics on behalf of another container.
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.
UDS origin detection is opt-in and not enabled by default, I'd rather let the user have control.
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.
This feature would probably interest users that use origin detection today, so they may be inclined to have both options enabled: use uds to tag traffic on older clients, while using benefits of client-side origin detection with newer clients. Unless double-tagging is a use case we explicitly want to support, I think it would make more sense to assign only one origin per metric.
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.
I'd rather keep it simple as is currently and not make any assumptions.
We agreed that extending the protocol is always an option in the future, so if we want to turn on and off UDS origin detection on-demand it would be best to let the client do it via a new field.
Co-authored-by: Vickenty Fesunov <[email protected]>
What does this PR do?
Extend origin detection on by supporting a new field in the dsd protocol, the new field
c:<id>
holds the container ID discovered by the client.Motivation
Additional Notes
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes
Deploy the agent with
DD_DOGSTATSD_ORIGIN_DETECTION_CLIENT=true
You should be able to see container tags attached to the
testing.dsd.container
metric on the app.Reviewer's Checklist
Triage
milestone is set.team/..
label has been applied, if known.major_change
label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.changelog/no-changelog
label has been applied.qa/skip-qa
label is not applied.need-change/operator
andneed-change/helm
labels have been applied.