DocsEmissary-ingress
2.2
Tracing service
Tracing service
Applications that consist of multiple services can be difficult to debug, as a single request can span multiple services. Distributed tracing tells the story of your request as it is processed through your system. Distributed tracing is a powerful tool to debug and analyze your system in addition to request logging and metrics.
When enabled, the TracingService will instruct Emissary-ingress to initiate a trace on requests by generating and populating an x-request-id HTTP header. Services can make use of this x-request-id header in logging and forward it in downstream requests for tracing. Emissary-ingress also integrates with external trace visualization services, including LightStep and Zipkin-compatible APIs such as Zipkin and Jaeger to allow you to store and visualize traces. You can read further on Envoy's Tracing capabilities.
A TracingService manifest configures Emissary-ingress to use an external trace visualization service:
servicegives the URL of the external HTTP trace service.driverprovides the driver information that handles communicating with theservice. Supported values arelightstep,zipkin, anddatadog.configprovides additional configuration options for the selecteddriver.tag_headers(optional) if present, specifies a list of other HTTP request headers which will be used as tags in the trace's span.sampling(optional) if present, specifies some target percentages of requests that will be traced.client: percentage of requests that will be force traced if thex-client-trace-idheader is set. Defaults to 100.random: percentage of requests that will be randomly traced. Defaults to 100.overall: percentage of requests that will be traced after all other checks have been applied (force tracing, sampling, etc.). This field functions as an upper limit on the total configured sampling rate. For instance, settingclientto100%butoverallto1%will result in only1%of client requests with the appropriate headers to be force traced. Defaults to 100.
Please note that you must use the HTTP/2 pseudo-header names. For example:
- the
hostheader should be specified as the:authorityheader; and - the
methodheader should be specified as the:methodheader.
Lightstep driver configurations
access_token_fileprovides the location of the file containing the access token to the LightStep API.
Zipkin driver configurations
collector_endpointgives the API endpoint of the Zipkin service where the spans will be sent. The default value is/api/v1/spanscollector_endpoint_versiongives the API version Envoy will use when sending data to your Zipkin collector. The default value isHTTP_JSON_V1collector_endpoint_hostnamesets the hostname Envoy will use when sending data to your Zipkin collector. The default value is the name of the underlying Envoy cluster.trace_id_128bitwhether a 128-bittrace idwill be used when creating a new trace instance. Defaults totrue. Setting tofalsewill result in a 64-bit trace id being used.shared_span_contextwhether client and server spans will share the samespan id. The default value istrue.
Datadog Driver Configurations
service_namethe name of the service which is attached to the traces. The default value isambassador.
You may only use a single TracingService manifest per Emissary-ingress deployment. Ensure ambassador_id is set correctly in the TracingService manifest.