Skip to content

Commit

Permalink
Add extra trace attributes from downward API
Browse files Browse the repository at this point in the history
This allows us to specify extra trace attribute key-value pairs from the downward API without needing to pull from the pods annotations or labels. This lets us keep the proxy decoupled from k8s concepts.

Signed-off-by: Scott Fleener <[email protected]>
  • Loading branch information
sfleen committed Jan 28, 2025
1 parent 2ffe432 commit 73fe859
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jaeger/injector/mutator/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ const tpl = `[
"value": "{{.CollectorSvcAccount}}.serviceaccount.identity.{{.LinkerdNamespace}}.{{.ClusterDomain}}"
}
},
{
"op": "add",
"path": "/spec/{{.ProxyPath}}/env/-",
"value": {
"name": "LINKERD2_PROXY_TRACE_EXTRA_ATTRIBUTES",
"value": "k8s.pod.uid=$(_pod_uid)\nk8s.container.name=$(_pod_containerName)"
}
},
{
"op": "add",
"path": "/spec/{{.ProxyPath}}/volumeMounts/-",
Expand Down

0 comments on commit 73fe859

Please sign in to comment.