Python
The Python tracing library allows you to collect and monitor your Python application traces, calls, metrics, and correlation to logs.
#
Tracing Lambda functionsTo trace AWS Lambda functions in Python please refer to the following AWS Lambda tracing.
#
InstallationInstall our Python library using pip
:
pip install -U epsagon
#
SetupTo run the library as part of your application, you can choose between one of the following methods:
- Using auto-tracing.
- Calling the SDK.
#
Auto-tracingAuto-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>
#
Calling the SDKAnother 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.
#
VerificationNow 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 readingThe tracing library is open source and available on GitHub. For more detailed configurations and features read about the tracing library.