Skip to content

(via api-Hypernova): Make Wrap() finish span even on panic by using defer with recover#1728

Merged
macroscopeapp[bot] merged 3 commits intohypernova/apm-cleanfrom
macroscope/hypernova/apm-clean
Feb 26, 2026
Merged

(via api-Hypernova): Make Wrap() finish span even on panic by using defer with recover#1728
macroscopeapp[bot] merged 3 commits intohypernova/apm-cleanfrom
macroscope/hypernova/apm-clean

Conversation

@macroscopeapp
Copy link

@macroscopeapp macroscopeapp bot commented Feb 26, 2026

Macroscope: Fix It For Me

  • This PR originated from this comment in Add APM support to XMTPD #1589.
  • Since auto-merge is on, Macroscope will merge this PR after waiting for checks to pass.
  • If you'd rather not wait, you can always merge this yourself but no further action from you is currently needed.
  • You can also @mention Macroscope in this PR to request further changes.

Activity

Currently: Auto-merged 71c3d0e

Previously
  • Waiting on checks
  • Pushed 7a66003
  • Action failed: Lint
  • Waiting on checks
  • Pushed 530f9e2
  • Action failed: Lint
  • Waiting on checks
  • Pushed cb13488

Note

Finish span in tracing.Wrap() even when action panics

  • Adds a deferred recover handler to tracing.Wrap() that finishes the span with an error when the wrapped action panics, then re-throws the panic
  • Updates numeric tag assertions in tests to use assert.InDelta instead of assert.Equal

Macroscope summarized 7a66003.

@macroscopeapp macroscopeapp bot requested a review from a team as a code owner February 26, 2026 01:50
@macroscopeapp macroscopeapp bot merged commit 71c3d0e into hypernova/apm-clean Feb 26, 2026
13 checks passed
@macroscopeapp macroscopeapp bot deleted the macroscope/hypernova/apm-clean branch February 26, 2026 02:06
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.

1 participant