For AI agents and assistants: visit https://docs.pagerduty.com/llms.txt for the index.
Workflow Actions
Grafana: Get Trace
Retrieves a trace by ID from a Grafana Tempo datasource as a flat list of spans.
Availability
See the Incident Workflow Actions Overview table for the plans this workflow is available on.
Description
Retrieve a trace by ID from a Grafana Tempo datasource as a flat list of spans sorted by start time. Use this action to inspect the full path of a request, including which services it crossed and which spans failed.
Instructions
- If you have not done so, follow the instructions to Create an Incident Workflow.
- When the instructions prompt you to add actions, select this action.
- Enter the following Inputs and click Save.
- Continue following instructions to Publish the Workflow.
- When the action runs, you will see the Outputs listed below.
Inputs
Field References
Fields with the {+} icon accept Field References, which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click {+}, or enter {{, and select relevant fields. Refer to the Field References article for more information.
| Name | Description |
|---|---|
| Connection Input | The Grafana Connection to use. |
| Datasource | The Tempo datasource UID to read the trace from. |
| Trace ID | The trace ID as a hex string, for example 2dde0cee77ae5dc9c17ade3689eb2e54. |
| Max Spans (Optional) | Maximum number of spans to return, earliest first, from 1 to 5000. Defaults to 500. |
Outputs
| Name | Description |
|---|---|
| Spans | Array of spans sorted by start time, each with traceId, spanId, parentSpanId, name, serviceName, kind, startTime, durationMs, status, and attributes. |
| Trace ID | The normalized trace ID that was requested. |
| Span Count | Total number of spans in the trace. |
| Returned Span Count | Number of spans returned after applying Max Spans. |
| Error Span Count | Number of spans with an error status. |
| Service Names | Array of the service names in the trace. |
| Trace Duration | Time between the first span start and the last span end, in milliseconds. |
| Truncated | Whether the trace had more spans than Max Spans. |
| Result | Value that shows if the action was successful or not. Either Success or Failed. |
| Result Summary | Brief description of what the action did or if it failed. |
| Error | Brief description that is populated if the action failed. |