Skip to content

Conversation

davecrighton
Copy link

@davecrighton davecrighton commented Oct 8, 2025

Proposed changes

This PR ensures that the parent request log context is used when constructing the log context for webhook deliveries. This makes it easier to correlate the root cause of webhook delivery failures with the rest of the log stream for a particular event.

Fixes # n/a


Types of changes

  • Bug fix
  • New feature added
  • Documentation Update

Please make sure to follow these points

  • I have read the contributing guidelines.
  • I have performed a self-review of my own code or work.
  • My changes generates no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • My changes have sufficient code coverage (unit, integration, e2e tests).

Screenshots (If Applicable)


Other Information

Any message for the reviewer or kick off the discussion by explaining why you considered this particular solution, any alternatives etc.

Dave Crighton added 2 commits October 8, 2025 15:28
Signed-off-by: Dave Crighton <[email protected]>
Copy link
Contributor

@EnriqueL8 EnriqueL8 left a comment

Choose a reason for hiding this comment

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

looks good - a comment on verifying where this is called if it's added already

// Generate a bad-gateway error response - we always want to send something back,
// rather than just causing timeouts
log.L(wh.ctx).Errorf("Failed to invoke webhook: %s", gwErr)
log.L(ctx).Errorf("Failed to invoke webhook: %s on subscription %s", gwErr, sub.ID)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's the CTX that should have the sub.ID in it - this is a transport layer that could be used in anything, it so happens that you want more logging as part of subscriptions

Copy link
Contributor

Choose a reason for hiding this comment

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

I realize that his was already the case before in some order log lines, so worth validating that when we call buildPayload the ctx does have the subscription - which means the connID should be added now

Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.96%. Comparing base (f67a468) to head (5b471f0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1703   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files         342      342           
  Lines       30437    30439    +2     
=======================================
+ Hits        30425    30427    +2     
  Misses          8        8           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants