We’re running into an issue where if we configure our kubernetes service for HTTP, Envoy will begin stripping our custom headers. As soon as we move it back to a Layer4 proxy (changing the service name prefix to something else), our headers pass into the mesh correctly. I’ve traced the network and looked into the logs - whenever Envoy determines that it needs to add the x-request-id and all the external tracing, is when it drops our headers.
The documentation for Istio/Envoy states that it’ll sanitize headers with the x- prefix, but doesn’t say anything about removing custom headers. Is this expected or is there an easy way to keep Envoy as a layer 7 proxy while being able to maintain our headers?
Our headers are prefixed with ‘wt-’ which has no value and we could change to something else if it would help.
Thanks, Ed! I should’ve mentioned we’re running Istio 1.0.5 - I haven’t run a test against a plain vanilla httpbin sample for our version. I’ll do that now and compare to our prod environment.
I am using Istio 1.0.6. We have one of the headers “x-correlation-id”. I want to get this header in Jaeger. How is that possible ? Will it work in 1.1 ?
Also, If I want to have this header “x-correlation-id” as one of the prometheus metric, how is it possible ??
Header sanitation issues aside: If you want to use direct integration (envoy → jaeger) for tracing, you will need to provide updates to the Envoy tracing functionality itself to customize. I’m not sure what the best way would be to accomplish that. If you want to use Mixer to generate your tracespans before sending to Jaeger, you can update your template to include a label with an expression that looks something like request.headers["x-correlation-id"].
You can add headers to prometheus metrics by altering the instances involved (and the prom configuration) just as for the tracespan template. However, adding correlation ids to metrics isn’t advised at any scale, due to cardinality concerns. Please see: Metric and label naming | Prometheus
CAUTION: Remember that every unique combination of key-value label pairs represents a new time series, which can dramatically increase the amount of data stored. Do not use labels to store dimensions with high cardinality (many different label values), such as user IDs, email addresses, or other unbounded sets of values
What do you mean by when you say “update your template”. Which template are we talking about here. Is there any reference somewhere which I can use to do my desired configuration.
@Sourabh_Wadhwa the links i sent were links to metrics definitions that show exactly which pieces of config you would need to modify to add labels to metrics exposed via Prometheus. There is nothing there about changing the data jaeger is receiving.