Easily instrument your code with our custom decorators @workflow
, @agent
, and @task
@workflow
: For high-level business transactions or main entry points.@agent
: For AI agents or complex components that orchestrate multiple tasks.@task
: For individual units of work or sub-processes within a workflow or agent.@workflow
@workflow
decorator is designed to trace the entire lifecycle of a high-level operation or business workflow. It’s ideal for wrapping main functions that orchestrate multiple steps.
@agent
@agent
decorator is suited for instrumenting AI agents or classes that encapsulate a specific set of responsibilities. When applied to a class, it will automatically instrument all of its public methods.
@task
@task
decorator for more granular tracing of individual functions or methods that represent a single step or task within a larger workflow.
async
functions out of the box.