Skip to main content

PyPI version

Sentry Logging Plugin for Metaflow

Enabling the use of Sentry with Metaflow

Installation

Install the plugin using pip.

pip install metaflow-sentry-logger

For development

pip install metaflow-sentry-logger[dev]

Usage

The sentry plugin can be called using either the --with sentry command line argument or through the step decorator @sentry.

Configuration

Only basic configuration is currently supported using environment variables.

Name Description Required Location
METAFLOW_SENTRY_DSN The DSN for the target sentry project True Environment Variable Metaflow Config
METAFLOW_PROFILE Used by this plugin to determine the environment. False Environment Variable

Examples

See the (examples)[examples] directory for some example flows or see the code snippets below

Using the step decorator

# examples/sample_flow.py 

from metaflow import FlowSpec, step, sentry


class MyFlow(FlowSpec):

    @step
    @sentry
    def start(self):
        print("Start step")

    @step
    @sentry
    def error(self):
        self.div_0 = 1/0

    @step
    @sentry
    def end(self):
        print("final step")

Calling using the --with command line argument

python examples/sample_flow_with.py run --with sentry

Metadata

Release files for metaflow-sentry-logger 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metaflow-sentry-logger 0.2.1
File Size Uploaded
metaflow-sentry-logger-0.2.1.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for metaflow-sentry-logger 0.2.1
File Interpreter ABI Platform
metaflow_sentry_logger-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / metaflow-sentry-logger-0.2.1.tar.gz

Download URL metaflow-sentry-logger-0.2.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
10f1d5bb26e95a1423968adc8a8ec1ea9f0b839463e223a07574735b059d1572
BLAKE2b-256 checksum
How to use checksums
b857f03052a0af7ec7ed0d3af72b14897919211fa04577501065ba03a288ae61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / metaflow_sentry_logger-0.2.1-py3-none-any.whl

Download URL metaflow_sentry_logger-0.2.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e148617b996e6ff682af90a486d52b86c595404056c1a6f66e08f23561bc2e2c
BLAKE2b-256 checksum
How to use checksums
baca4c0d32706ef1100713b6a70f6d01a907e14655ba8931598fa53f3f29f6a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page