Skip to main content

Sentry logging plugins for Metaflow (metaflow.org)

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metaflow-sentry-logger-0.2.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

metaflow_sentry_logger-0.2.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file metaflow-sentry-logger-0.2.1.tar.gz.

File metadata

File hashes

Hashes for metaflow-sentry-logger-0.2.1.tar.gz
Algorithm Hash digest
SHA256 10f1d5bb26e95a1423968adc8a8ec1ea9f0b839463e223a07574735b059d1572
MD5 3c0fbc7348ba856064daf99b750c6126
BLAKE2b-256 b857f03052a0af7ec7ed0d3af72b14897919211fa04577501065ba03a288ae61

See more details on using hashes here.

File details

Details for the file metaflow_sentry_logger-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for metaflow_sentry_logger-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e148617b996e6ff682af90a486d52b86c595404056c1a6f66e08f23561bc2e2c
MD5 b53b40b012f27f061115621665de3204
BLAKE2b-256 baca4c0d32706ef1100713b6a70f6d01a907e14655ba8931598fa53f3f29f6a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page