Linking prompts to traces enables tracking of metrics and evaluations per prompt version. It’s the foundation of improving prompt quality over time.
After linking prompts and traces, the prompt information appears in the trace’s metadata.
For more information about traces and spans, see the Concepts guide.
How to Link Prompts to Traces
When you use langwatch.prompts.get() within a trace context, LangWatch automatically links the prompt to the trace:
Python SDK
TypeScript SDK
For more detailed information about setting up tracing in your application, see the Python Integration Guide or TypeScript Integration Guide.
← Back to Prompt Management Overview Last modified on August 15, 2026