Skip to main content

Epsagon Instrumentation for Python

Project description

Epsagon Instrumentation for Python

Build Status Pyversions PypiVersions

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

epsagon-1.0.51.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epsagon-1.0.51-py3-none-any.whl (51.9 kB view details)

Uploaded Python 3

File details

Details for the file epsagon-1.0.51.tar.gz.

File metadata

  • Download URL: epsagon-1.0.51.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

Hashes for epsagon-1.0.51.tar.gz
Algorithm Hash digest
SHA256 dc15dc13d624acca7ce957d44a6f794196a6d85765353f240d2a7447797bbd05
MD5 5e42b1785f3fe05e67dd88ffb75f8b08
BLAKE2b-256 6703a2dae32930f639a90a9e67313552ba680903a7399d9cc1170b1c5aa272a6

See more details on using hashes here.

File details

Details for the file epsagon-1.0.51-py3-none-any.whl.

File metadata

  • Download URL: epsagon-1.0.51-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

Hashes for epsagon-1.0.51-py3-none-any.whl
Algorithm Hash digest
SHA256 a118729016ce85100393bfabd4e8c4d2409de5d6fd8ab66947d69b70b543beaf
MD5 8c402a6b7a665b8efb4212f1acb395d8
BLAKE2b-256 ebf5cae7fc4c2541145694d99eba6bb8f3b0388b332ebff2b595f098c3f450e4

See more details on using hashes here.

Supported by

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