Configure Envoy for Dynatrace

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:

Disable OneAgent Envoy monitoring

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.

  1. Go to the applicable configuration page
    • For the entire environment, Settings > Monitoring > Monitored technologies.
    • For a particular host, Your host > Host settings > General.
  2. Find Envoy in the list of monitored technologies, and select Edit (pencil icon).
  3. 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

  1. In Dynatrace Hub, search for Envoy.
  2. Select the Hub entry for Envoy.
  3. Select Set up.
  4. Configure the API token.
  5. 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.

Configure the OpenTelemetry tracer

Next, you need to add the tracing provider to the HTTP connection manager filter in the Envoy configuration file.

As Envoy 1.29 and its successor versions support slightly different feature-sets, there are two different ways to configure this.

Verify the setup optional

Once the setup is complete and you have ingested your first data, you can verify if the traces show up in Dynatrace.

trace