In multiple environment scenarios, data pools are separated. If a request affects services that are monitored in different Dynatrace environments, its traces aren't automatically correlated.
To correlate and follow such traces, you can configure a connection between the Dynatrace environments and enable the response header and coordinated sampling switches. The service flow then represents the connection between the connected environments, and distributed traces link to the connected remote environment.
Configure a connection between environments (via UI)
Create an access token
With this procedure, you get two items that you need in the other steps:
An access token from the remote environment
The URI of the remote Dynatrace environment
To create an access token in the remote Dynatrace environment
- Go to Access Tokens.
- Select Generate new token.
Enter a token name.
- Find and select the following scopes:
- Look up a single trace (
- Fetch data from a remote environment (
- Look up a single trace (
- Select Generate token.
This generates a token that gives your local environment permission to check the existence of a trace in a remote environment and to pull data from a remote environment.
- Select Copy and then paste the token to a secure location.
It's a long string that you need to copy and paste back into Dynatrace later.
- While you're signed in to the remote environment, copy the URI of the remote environment (for example,
https://dynatrace.mybostonsite.com) from the browser address line.
Add the remote environment
To add the remote Dynatrace environment to the list of available remote environments in your current environment
Go to Settings.
Select Integration > Remote environments.
Select Connect environment.
Define the remote environment and then select Save changes.
Name is the name under which the remote environment will be listed in your current Dynatrace environment. This is freeform text. It doesn't affect the remote environment.
Remote environment URI is the URI you copied from the browser address line in the previous procedure.
External: The remote environment is located in another network.
Internal: The remote environment is located in the same network.
Cluster: The remote environment is located in the same cluster.
Dynatrace SaaS can only use the
Token is the token you generated in the previous procedure. It needs to include the Look up a single trace scope (
Test connection checks the connection from your current environment to the remote environment.
Enable the features
After connecting your environments, enable the following features in all connected environments:
You can increase the consistency of cross-environment tracing with coordinated sampling. When you enable the switch, sampling is coordinated across environments with the help of the W3C trace ID.
For this to work, all connected environments must have both coordinated sampling and W3C trace context propagation enabled.
- Go to Settings > Preferences > OneAgent features.
- Set W3C trace context switch according to your preferences.
You can send W3C trace context HTTP headers or gRPC headers.
- Find and turn on Cross-environment tracing - Coordinated sampling.
Apply this configuration in each environment of the group that you want to connect.
You can enable the identification and tracking of cross-environment calls, including the environment ID and the trace ID in HTTP response headers. If the calling environment receiving the response has the environment configured as a trusted remote environment, the call destination is linked.
- Go to Settings and select Preferences > OneAgent features.
- Find and turn on Cross-environment tracing - Environment and transaction IDs in HTTP response headers.
Make sure that a direct network connection between the clusters can be established via HTTP/HTTPs.
Cross-environment tracing is limited to traces of requests that can transfer information about response headers and trace context from the receiving environment, such as HTTP or synchronous requests.
IBM z/OS (CICS, IMS, and Java) and AWS Lambda don't support cross-environment tracing.
Configure a connection between environments (via API)
The previous procedures use the Dynatrace web UI. To carry out the equivalent tasks via API, see:
Analyze cross-connected remote environments
Once you configure a connection between environments, the following specific analysis options are available.
Dynatrace detects requests to connected Dynatrace environments and uses the available information to create an associated Remote environment web service or web request service.
Outgoing calls to connected environments are represented in Smartscape and the service flow.
- All the services monitored by the remote environment and contributing to the request are listed on the Remote environments page. To open it, select Open environment on a Remote environment service page.
Service flow recognizes remote environment calls. Because the requests are monitored by another Dynatrace environment, a specific drill-down option is available when you select the remote environment call. In the side pane, select Open environment to access the Remote environments page.
When a request goes to a connected remote environment, Dynatrace displays the remote environment name in the call tree.
To follow the trace in the remote environment
Select the remote environment request.
- In the Summary tab, select Open environment.
If the environments' connection is configured correctly, Dynatrace automatically displays the call Aggregated requests. It aggregates all the data of detected requests on each respective connected remote environment.
If you configured a connection to the remote environment but you can't see requests on it, you can trigger a manual search for the trace in configured environments. In the upper-right corner of the trace page, select Find in remote environments.
- What is a monitoring environment?
Understand and learn how to work with monitoring environments.
- Create remote/multi-environment Dynatrace dashboards
Create dashboards that display data from multiple Dynatrace environments.
- Remote environments API
Manage configurations of remote Dynatrace environments via the Dynatrace configuration API.