-
Notifications
You must be signed in to change notification settings - Fork 134
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
feat: Support container ID field (dogstatsd 1.2) #250
Conversation
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 added a few comments. We should wait on the final decision between tags and new field in dogstatsd protocol before going further.
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 think it's almost good to go.
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.
Thanks for the PR !
Thank you for the review @hush-hush ! I'd like to get 👀 on the Agent PR before merging this one. PTAL when you get a chance! DataDog/datadog-agent#10659 |
The PR does the following
c:<id>
field holding the container ID so the agent can attach container tags.Brief explanation of how the new container field is handled
DD_ENTITY_ID
is set, we ignore the container fieldDD_ENTITY_ID
is not set andDD_ORIGIN_DETECTION_ENABLED
is not explicitly set tofalse
or theWithoutOriginDetection()
is not invoked, we try to get the app container ID by parsing/proc/self/cgroup
. In case of success, the container field in will be set to .Motivation
dd.internal.entity_id
is to avoid parsing the value and guess the prefix on the agent side (avoid costly operations in the hot path)Notes