Sentry logging plugins for Metaflow (metaflow.org)
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for metaflow-sentry-logger-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3af3d3ac5123e2bf11795f4915149358c65d150c689dc301f161985db39edcd |
|
MD5 | 808f7c69998e7c626beb2f77b923d1fa |
|
BLAKE2b-256 | c64525f4a850d5f5c023be15274a2c6e4f67aa408e97aef729919a30d49b19e5 |
Close
Hashes for metaflow_sentry_logger-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bba611bd5c606993e7bdbb7df865ad5e66125b593b314410805a6bd31db7ed26 |
|
MD5 | 4dafb8943f5010c1eada664f4b745e13 |
|
BLAKE2b-256 | 60e906ecbce00447bf6f836780fc777b80e3766cd2a4f1b016480215411fa10d |