Skip to content

chore: Remove RunSpan in favor of defer style spans#5767

Merged
shiroyasha merged 1 commit into
mainfrom
remove-run-span
Jun 29, 2026
Merged

chore: Remove RunSpan in favor of defer style spans#5767
shiroyasha merged 1 commit into
mainfrom
remove-run-span

Conversation

@shiroyasha

Copy link
Copy Markdown
Collaborator

Two reasons:

1/ Cosmetically: The RunSpan was dirtying up the call site
2/ Controllable error: The RunSpan was handling the error no matter what, even if we don't want to report it.

Signed-off-by: Igor Šarčević <igor@operately.com>
@superplanehq-integration

Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

@shiroyasha

Copy link
Copy Markdown
Collaborator Author

I hate this:

CleanShot 2026-06-29 at 19 09 21@2x

But, that is a job for another PR.

@superplane-gh-integration-9000

Copy link
Copy Markdown

Risk: 15/100 (very low)

Summary

Replaces the RunSpan callback pattern with a defer-based Span helper across 17 files, adds gorm.ErrRecordNotFound suppression, and includes new unit tests.

Concerns

  • telemetry package now imports gorm.io/gorm, coupling observability to the ORM layer.
  • serializeCanvasVersions and serializeAdminOrganizations declare var err error never assigned; span errors will never be recorded.
  • listAllOrganizations passes ctx to the span but does not thread ctx into models.ListAllOrganizations; DB queries won't be traced under that span.
  • loadRootEventsForRunsSpan is a thin single-use wrapper with an inconsistent naming convention vs. other helpers.

Recommended reviewers: forestileao, lucaspin

@shiroyasha shiroyasha merged commit 7788876 into main Jun 29, 2026
5 of 7 checks passed
@shiroyasha shiroyasha deleted the remove-run-span branch June 29, 2026 19:39
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