fix: nest handler spans under webhook transaction #9

Merged
rcsheets merged 1 commit from fix/nest-handler-spans into master 2026-03-26 01:21:37 +00:00
Owner

HandleRepositoryCreated/Deleted were creating separate top-level
transactions instead of child spans under the webhook transaction.
Changed startTransaction to startSpan so the handler operations
(get_user, create_user, etc.) appear as child spans in GlitchTip.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

HandleRepositoryCreated/Deleted were creating separate top-level transactions instead of child spans under the webhook transaction. Changed startTransaction to startSpan so the handler operations (get_user, create_user, etc.) appear as child spans in GlitchTip. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix: nest handler spans under webhook transaction
Some checks failed
CI / ci (push) Has been cancelled
CI / ci (pull_request) Has been cancelled
E2E smoke test / e2e (pull_request) Has been cancelled
2e547340ba
HandleRepositoryCreated/Deleted were creating separate top-level
transactions instead of child spans under the webhook transaction.
Changed startTransaction to startSpan so the handler operations
(get_user, create_user, etc.) appear as child spans in GlitchTip.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator

Automated review by pr-reviewer v0.15.0 | Safety Check | anthropic | tracking id r-c489d0-096942
This is an AI-generated review and may contain mistakes.

Status: Completed


Verdict: LGTM — The changes properly convert top-level transactions to child spans for better tracing hierarchy without introducing any obvious bugs or security issues.
Complexity: trivial

The diff shows a straightforward refactoring to improve tracing structure by changing startTransaction to startSpan calls. The change maintains the same error handling and defer patterns while properly nesting spans under the webhook transaction. No security vulnerabilities or obvious bugs are present. The variable renaming from txCtx/tx to handlerCtx/handlerSpan is consistent throughout and the function signatures remain unchanged.

*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.15.0 | Safety Check | anthropic | tracking id `r-c489d0-096942`* *This is an AI-generated review and may contain mistakes.* **Status:** ✅ Completed --- **✅ Verdict: LGTM** — The changes properly convert top-level transactions to child spans for better tracing hierarchy without introducing any obvious bugs or security issues. **Complexity:** trivial The diff shows a straightforward refactoring to improve tracing structure by changing `startTransaction` to `startSpan` calls. The change maintains the same error handling and defer patterns while properly nesting spans under the webhook transaction. No security vulnerabilities or obvious bugs are present. The variable renaming from `txCtx`/`tx` to `handlerCtx`/`handlerSpan` is consistent throughout and the function signatures remain unchanged.
rcsheets merged commit 63863419d6 into master 2026-03-26 01:21:37 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brooktrails/forgejo-runner-operator!9
No description provided.