-
Notifications
You must be signed in to change notification settings - Fork 271
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
Include pod UID and container name as optional trace labels #3483
base: main
Are you sure you want to change the base?
Conversation
you've been clippy'ed 📎 🙀
|
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.
besides the note about clippy lints above, this looks like a good PR to me. this should be a nice improvement to our traces!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3483 +/- ##
==========================================
- Coverage 67.68% 66.71% -0.97%
==========================================
Files 332 388 +56
Lines 15158 18172 +3014
==========================================
+ Hits 10259 12123 +1864
- Misses 4899 6049 +1150
... and 175 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
It's useful to include these fields in the trace span attributes to help correlate traffic within a cluster. This propagates these labels through the trace initialization, similar to how we handle the service name (and other labels that last for the entire pod lifetime). See linkerd/linkerd2#13501 for the corresponding control plane change. Signed-off-by: Scott Fleener <[email protected]>
const ENV_POD_UID: &str = "_pod_uid"; | ||
const ENV_POD_CONTAINER_NAME: &str = "_pod_containerName"; |
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.
We've generally been pretty adamant (and successful) about not leaking kubernetes concepts (pods, containers, uids, etc) into the proxy's codebase.
You may notice that we load a bunch of attributes from a file at starttime:
is it possible to encode these attributes into this file so the proxy doesn't need special casing for them?
It's useful to include these fields in the trace span attributes to help correlate traffic within a cluster.
This propagates these labels through the trace initialization, similar to how we handle the service name (and other labels that last for the entire pod lifetime).
See linkerd/linkerd2#13501 for the corresponding control plane change.