Traces should include k8s/knative attributes
- Dominant language
- Go
- Stars
- 1.6k
- Forks
- 631
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 6
Description
**Problem**
Traces generated by Knative Eventing components do not include k8s specific attributes, which makes it hard to understand where they are coming from.
For instance, when the IMC dispatcher sends an event, it produces this kind of traces (showing tags only):
```
tags:
otel.status_code=STATUS_CODE_UNSET
cloudevents.source=/apis/v1/namespaces/vet/pingsources/make-vet-appointment
cloudevents.specversion=1.0
cloudevents.type=dev.knative.sources.ping
messaging.protocol=HTTP
messaging.system=knative
cloudevents.id=1f7f68c3-156d-466d-b078-8507d4a9e6bd
messaging.destination=http://make-vet-appointment.vet.svc.cluster.local
messaging.message_id=1f7f68c3-156d-466d-b078-8507d4a9e6bd
```
What I would like to see is the Subscription name and namespace (and from there retrieve the Sequence CR when applicable)
**[Persona:](https://github.com/knative/eventing/blob/main/docs/personas.md)**
Which persona is this feature for?
**Exit Criteria**
A measurable (binary) test that would indicate that the problem has been resolved.
**Time Estimate (optional):**
How many developer-days do you think this may take to resolve?
few
**Additional context (optional)**
Add any other context about the feature request here.
OpenTelemetry semantic conventions for Kubernetes: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/k8s.md
List of components to update:
- [ ] PingSource
- [ ] APIServerSource
- [ ] InMemoryChannel
- [ ] MT Broker
Contributor guide
Assessment
This issue has not been assessed yet.