The Python tracing library allows you to collect and monitor your Python application traces, calls, metrics, and correlation to logs.

📘

Tracing Lambda functions

To trace AWS Lambda functions in Python please refer to the following AWS Lambda tracing.

Installation

Install our Python library using pip:

pip install -U epsagon

Setup

To run the library as part of your application, you can choose between one of the following methods:

  1. Using auto-tracing.
  2. Calling the SDK.

Auto-tracing

Auto-tracing loads the Epsagon library as part of your application. Configurations can be done through the environment variables:

export EPSAGON_TOKEN=<EPSAGON-TOKEN>
export EPSAGON_APP_NAME=<APP-NAME-STAGE>
export AUTOWRAPT_BOOTSTRAPS=epsagon

python <APP-NAME>
ENV EPSAGON_TOKEN=<EPSAGON-TOKEN>
ENV EPSAGON_APP_NAME=<APP-NAME-STAGE>
ENV AUTOWRAPT_BOOTSTRAP=epsagon

CMD python <APP-NAME>

Calling the SDK

Another simple alternative is to copy the snippet into your code:

import epsagon

epsagon.init(
    token=<EPSAGON-TOKEN: str>,
    app_name=<APP-NAME-STAGE: str>
    metadata_only=False,
)

The supported frameworks and libraries are listed here.

Verification

Now that you’ve completed the setup, you can see new traces coming up on your traces search screen. If you don't see any please refer to the FAQ section.

📘

Further reading

The tracing library is open source and available on GitHub. For more detailed configurations and features read about the tracing library.


What’s Next

Learn more about the tracing library

Did this page help you?