-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Scenario
4 services in the demo K8s namespace, that override the OTEL service.namespace attribute via OTEL_RESOURCE_ATTRIBUTES env var or resource.opentelemetry.io/service.namespace: "ecommerce" annotations.
Service Graph metrics duplicate the services because the server_service_namespace is duplicated as demo and ecommerce:
For example:
traces_service_graph_request_total{
client="my-backend",
client_service_namespace="ecommerce",
instance="kind-worker",
server="worker-svc",
server_service_namespace="demo",
}
traces_service_graph_request_total{
client="my-backend",
client_service_namespace="ecommerce",
instance="kind-worker2",
server="my-worker",
server_service_namespace="ecommerce",
}
The reason is that OBI is able to correctly override the destination Pod K8s namespace by the standard OTEL env vars and annotations.
However, when the destination URL is a service (worker-svc instead of my-worker), the pod annotations and env vars are not visible from the URL.
## Possible solution
Through the Kube API, let OBI to keep track of the K8s Service spec.selector attributes and internally maintain a map of Pods that already match that attribute, then from the service name it's possible to access the Pod replicas that should share the same annotations and env vars.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
