Sentry: Search Logs

📘

Availability

This workflow action is available on Business and Enterprise for Incident Management pricing plans. Contact the Sales Team to upgrade to an account with this action.

Description

Search Sentry for error events during incident triage. This action lets responders query Sentry directly from an Incident Workflow, filtering by search terms, project, and time window, so responders can pull error details into the incident timeline without leaving PagerDuty.

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 Input
(Required)
The Sentry Connection to use for the search.
QuerySentry search filter, e.g. level:error project:my-project environment:production, or free text. To filter by project name, use project:<slug> (exact, case-sensitive). Leave empty to match all error events.
ProjectNumeric Sentry project ID to limit the search to. Default is -1 (all projects). To filter by project name, use project:<slug> in the Query input instead; this field does not accept names.
Start TimeStart of the time window. Accepts an ISO 8601 timestamp (e.g. 2026-06-23T14:00:00Z) or a relative keyword (e.g. 1h, 24h, 7d). Sentry retains error events for approximately 30 days.
End TimeEnd of the time window. Accepts an ISO 8601 timestamp or Now (default).
Max ResultsMaximum number of events to return. Sentry caps a single page at 100 results.

Outputs

NameDescription
EventsArray of matching events, each including eventID, title, level, dateCreated, message, project, environment, and release.
Event CountNumber of events returned.
Query UsedThe Sentry query that was actually sent.
Time Range StartThe start time used for the search.
Time Range EndThe end time used for the search.
ResultValue that shows if the action was successful or not. Either "Success" or "Failed."
Result SummaryBrief description of what the action did, including a hint to widen or narrow the search if relevant.
ErrorBrief description that is populated if the action failed.
📘

Tips

Filtering by project name: To filter by project name, use project:<slug> inside the Query input. The Project input only accepts a numeric Sentry project ID and does not understand project names.