|docs
Start Trial

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.

View as Markdown

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

  1. If you have not done so, follow the instructions to Create an Incident Workflow.
  2. When the instructions prompt you to add actions, select this action.
  3. Enter the following Inputs and click Save.
  4. Continue following instructions to Publish the Workflow.
  5. 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.

NameDescription
Connection InputThe Grafana Connection to use.
DatasourceThe Tempo datasource UID to read the trace from.
Trace IDThe 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

NameDescription
SpansArray of spans sorted by start time, each with traceId, spanId, parentSpanId, name, serviceName, kind, startTime, durationMs, status, and attributes.
Trace IDThe normalized trace ID that was requested.
Span CountTotal number of spans in the trace.
Returned Span CountNumber of spans returned after applying Max Spans.
Error Span CountNumber of spans with an error status.
Service NamesArray of the service names in the trace.
Trace DurationTime between the first span start and the last span end, in milliseconds.
TruncatedWhether the trace had more spans than Max Spans.
ResultValue that shows if the action was successful or not. Either Success or Failed.
Result SummaryBrief description of what the action did or if it failed.
ErrorBrief description that is populated if the action failed.