Skip to content

Make the PagerDuty Events API v2 endpoint configurable. - #13968

Merged
wu-sheng merged 2 commits into
apache:masterfrom
wankai123:pagerDuty
Aug 5, 2026
Merged

Make the PagerDuty Events API v2 endpoint configurable. #13968
wu-sheng merged 2 commits into
apache:masterfrom
wankai123:pagerDuty

Conversation

@wankai123

Copy link
Copy Markdown
Member

And make the endpoint default to https://events.pagerduty.com/v2/enqueue.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

@wankai123 wankai123 added this to the 11.0.0 milestone Aug 5, 2026
@wankai123
wankai123 requested a lite review from Copilot August 5, 2026 07:33
@wankai123 wankai123 added the bug Something isn't working and you are sure it's a bug! label Aug 5, 2026
wu-sheng
wu-sheng previously approved these changes Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-url to PagerDuty hook settings with a TLS-by-default endpoint and EU endpoint documentation.
  • Fix HttpAlarmCallback to 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.

Comment thread oap-server/server-starter/src/main/resources/alarm-settings.yml
Comment thread docs/en/changes/changes.md Outdated
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
wu-sheng merged commit 768a954 into apache:master Aug 5, 2026
229 checks passed
@wankai123
wankai123 deleted the pagerDuty branch August 5, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working and you are sure it's a bug!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants