Dagster & Datadog
This feature is considered in a beta stage. It is still being tested and may change. For more information, see the API lifecycle stages documentation.
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 Datadog integration allows you to publish metrics to Datadog from within Dagster ops.
Datadog’s new Dagster integration streams event logs to Datadog and includes an out-of-the-box log pipeline and dashboard. In Datadog, navigate to the Dagster integration tile and click Connect Accounts to launch the OAuth flow. Within 10 minutes, the Dagster Overview dashboard starts showing new log events, provided there are any active Dagster jobs emitting events. Get started in Datadog or learn more in their docs.
Installation
- uv
- pip
uv add dagster-datadog
pip install dagster-datadog
Example
from dagster_datadog import DatadogResource
import dagster as dg
@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=dg.EnvVar("DATADOG_API_KEY"),
app_key=dg.EnvVar("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.