Prometheus | Dagster Integrations
Back to integrations
Dagster + Prometheus

Dagster + Prometheus

Integrate with Prometheus via the prometheus_client library.

About this integration

This integration allows you to push metrics to the Prometheus gateway from within a Dagster pipeline.

Installation

pip install dagster-prometheus

Example

# Read the docs on Resources to learn more: https://docs.dagster.io/deployment/resources
from dagster_prometheus import PrometheusResource
from dagster import op, job

@op
def my_op(prometheus):
    prometheus.push_to_gateway("my_job_label")

@job(resource_defs={
    "prometheus": PrometheusResource(
        gateway="pushgateway.local",
    )
})
def my_job():
    my_op()

About Prometheus

Prometheus is an open-source systems monitoring and alerting toolkit. Originally built at SoundCloud, Prometheus joined the Cloud Native Computing Foundation in 2016 as the second hosted project, after Kubernetes.

Prometheus collects and stores metrics as time series data along with the timestamp at which it was recorded, alongside optional key-value pairs called labels.