Sentry: Search Logs
AvailabilityThis 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
- 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 ReferencesFields 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 (Required) | The Sentry Connection to use for the search. |
| Query | Sentry 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. |
| Project | Numeric 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 Time | Start 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 Time | End of the time window. Accepts an ISO 8601 timestamp or Now (default). |
| Max Results | Maximum number of events to return. Sentry caps a single page at 100 results. |
Outputs
| Name | Description |
|---|---|
| Events | Array of matching events, each including eventID, title, level, dateCreated, message, project, environment, and release. |
| Event Count | Number of events returned. |
| Query Used | The Sentry query that was actually sent. |
| Time Range Start | The start time used for the search. |
| Time Range End | The end time used for the search. |
| Result | Value that shows if the action was successful or not. Either "Success" or "Failed." |
| Result Summary | Brief description of what the action did, including a hint to widen or narrow the search if relevant. |
| Error | Brief description that is populated if the action failed. |
TipsFiltering 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.
