Skip to content
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

Closed
Pothulapati opened this issue Feb 3, 2020 · 3 comments · Fixed by #4199 or linkerd/linkerd2-proxy#463
Closed

Owner Metadata for Spans. #4008

Pothulapati opened this issue Feb 3, 2020 · 3 comments · Fixed by #4199 or linkerd/linkerd2-proxy#463

Comments

@Pothulapati
Copy link
Contributor

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.

image
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 query hostname label for pods. But we would also want a similar case for the kind and name 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?

@grampelberg

@ihcsim
Copy link
Contributor

ihcsim commented Feb 3, 2020

What problem are you trying to solve?
More metadata for spans.

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?

@Pothulapati
Copy link
Contributor Author

@ihcsim
reg Jaeger
The dashboard will only show the relevant jaeger link when the add-on is enabled, or a relevant endpoint is passed by the user.

Also, I'm thinking there will be more use-cases where these values would be needed by the proxy,

  • Where users are directly sending their spans somewhere without otel/oc-collector.
  • for mesh expansion where k8s labels will not be present for Prometheus to auto add k8s-resource labels as metric labels.

olix0r pushed a commit to linkerd/linkerd2-proxy that referenced this issue Apr 13, 2020
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
@olix0r olix0r reopened this Apr 13, 2020
@olix0r
Copy link
Member

olix0r commented Apr 13, 2020

Depends on at least #4199

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants