Quickstart: Tracing (Python)
Last updated
Was this helpful?
Last updated
Was this helpful?
Phoenix supports three main options to collect traces:
Use to mark functions and code blocks.
Use to capture all calls made to supported frameworks.
Use instrumentation. Supported in and , among many other languages.
This example uses options 1 and 2.
Sign up for an Arize Phoenix account at
Grab your API key from the Keys option on the left bar.
In your code, set your endpoint and API key:
In your code, set your endpoint:
To collect traces from your application, you must configure an OpenTelemetry TracerProvider to send traces to Phoenix.
Functions can be traced using decorators:
Input and output attributes are set automatically based on my_func
's parameters and return.
OpenInference libraries must be installed before calling the register function
You should now see traces in Phoenix!
Run Phoenix using Docker, local terminal, Kubernetes etc. For more information, .
Phoenix can also capture all calls made to supported libraries automatically. Just install the :
Explore tracing
View use cases to see