Skip to main content

Tracing

dlt users can configure Sentry DSN to start receiving rich information on executed pipelines, including encountered errors and exceptions. Sentry tracing is disabled by default.

When and what we send

An exception trace is sent when:

  • Any Python logger (including dlt) logs an error
  • Any Python logger (including dlt) logs a warning (enabled only if the dlt logging level is WARNING or below)
  • On unhandled exceptions

A transaction trace is sent when the pipeline.run is called. We send information when extract, normalize and load steps are completed.

The data available in Sentry makes finding and documenting bugs easy, allowing you to easily find bottlenecks and profile data extraction, normalization, and loading.

dlt adds a set of additional tags (e,g. pipeline name, destination name) to the sentry data.

Please refer to the Sentry documentation.

Enable pipeline tracing

To enable Sentry, you should configure the DSN in the config.toml:

[runtime]

sentry_dsn="https:///<...>"

Alternatively, you can use environment variables:

RUNTIME__SENTRY_DSN="https:///<...>"

The entry client is configured after the first pipeline is created with dlt.pipeline(). Feel free to use sentry_sdk init again to cover your specific needs.

💡 dlt does not have sentry client as a dependency. Remember to install it with pip install sentry-sdk.

Disable all tracing

dlt allows you to completely disable pipeline tracing, including the anonymous telemetry and Sentry. Using config.toml:

enable_runtime_trace=false

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.