Skip to content

fix(observability): add capability to inspect (lost) webhooks#165

Merged
cbartz merged 13 commits intomainfrom
fix/webhook-debug-logging
Mar 23, 2026
Merged

fix(observability): add capability to inspect (lost) webhooks#165
cbartz merged 13 commits intomainfrom
fix/webhook-debug-logging

Conversation

@cbartz
Copy link
Copy Markdown
Collaborator

@cbartz cbartz commented Mar 23, 2026

Overview

Webhook traces carried no identifying attributes, making it impossible to correlate which specific webhooks flowed through or were lost. This enriches existing spans with delivery ID, event type, job ID, repo, and action, and adds debug-level logging across the gateway and planner consume path.

Rationale

In order to troubleshoot lost webhooks, we need to have more observability.

Checklist

  • Changes comply with the project's coding standards and guidelines (see CONTRIBUTING.md and STYLE.md)
  • CONTRIBUTING.md has been updated upon changes to the contribution/development process (e.g. changes to the way tests are run)
  • Technical author has been assigned to review the PR in case of documentation changes (usually *.md files)

cbartz added 3 commits March 21, 2026 11:37
…path

Webhook traces carried no identifying attributes, making it impossible
to correlate which specific webhooks flowed through or were lost. This
enriches existing spans with delivery ID, event type, job ID, repo, and
action, and adds debug-level logging with full payload bodies across the
gateway and planner consume path.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves webhook observability across the gateway and planner consumer so individual deliveries can be correlated and “lost” webhooks can be investigated end-to-end.

Changes:

  • Centralizes GitHub webhook header constants into a shared internal/github package.
  • Enriches webhook gateway spans with GitHub delivery/event attributes and adds additional debug logging.
  • Adds delivery/job/repo/action context (and debug payload logging) in the planner consumer path.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
internal/webhook/server.go Uses shared GitHub header constants; adds span attributes and debug logs around receive/send.
internal/webhook/server_test.go Updates tests to use shared GitHub header constants.
internal/planner/consumer.go Uses shared header constants; adds delivery/job attributes and debug logs during consume.
internal/github/headers.go New shared constants for webhook header names/prefix.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

cbartz and others added 2 commits March 23, 2026 09:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cbartz cbartz marked this pull request as ready for review March 23, 2026 09:21
@cbartz cbartz enabled auto-merge (squash) March 23, 2026 10:25
@cbartz cbartz merged commit fe0e1b1 into main Mar 23, 2026
34 checks passed
@cbartz cbartz deleted the fix/webhook-debug-logging branch March 23, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants