-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
I have an open PR in istio istio/old_pilot_repo#1406 that uses the Envoy decorator configuration to specify the operation name on client and server spans. It currently uses the route name by default.
However there is one problem with the current PR - if multiple route rules are defined for the same destination service (i.e. with different source service criteria), but with the same matching criteria, it can result in non-deterministic behavior in identifying the operation/span name on the server span - i.e. it depends which route rule matched first in the inbound listener.
One way to avoid this problem would be for a decorated outbound request to include an Envoy specific header property defining the operation/span name used in the client span. Once received by the inbound listener, this header value would override any decorator (or default) operation/span name that would have been used on the server span associated with that inbound request.
To clarify - this header property would only be added if a decorator had been defined on the outbound listener. If there were concerns about the additional header, then possibly it could also be configurable in some way, so that would only be used in appropriate situations, such as the case in Istio.