-
Notifications
You must be signed in to change notification settings - Fork 16
Description
In the following situation, an unexpected behaviour is observed. A web frontend is instrumented with OTel JS for browser. The requests from the browser first hits a Kubernetes ingress controller that routes the requests to the backend services based on the {language} in the URL path /api/{language}/rolldice. The destination service span enrichment sets the IP address as destination service. The result is that in this scenario, the service map cannot properly resolve the backend services.
The ingress controller does URL rewriting like this:
# Java service API
- path: /api/java(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: java-service
port:
number: 80Is it possible to take the path into account for the destination service?
I have experimented with a custom span processor in the frontend to set the peer.service attribute. If this is set to the value of service.name attribute of the backend service, it works as expected. However, maintaining such a mapping in the frontend might be unfeasible.