Read time: 3 minutes
Last edited: Oct 16, 2020
This topic explains how to use the LaunchDarkly Dynatrace integration. Dynatrace is an infrastructure monitoring platform that offers application performance management (APM) and automated problem remediation. The LaunchDarkly Dynatrace 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 find the Dynatrace card.
- Click to expand the card, then click + Integration. The integration configuration screen appears.
- (Optional) Type a human-readable Name.
- Paste in 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 Dynatrace entity type you want to associate with LaunchDarkly events.
- If this is all the configuration you need to do, click Save Dynatrace Configuration.
If you want to configure the Dynatrace integration to alter which events LaunchDarkly sends to Dynatrace, read Configuring integration policies. If not, continue to Associating flags with Dynatrace tags.
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.
- In the "Select a property type..." dropdown, select Dynatrace tags.
- Enter the name of the tag you created in the "Values" field.
- Click Save with Comment button to save the custom property.
That's it! Now events from your feature flags will appear in Dynatrace.