Make the PagerDuty Events API v2 endpoint configurable. - #13968
Merged
Conversation
wu-sheng
previously approved these changes
Aug 5, 2026
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Makes the PagerDuty Events API v2 endpoint configurable (defaulting to the TLS US endpoint) and fixes HTTP alarm hook success handling to treat all 2xx responses as successful.
Changes:
- Add configurable
events-api-urlto PagerDuty hook settings with a TLS-by-default endpoint and EU endpoint documentation. - Fix
HttpAlarmCallbackto treat any 2xx status as success (avoiding false ERROR logs for 202). - Add/extend tests and update docs/changelog accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| oap-server/server-starter/src/main/resources/alarm-settings.yml | Documents the new events-api-url option in example config. |
| oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/alarm/HttpAlarmCallbackTest.java | Adds tests for HTTP hook success/failure logging behavior. |
| oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/alarm/HttpAlarmCallback.java | Treats all 2xx HTTP responses as successful deliveries. |
| oap-server/server-alarm-plugin/src/test/resources/alarm-settings.yml | Adds events-api-url to test config fixtures. |
| oap-server/server-alarm-plugin/src/test/java/org/apache/skywalking/oap/server/core/alarm/provider/pagerduty/PagerDutyHookCallbackTest.java | Adds tests for default TLS endpoint and configured endpoint posting. |
| oap-server/server-alarm-plugin/src/test/java/org/apache/skywalking/oap/server/core/alarm/provider/RulesReaderTest.java | Verifies events-api-url defaulting and override parsing. |
| oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/pagerduty/PagerDutySettings.java | Introduces default Events API endpoint constant + configurable field. |
| oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/pagerduty/PagerDutyHookCallback.java | Uses configured eventsApiUrl instead of a hard-coded endpoint. |
| oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/RulesReader.java | Parses events-api-url and warns on non-HTTPS configuration. |
| docs/en/setup/backend/backend-alarm.md | Documents events-api-url usage and TLS warning behavior. |
| docs/en/changes/changes.md | Adds changelog entries for PagerDuty endpoint/TLS and 2xx handling fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reject a malformed or non-http(s) events-api-url while alarm-settings.yml is read, so a typo fails startup (or the dynamic config update) with a message naming the setting. Left unvalidated it reached URI.create once per alarm inside PagerDutyHookCallback, where the surrounding catch dropped every alarm with only an error log. A scheme-less value such as events.pagerduty.com/v2/enqueue parses as a valid relative URI, so the check also requires an absolute URL with a host. The non-https warning moves into the same method, where it now applies only to an explicitly configured endpoint - the default is always https. Also reword the changelog entry, which read 'posting to ... defaults to ...'.
wu-sheng
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
And make the endpoint default to https://events.pagerduty.com/v2/enqueue.
CHANGESlog.