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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metaflow-sentry-logger-0.2.1.tar.gz.
File metadata
- Download URL: metaflow-sentry-logger-0.2.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10f1d5bb26e95a1423968adc8a8ec1ea9f0b839463e223a07574735b059d1572
|
|
| MD5 |
3c0fbc7348ba856064daf99b750c6126
|
|
| BLAKE2b-256 |
b857f03052a0af7ec7ed0d3af72b14897919211fa04577501065ba03a288ae61
|
File details
Details for the file metaflow_sentry_logger-0.2.1-py3-none-any.whl.
File metadata
- Download URL: metaflow_sentry_logger-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.8 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 |
e148617b996e6ff682af90a486d52b86c595404056c1a6f66e08f23561bc2e2c
|
|
| MD5 |
b53b40b012f27f061115621665de3204
|
|
| BLAKE2b-256 |
baca4c0d32706ef1100713b6a70f6d01a907e14655ba8931598fa53f3f29f6a3
|