-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Owner Metadata for Spans. #4008
Owner Metadata for Spans. #4008
Comments
For my understanding, are there other places where these metadata will be useful, other than linking the Jaeger dashboard to the Linkerd dashboard? Since tracing is an optional addon, do we want the Linkerd dashboard to be coupled to it? |
@ihcsim Also, I'm thinking there will be more use-cases where these values would be needed by the proxy,
|
This change adds support for a `LINKERD2_PROXY_TRACE_ATTRIBUTES_PATH` configuration that, when tracing is enabled, loads metadata (especially Kubernetes labels) to be emitted with traces. Fixes linkerd/linkerd2#4008
Depends on at least #4199 |
Feature Request
Right Now, For metrics Prometheus automatically adds the pod's labels as metric labels, giving us the capability to link grafana dashboard for that component directly in the linkerd dashboard and allowing users to jump there seamlessly.
A similar model with Jaeger would be great i.e jumping directly from the linkerd dashboard to the jaeger dashboard and showing relevant spans of the component. This would require some labels to be present that allows us to filter spans based on the selected component.
We already send some owner Metadata, for the spans as seen in the picture.
The
hostname
label allows us to categorize spans based on the pod that the spans came from, allowing us to directly specify a link with the queryhostname
label for pods. But we would also want a similar case for thekind
andname
of workload.Sadly, This Information is actually not passed into the pod's env variables right now. The
hostname
is injected by k8s currently and we use that. But A similar thing is not present for workloads.What problem are you trying to solve?
More metadata for spans.
How should the problem be solved?
We already find the workload, type information during injection and add them as
pod
labels.We can use the downward API https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/ to make those labels attached as volumes for the
linkerd-proxy
to attach them as labels here.https://github.com/linkerd/linkerd2-proxy/blob/9faff18c8a6ffabe92afcd2a47ab169b99baa1b0/linkerd/trace-context/src/layer.rs#L142
Any alternatives you've considered?
Further reading:
https://developers.soundcloud.com/blog/using-kubernetes-pod-metadata-to-improve-zipkin-traces
@grampelberg
The text was updated successfully, but these errors were encountered: