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.
Envrionment Variable | Description | Required |
---|---|---|
SENTRY_DSN |
The DSN for the target sentry project | True |
METAFLOW_PROFILE |
Used by this plugin to determine the environment. | False |
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
File details
Details for the file metaflow-sentry-logger-0.1.0.tar.gz
.
File metadata
- Download URL: metaflow-sentry-logger-0.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f8e375e5ab1ff3fa194afbd34fca9409689ecc2b63fe3b11182915cb0edcb86 |
|
MD5 | d774374c6e7e24ddc08dd9458a3f3c30 |
|
BLAKE2b-256 | 046ba5b0dc04eb6404b6996c2912f15dcab9e39ecafcd9254dfe8bd729001d17 |
File details
Details for the file metaflow_sentry_logger-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: metaflow_sentry_logger-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 937b4194e9db0a89b174add201adf8de931b7f6b7f1b953a5ed7c02bb948b8e2 |
|
MD5 | be7a50013935795b2b620eec1998394c |
|
BLAKE2b-256 | f22b1e78d45f28ff8123405b4847bc3d25862f7a189b423e8ad68dc06362336f |