Using the Dynatrace events integration
Read time: 5 minutes
Last edited: Oct 29, 2021
This topic explains how to use the LaunchDarkly Dynatrace events integration. The LaunchDarkly Dynatrace events integration makes it easier to diagnose problems by sending flag change events to Dynatrace. Dynatrace can display those events alongside performance graphs, making it easier for Dynatrace users to correlate feature rollouts to changes in operational health.
The integration only sends
flag actions to Dynatrace. To learn more, read Feature flag actions.
You can use LaunchDarkly's triggers feature with Dynatrace to automatically perform actions on feature flags.
To learn more, read Using triggers with Dynatrace.
To send flag change events to Dynatrace:
- Create a Dynatrace API token
- Configure the Dynatrace integration
- (Optional) Configure the integration's policy to allow or restrict specific projects and environments
- Associate flags with Dynatrace tags
To use the LaunchDarkly Dynatrace integration successfully, you must meet the following prerequisites:
- You must know the URL of your Dynatrace service. Find it by loading your Dynatrace dashboard and looking at the URL in your browser's address bar. For example:
https://csd50042.live.dynatrace.com. Copy this URL and save it.
- You must have an API token from your Dynatrace account. To learn more, read Creating a Dynatrace API token.
The Dynatrace API token authenticates the LaunchDarkly integration so it can submit events to your Dynatrace account. To learn more about Dynatrace's API tokens, read Dynatrace's documentation.
When you create the token, confirm that the "Access problem and event feed, metrics, and topology" option is enabled. This is the only access scope the LaunchDarkly integration needs.
Here's how to add and configure the Dynatrace integration:
- Navigate to the Integrations page and expand the Dynatrace card.
- Click Add integration. The integration configuration screen appears.
- (Optional) Give your integration a human-readable Name.
- Enter your Dynatrace API token.
- Enter the URL of your Dynatrace service in the Dynatrace URL field. Do not include a slash at the end.
- Select the entity type of the Dynatrace entities you want to send LaunchDarkly events to. To learn more, read About entity types.
- (Optional) Configure a custom policy to control which information LaunchDarkly sends to Dynatrace. To learn more, read Configuring integration policies.
- After reading the Integration Terms and Conditions, check the I have read and agree to the Integration Terms and Conditions checkbox.
- Click Save configuration.
Dynatrace uses specific entity types for applications within it. For example, if Dynatrace is monitoring your software application and flag change events appear on that Dynatrace's timeline, the application has an entity type such as
To find the application entity type, navigate to the Dynatrace page for the entity and examine the URL. It contains the entity type in capital letters. In this example, the entity type is
The "Policy" field lets you control which LaunchDarkly events are sent to Dynatrace. The Resource specifier in the default policy value allows Production environments across all projects to send events:
To learn more about the Resource configuration fields, read Resources in custom roles.
You may want to override the default policy for various reasons, including restricting how the integration sees and exports events. Using the policy editor, you can restrict the integration to:
- a specific set of LaunchDarkly projects/environments
- a specific set of flags
- a specific set of actions
For example, to restrict the policy to a single project called
cool-app, set the policy configuration's Resource field to the following Resource specifier:
The policy above makes it so that the only events the integrations sends to Dynatrace are flag events from the
cool-app project's Production environment.
If you need to restrict or allow a more complex set of resources than you can specify in a single policy, you might want to add multiple Dynatrace integrations and configure each one to a specific task. Each integration can have its own separate policy configuration.
To learn more about using the policy editor, read Policies in custom roles.
The LaunchDarkly Dynatrace integration only sends events from flags which are explicitly associated with Dynatrace tags. It does not send events from every flag in your LaunchDarkly project.
The integration lets you see an application's flag change events beside its performance graphs. This makes it easier to correlate problems with the flag changes that may have caused them.
For this to be most effective, attach a flag's events to all the applications the flag affects, and only those applications.
Associating flags with Dynatrace tags ensures that flag events are attached to the Dynatrace entities which are affected by those events. To learn more about Dynatrace tags, read Dynatrace's documentation.
To associate a flag with one or more applications using Dynatrace tags:
- In Dynatrace: Create a new tag and add it to each of the applications which depend on the flag. To learn more about creating tags, read Dynatrace's documentation.
- In LaunchDarkly: Go to the flag's Settings tab.
- Scroll down to the "Custom properties" section and click Add custom property.
- Enter the name of the tag you created in the "Values" field.
- In the "Select a property type..." dropdown, select Dynatrace tags.
- Click Save with comment to save the custom property.
Now events from your feature flags appear in Dynatrace.
After you configure the LaunchDarkly integration, flag changes appear as events on the Dynatrace event timelines for your applications, or whatever entities you selected.
If an event doesn't appear on Dynatrace after you've changed a flag, you can try the following techniques:
Dynatrace can take up to three minutes to register inbound events.
In addition, the Events timeline on a Dynatrace page may be frozen to a particular time range, and won't automatically update. Reload the page to update the timeline range.
Dynatrace's API only provides access to entities, such as applications, which have recently registered data from Dynatrace Agents. Entities without recent data may be visible in the Dynatrace user interface, but may be unable to register flag changes or other kinds of events.
Verify that Dynatrace OneAgent is running and monitoring the entity, and that the entity is displaying recent traffic data on its Dynatrace page.
The LaunchDarkly Dynatrace integration only sends change events for a flag if that flag has a tag association in its custom properties. To learn more, read Associating flags with Dynatrace tags.
To learn more, read the step about Dynatrace entity types in Configuring the Dynatrace integration.