Latest Dynatrace Preview
In this use case, you'll
SDLC events are events with a separate event kind in Dynatrace that follow a well-defined semantic for capturing data points from a software component's software development lifecycle. The Software development lifecycle (SDLC) events specification defines the semantics of those events.
The main benefit is data normalization and becoming tool-agnostic. As a result, Dynatrace Dashboards, Apps, and Workflows can build on SDLC events with well-defined properties rather than tool-specific details.
This information is intended for platform engineers who use Azure DevOps in their Internal Development Platform (IDP).
In this tutorial, you'll learn how to
Install Dynatrace Configuration as Code via Monaco
Create an OAuth client for the Dynatrace Monaco CLI with the following permissions:
app-engine:apps:run
openpipeline:configurations:read
openpipeline:configurations:write
document:documents:write
document:documents:read
Store the retrieved client ID, secret, and token endpoint as separate environment variables.
$env:OAUTH_CLIENT_ID='<YOUR_CLIENT_ID>'$env:OAUTH_CLIENT_SECRET='<YOUR_CLIENT_SECRET>'$env:OAUTH_TOKEN_ENDPOINT='https://sso.dynatrace.com/sso/oauth2/token'
Clone the Dynatrace configuration as code sample repository using the following commands and move to the azure_devops_observability
directory.
git clone https://github.com/Dynatrace/dynatrace-configuration-as-code-samples.gitcd dynatrace-configuration-as-code-samples/azure_devops_observability
Edit the manifest.yaml
by exchanging the <YOUR-DT-ENV-ID>
placeholder with your Dynatrace environment ID at the name property and within the URL of the value property.
manifestVersion: 1.0projects:- name: pipeline_observabilityenvironmentGroups:- name: groupenvironments:- name: <YOUR-DT-ENV-ID>url:type: valuevalue: https://<YOUR-DT-ENV-ID>.apps.dynatrace.comauth:oAuth:clientId:name: OAUTH_CLIENT_IDclientSecret:name: OAUTH_CLIENT_SECRETtokenEndpoint:type: environmentvalue: OAUTH_TOKEN_ENDPOINT
These steps modify the OpenPipeline configuration for SDLC events. If your OpenPipeline configuration contains only default/built-in values, you can directly apply the Monaco configuration. If you have any custom ingest sources, dynamic routes, or pipelines, you'll first need to download your configuration and manually merge it into the Monaco configuration.
Step 3 will indicate if a configuration merge is needed or if you can apply the provided configuration directly.
Go to OpenPipeline > Events > Software development lifecycle.
Check the Ingest sources, Dynamic routing, and Pipelines.
If the answer to one of those questions is "yes", follow the steps below. Otherwise, skip ahead to step 4.
Download your OpenPipeline configuration
monaco download -e <YOUR-DT-ENV-ID> --only-openpipeline
Open the following files:
download_<DATE>_<NUMBER>/project/openpipline/events.sdlc.json
.pipeline_observability/openpipline/events.sdlc.azdo.json
.Merge the contents of events.sdlc.json
into events.sdlc.azdo.json
, and then save the file.
Apply the Monaco configuration.
Run the command to apply the provided Monaco configuration.
The configuration consists of
monaco deploy manifest.yaml
To generate an access token:
You can only access your token once upon creation. You can't reveal it afterward.
Select these scopes:
openpipeline.events_sdlc
)openpipeline.events_sdlc.custom
)Create Azure DevOps webhooks at the project level with the following settings:
Select Build completed from the list of triggers.
URL: Copy the URL from below, and replace the placeholder <YOUR-DT-ENV-ID>
with your Dynatrace environment ID.
https://<YOUR-DT-ENV-ID>.live.dynatrace.com/platform/ingest/custom/events.sdlc/azuredevops
HTTP headers
Add entry: Authorization: Api-Token <YOUR-ACCESS-TOKEN>
, replace the placeholder <YOUR-ACCESS-TOKEN>
with the generated access token.
Repeat the creation of webhook subscriptions for the following triggers:
Now that you've successfully configured Azure DevOps and Dynatrace, you can use Dashboards and SDLC events to observe your Azure DevOps pipelines and pull requests within the entire development organization.
In Dynatrace, open the Azure DevOps Pipelines and Azure DevOps Pull Request dashboards to:
Leverage those insights for the following improvement areas:
Streamline CI/CD pipeline: Observing pipeline executions lets you identify bottlenecks and inefficiencies in your CI/CD pipelines. Knowing about these bottlenecks and inefficiencies helps optimize build and deployment processes, leading to faster and more reliable releases.
Improve developer productivity: Automated pipelines reduce the manual effort required for repetitive tasks, such as running tests and checking coding standards. This automation allows developers to focus more on writing code and less on administrative tasks.
Get data-driven development insights: Analyzing telemetry data from pull requests and pipelines provides valuable insights into the development process. You can use the telemetry data to make informed decisions and continuously improve the development flows.
Regularly review and tweak your CI/CD pipelines to ensure they are optimized for performance.
In Dynatrace, adjust the timeframe of the Azure DevOps Pipelines and Azure DevOps Pull Request dashboards to monitor the long-term impact of your improvements.
We highly value your insights on Azure DevOps pipeline observability. Your feedback is crucial in helping us enhance our tools and services. Visit the Dynatrace Community page to share your experiences, suggestions, and ideas directly on Feedback channel for CI/CD Pipeline Observability.