Learn how to instrument the CrewAI Python SDK with LangWatch.
langwatch.setup()
instrumentors
list in the langwatch.setup()
call. LangWatch will then manage the lifecycle of this instrumentor.
pip install opentelemetry-instrumentation-crewai
pip install openinference-instrumentation-crewai
Consult the specific library’s documentation for the exact package name and instrumentor class if the above assumptions are incorrect.TracerProvider
configured in your application (or if LangWatch is configured to use the global provider), you can use the community instrumentor’s instrument()
method directly. LangWatch will automatically pick up the spans generated by these instrumentors as long as its exporter is part of the active TracerProvider
.
langwatch.setup(instrumentors=[...])
, LangWatch handles the setup and lifecycle of the instrumentor.CrewAIInstrumentor().instrument()
), ensure that the TracerProvider
used by the instrumentor is the same one LangWatch is exporting from. This usually means LangWatch is configured to use an existing global provider or one you explicitly pass to langwatch.setup()
.