Skip to content

Destination service span enrichment issue #246

@hegerchr

Description

@hegerchr

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: 80

Is 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions