skillfed

datadog-logger

Python logging handler for DataDog events

datadog-logger v1.0.3 449.4K downloads/30d#6,595 on PyPI
Permissive license MIT Active released

What it is and what it does

Datadog Logger is a Python logging handler that bridges the standard logging module to Datadog's Events Explorer. Instead of sending logs to Datadog's Log Management product (which requires separate configuration), this handler converts log records into Datadog events, allowing you to surface ERROR and higher-level messages as discrete events that can be tagged, mentioned, and alerted on.

You configure it by either calling the convenience function `log_error_events()` on the root logger or manually instantiating `DatadogLogHandler` and adding it to specific loggers. The handler converts the log message into an event title, includes the full formatted record (and stack trace if present) as event text, and appends any mentions you specify. It requires only the datadog package as a dependency and supports Python 3.10 and later.

Use it for:

  • Alert on application errors by sending ERROR and CRITICAL logs as Datadog events tagged for your team.
  • Route specific logger output to Datadog events while keeping other logs local or in a separate system.
  • Notify Slack or other integrations via Datadog mentions when critical log events occur.
  • Track exceptions with full stack traces as discrete events in Datadog's Events Explorer.
  • Add custom tags to log-based events for filtering and correlation in Datadog dashboards.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Sends Python log messages to Datadog as Events in the Events Explorer via a custom logging.Handler, with support for tags and mentions.

Yes, if you use Datadog and want to surface application errors as events in the Events Explorer with minimal setup. The single dependency, permissive license, and active maintenance make it a low-friction choice. Not suitable if you need Datadog's Log Management product or log aggregation beyond event creation.

Install

datadog-logger on PyPI

pip

pip install datadog-logger

uv

uv add datadog-logger

poetry

poetry add datadog-logger

Installing datadog-logger

Before you install

Low install friction with a single runtime dependency on datadog. Package is actively maintained with a recent release.

License in practice

MIT license permits commercial and private use with minimal restrictions.

Quickstart

pip install datadog-logger

import datadog
from datadog_logger import log_error_events
import logging

datadog.initialize(api_key="api-key", app_key="app-key")
logging.basicConfig()
log_error_events(tags=["tag1:value"], mentions=["@devs"])
logging.error("Oh no!")

Requires Datadog API credentials (api_key and app_key) and Python 3.10 or later.

Verify before relying

  • Whether the package works with Datadog's newer Log Management product or only with the Events Explorer as documented.
  • Performance characteristics when logging high volumes of events to Datadog.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — datadog
Maintenance actively maintained — 18 days since the last release
First released
Downloads 449,443/month — #6,595 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: datadog_logger-1.0.3-py3-none-any.whl

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

datadog event loggingpython logging handler datadogsend logs to datadog eventsdatadog event alertspython datadog integration loggingdatadog error event handlerlogging to datadog events explorer
loggingdatadog-integrationevent-alerting

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

datadog

Provides a Python client library to send…

permissive · top 1,000 on PyPI

mdc

Adds Mapped Diagnostic Context (MDC) support to…

unclear · top 15,000 on PyPI

fluent-logger

Sends structured event logs from Python…

unclear · top 5,000 on PyPI

django-datadog-logger

Integrates Django applications with Datadog…

permissive · top 15,000 on PyPI

seqlog

SeqLog sends Python log records to Seq, a…

permissive · top 15,000 on PyPI

Flask-Datadog

Flask-Datadog provides a Flask extension to…

permissive · top 15,000 on PyPI

multiprocessing-logging

Provides a logging handler that tunnels log…

copyleft · top 15,000 on PyPI

cloudwatch

A Python logging handler that sends log events…

permissive · top 15,000 on PyPI

python-logging-loki

A Python logging handler that sends log records…

permissive · top 5,000 on PyPI

safe-init

Safe Init wraps AWS Lambda handlers to provide…

permissive · top 15,000 on PyPI