Documentation
Concepts
Request, trace, span, and workflow — the PromptLayer telemetry model.
Four terms. One hierarchy. Everything in PromptLayer maps to this model.
- Request
- A single provider/model call — one row in the request explorer.
- Trace
- A complete execution run containing one or more requests, grouped by trace_id.
- Span
- An individual execution step within a trace — set via span in the SDK (step_name in the API).
- Workflow
- A reusable orchestration definition used to group related traces (e.g. customer_support).
Hierarchy
Structure
txt
Workflow
└── Trace
├── Span
│ └── Request
├── Span
│ └── Request
└── Span
└── Request
In the SDK, you name the workflow when starting a trace. Each trace.request() adds a span. The waterfall view shows spans in execution order with timing gaps between them.