Quickstart: Tracing
Overview
Phoenix supports three main options to collect traces:
Use Phoenix's decorators to mark functions and code blocks.
Use automatic instrumentation to capture all calls made to supported frameworks.
Use base OpenTelemetry instrumentation. Supported in Python and TS / JS
This example uses options 1 and 2.
Connect to Phoenix
To collect traces from your application, you must configure an OpenTelemetry TracerProvider to send traces to Phoenix.
Trace your own functions
Functions can be traced using decorators:
Input and output attributes are set automatically based on my_func
's parameters and return.
Trace all calls made to a library
Phoenix can also capture all calls made to supported libraries automatically. Just install the respective OpenInference library:
OpenInference libraries must be installed before calling the register function
View your Traces in Phoenix
You should now see traces in Phoenix!
Next Steps:
Explore tracing integrations
View use cases to see end-to-end examples
Last updated
Was this helpful?