An important part in tracing is to have a stable, single point in your architecture where trace initialization, such as starting new or continuing existing traces using context propagation, is guaranteed. With network requests first arriving at the network edge, that is the ideal place to ensure this and it can be achieved with a centrally deployed reverse proxy which receives the requests, starts the trace, and routes the request to the desired backend, along with context propagation.
One of the options to configure such a setup is the Envoy platform in its version 1.29 or higher.
Envoy 1.28 and earlier
To instrument Envoy 1.28 and earlier, use OneAgent with the applicable Envoy code module and activate Envoy monitoring by enabling Monitor Envoy under Settings > Monitoring > Monitored technologies.
Configuration prerequisites
The following prerequisites are necessary to configure your Envoy instance to export traces to Dynatrace:
When using the OpenTelemetry exporter in Envoy, the OneAgent Envoy monitoring needs to be turned off, to avoid interferences in the configuration. Follow the steps below to disable it according to your needs.
Go to the applicable configuration page
For the entire environment, Settings > Monitoring > Monitored technologies.
For a particular host, Your host > Host settings > General.
Find Envoy in the list of monitored technologies, and select Edit (pencil icon).
Click on the toggle Monitor Envoy to disable Envoy monitoring.
Find the Envoy configuration file
The Envoy configuration is stored in a YAML file whose path is passed with the Envoy command line parameter --config-path. If you are not sure where the file is located, check the Envoy launch command for that value.
Get configuration entries
In Dynatrace Hub, search for Envoy.
Select the Hub entry for Envoy.
Select Set up.
Configure the API token.
Proceed with the following steps and use (and adjust) the two provided configuration snippets where applicable.
Add Dynatrace cluster entry for OpenTelemetry export
For Envoy to send traces to Dynatrace, you first need to configure a cluster entry for Dynatrace in the Envoy configuration file. For that, add the cluster configuration entry as obtained in step 2 under the top-level clusters key.
As Envoy 1.29 and its successor versions support slightly different feature-sets, there are two different ways to configure this.
Use the tracer configuration entry you obtained in step 2, configure the API token under tracing - provider - typed_config - http_service - request_headers_to_add - header - value (the correct syntax is value: "Api-Token YOUR_API_TOKEN_HERE"), and add the tracer configuration under aforementioned filters entry.