Epsagon Instrumentation for Python
Project description
Epsagon Instrumentation for Python
This package provides an instrumentation to Python code running on functions for collection of distributed tracing and performance monitoring.
Installation
From your project directory:
$ pip install epsagon
More details about lambda deployments are available in the AWS documentation.
Basic Usage
Simply use our decorator to report metrics:
import epsagon
epsagon.init(
token='my-secret-token',
app_name='my-app-name',
metadata_only=False, # Optional, send more trace data
)
@epsagon.lambda_wrapper
def handler(event, context):
pass
Custom labels
You can add custom labels to your traces. Filters can later be used for filtering traces that contains specific labels:
@epsagon.lambda_wrapper
def handler(event, context):
epsagon.label('label', 'something_to_filter_afterwards')
epsagon.label('number_of_records_parsed_successfully', 42)
pass
Set Error
Set a custom error, maybe without even failing the function:
@epsagon.lambda_wrapper
def handler(event, context):
if 'my_param' not in event:
epsagon.error(ValueError('event missing my_param'))
pass
Copyright
Provided under the MIT license. See LICENSE for details.
Copyright 2019, Epsagon.
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 epsagon-1.0.54.tar.gz.
File metadata
- Download URL: epsagon-1.0.54.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26cb8d25fa449c6b0e78c5e58bb0ac710226021787e6c15b11979143ac96943b
|
|
| MD5 |
81bc07d126bbefe6370a50e85816e9ce
|
|
| BLAKE2b-256 |
fb418f61d29e3d220ba495418b63aa7c5238bc45b89f97895dccee2ce4e750d6
|
File details
Details for the file epsagon-1.0.54-py3-none-any.whl.
File metadata
- Download URL: epsagon-1.0.54-py3-none-any.whl
- Upload date:
- Size: 51.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
916c161cf4542c13a6087a97e289dbe3284903e22a24fd838afeba2b66f2ea7d
|
|
| MD5 |
c8a7e96a5389ade32cfde0292682a13c
|
|
| BLAKE2b-256 |
404b3946c61f45cf5d5481d68dca506668d231e74d72481a00357f8fce41b159
|