fix(observability): lead Sentry issues with the real error, not just the event slug#1636
Merged
Conversation
…the event slug forwardStructuredLogToSentry titled each issue with only obj.event and buried the real failure in a 'log' context blob — so operators had to open each issue to learn what broke. Now: - title leads with the failure: "<event>: <message ?? error>" (e.g. orb_broker_unavailable: The operation was aborted due to timeout) - index filterable tags for the dimensions operators search/group by (repo, installationId, pull, pr, project, kind, deliveryId), present values only - fingerprint by event so recurrences collapse into one issue instead of fragmenting on the variable detail now in the title Pairs with the source-side instrumentation (#1605/#1619/#1625/#1627/#1628): those make failures reach Sentry; this makes each issue legible at a glance.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1636 +/- ##
=======================================
Coverage 95.53% 95.53%
=======================================
Files 204 204
Lines 22084 22090 +6
Branches 7972 7975 +3
=======================================
+ Hits 21097 21103 +6
Misses 412 412
Partials 575 575
🚀 New features to boost your workflow:
|
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.
Summary
Self-host Sentry issues showed only the event slug as the title (e.g.
orb_broker_unavailable) with the real failure buried in a "log" context blob — so operators had to open each issue and dig to learn what actually broke. The forwarder logged rich data but didn't surface it.forwardStructuredLogToSentrynow:"<event>: <message ?? error>"(e.g.orb_broker_unavailable: The operation was aborted due to timeout) instead of just the slug, so the issue list is self-explanatory.repo,installationId,pull,pr,project,kind,deliveryId, …) — present values only.This pairs with the source-side instrumentation (#1605/#1619/#1625/#1627/#1628): those make failures reach Sentry at error level; this makes each issue legible at a glance (proper message + level + tags), so future problems surface as self-describing Sentry issues instead of something to hunt for.
Scope
selfhost/sentry.ts+ its test).site//CNAME/Pages; followsCONTRIBUTING.md.Validation
git diff --check·actionlint·typechecktest:coverage— new test asserts the detail-led title + tags + fingerprint; existing forwarder tests (event-only title, message-only/fatal, generic fallback, routine-log skip, no-op-when-off) all still pass and cover the title ternary's other arms + the tag-loop's absent branch. Mock scope gainssetFingerprint.test:workers·build:mcp·test:mcp-pack·ui:*·npm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
beforeSend(scrubEvent) still redacts secret-keyed fields before any event leaves the box; this only changes the title/tags built from already-logged, non-secret fields (event/message/error/repo/ids).Notes
installStructuredLogForwarding); ships on the next engine rebuild.