Back to integrations
Dagster + Datadog

Dagster Integration:
Dagster + Datadog

Publish metrics to Datadog from within Dagster ops and entralize your monitoring metrics.

About this integration

While Dagster provides comprehensive monitoring and observability of the pipelines it orchestrates, many teams look to centralize all their monitoring across apps, processes and infrastructure using Datadog's 'Cloud Monitoring as a Service'. The dagster-datadog integration allows you to publish metrics to Datadog from within Dagster ops.

Installation

pip install dagster-datadog

Example

import os

import dagster as dg
from dagster_datadog import DatadogResource


@dg.asset
def report_to_datadog(datadog: DatadogResource):
    datadog_client = datadog.get_client()
    datadog_client.event("Man down!", "This server needs assistance.")
    datadog_client.gauge("users.online", 1001, tags=["protocol:http"])
    datadog_client.increment("page.views")


defs = dg.Definitions(
    assets=[report_to_datadog],
    resources={
        "datadog": DatadogResource(
            api_key=os.environ["DATADOG_API_KEY"],
            app_key=os.environ["DATADOG_APP_KEY"],
        )
    },
)

About Datadog

Datadog is an observability service for cloud-scale applications, providing monitoring of servers, databases, tools, and services, through a SaaS-based data analytics platform.