In the world of software delivery DevOps, every second counts. Delayed notifications about pipeline failures can cost your team valuable time and resources. Imagine having real-time visibility into your CI/CD pipeline directly in the monitoring platform of your choice. That's exactly what Harness Pipeline Notifications for Datadog delivers.
In today's fast-paced software development landscape, maintaining visibility into your CI/CD pipelines is crucial for ensuring smooth operations and quick issue resolution. At Harness, we understand the challenges DevOps teams face in monitoring complex pipeline processes. While we have long offered pipeline event notifications through popular communication and incident management platforms like Email, Microsoft Teams, Slack, PagerDuty, and Webhook, we recognized the need for even deeper integration with observability tools.
That's why we are thrilled to introduce our latest feature: Harness Pipeline Notifications via Datadog. This powerful integration bridges the gap between your CI/CD processes and your monitoring infrastructure, empowering teams to respond faster, collaborate more effectively, and maintain a clear view of their software delivery process.
Need for enhanced Pipeline visibility
As CI/CD pipelines grow in complexity, the need for real-time monitoring and alerts becomes increasingly critical. DevOps teams often struggle with:
Delayed awareness of pipeline failures
Difficulty in pinpointing the exact stage or step where issues occur
Lack of integration between pipeline events and existing monitoring tools
These challenges can lead to increased downtime, slower issue resolution, and frustrated development teams.
Harness Pipeline Notifications for Datadog
Our new Harness Pipeline Notifications for Datadog feature addresses these pain points by seamlessly integrating pipeline events into your existing Datadog workflows. This integration offers:
Real-time visibility into pipeline events
Configurable events to get notified about such as specific pipeline stages and steps
Custom headers for enhanced event categorization
Native integration with Datadog with enhanced events search and analytics capabilities
Harness Pipeline notifications flow for Datadog
Harness Notifications integration in Datadog
The Harness Notifications Datadog integration enables you to tag the Pipeline notifications ingested to Datadog with source:harness_notifications. If the integration is not installed, every notification is tagged with source:my_apps. Learn more about this in Datadog official documentation. Additionally, through the integration, you get access to an in-built dashboard that gives you a time-series view of the types of events and their occurrence frequency. Please note that installing this integration is not required to send Pipeline notifications from Harness to Datadog. However, it provides you with some additional capabilities as explained above.
In Harness Pipeline Studio, click on Notify in the right sidebar.
To create a new notification rule, click on +Notifications button. The Notification Rule settings appear.
Enter a name for the Notification rule. Example: Datadog notifications
Click Continue.
Select Pipeline events: You can either select All events or configure the events that need to be sent. Supported pipeline events include: Pipeline Start, Pipeline End, Pipeline Success, Pipeline Failed, Stage Start, Stage Success, Stage Failed, and Step Failed.
Select events for the pipeline or stages. If you select the stage events, you can select which stages to use.
Click Continue.
Choose Datadog (/v1/events API) as the Notification Method
Under Channel Type, select Datadog (/v1/events API).
Add headers: You can add custom headers to events for enhanced filtering and categorization in Datadog.
Click on Finish.
The notification rule is saved and is by default enabled. Once the Pipeline is run, the configured Pipeline events get ingested into Datadog.
Install Harness Notifications integration in Datadog (optional)
Users with Administrator permissions in Datadog can configure integration settings for the entire instance or for specific projects or groups.
In your Datadog account, click on Integrations in the left sidebar.
On the Integrations page, search for Harness Notifications.
Hover over the Harness Notifications integration card and click on Install.
Now the Pipeline events notifications will be tagged with source:harness_notifications.
Harness Pipeline success event in Datadog with source:harness_notifications
Use Cases and Benefits
Leverage Datadog's dashboards to visualize pipeline performance
Use custom headers to categorize events for easier filtering in Datadog
Create alerts in Datadog for unhealthy trends in Harness pipelines based on ingested notifications. For example, an engineer can set up alerts for failed stages in critical pipelines, enabling rapid response to issues before they impact production.
Example: A sample pipeline
To demonstrate the power of Harness Pipeline Notifications for Datadog, let's walk through a real-world scenario using a sample pipeline. This example will showcase how the integration provides critical visibility and enables rapid response to issues.
Our Sample Pipeline
We'll use a straightforward yet realistic pipeline consisting of two key stages:
Approval Stage: A manual gate requiring sign-off before deployment.
Deploy Stage: Automated deployment to a production environment.
Sample Pipeline in Harness
Setting up Notifications
For this pipeline, we've configured a notification rule to send all pipeline events to Datadog. This includes:
Pipeline start/end
Stage start/end
Step success/failure
Overall pipeline success/failure
Pipeline notification rule with Datadog channel
Scenario 1: Successful Deployment
When everything goes smoothly, here's what you'll see in Datadog:
Pipeline Start Event: Marks the beginning of the process.
Approval Stage Start: Notifies relevant team members that approval is needed.
Approval Stage End: Confirms the deployment has been approved.
Deploy Stage Start: Indicates the deployment process has begun.
Deploy Stage End: Signals successful completion of deployment.
Pipeline End Event: Confirms the entire process has completed successfully.
Pipeline success event in Datadog
These events provide a clear timeline of the deployment process, allowing teams to track progress and confirm successful execution.
Scenario 2: Deployment Failure
Now, let's consider what happens when something goes wrong during the Deploy stage:
Pipeline Start Event: Process begins normally.
Approval Stage Events: Proceed as expected.
Deploy Stage Start: Deployment begins.
Rollout Deployment Step Failure:
Datadog receives an immediate notification of the failure.
The event includes details such as the specific step, error message, and relevant metadata.
Deploy Stage Failure: Triggered as a result of the step failure.
Pipeline Failure Event: Indicates the overall pipeline has failed.
In Datadog, these events would appear like this:
Rollout Deployment step failure event in Datadog
Pipeline failure event in Datadog
Once the events are sent to Datadog, you can then create a case or declare an incident which can then be assigned to a user or on-call engineer based on your configured workflow.
Leveraging Datadog's Capabilities
With these events in Datadog, your team can:
Create Targeted Alerts: Set up notifications for critical failures, ensuring the right people are informed immediately.
Build Informative Dashboards: Visualize pipeline health for a holistic view.
Perform Detailed Analysis: Use Datadog's analytics to identify patterns, such as frequent failures in specific stages or steps.
Streamline Incident Response: Quickly create incidents from pipeline failure events, automatically assigning them to the appropriate team or on-call engineer.
Conclusion
Harness Pipeline Notifications for Datadog bridges the gap between your CI/CD processes and your monitoring infrastructure. By providing real-time pipeline event notifications directly in Datadog, we're empowering teams to respond faster, collaborate more effectively, and maintain a clear view of their software delivery process.
Ready to take your pipeline visibility to the next level? Enable Harness Pipeline Notifications for Datadog today and experience the difference.
Get started now:
Log into your Harness account
Enable the PIPE_DATADOG_NOTIFICATIONS feature flag
Set up your first Datadog notification rule in your pipeline
Questions or feedback? We'd love to hear from you! Contact our support team or visit the Harness Developer Hub for more information.