Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Conversation

@mattjohnsonpint
Copy link
Contributor

  • Fix and simplify the path and package code needed to adjust sentry stack frames
  • Include the Go source code in the docker image so Sentry can return source context

@mattjohnsonpint mattjohnsonpint requested review from a team and Copilot July 11, 2025 01:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Fix and simplify how Sentry source paths are determined and include Go source files in the Docker image for richer Sentry context.

  • Simplify rootSourcePath logic in sentry.go and replace dynamic path computation with constants
  • Copy Go source (excluding tests) into the Docker image for Sentry source context
  • Update CHANGELOG to document the fix

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
runtime/sentryutils/sentry.go Replaced dynamic package/path resolution with constants and simplified caller-based directory walk
Dockerfile Added steps to copy Go sources and prune non-.go and test files
CHANGELOG.md Added entry for “fix: sentry source context”
Comments suppressed due to low confidence (3)

runtime/sentryutils/sentry.go:27

  • [nitpick] Constant names in Go typically use camelCase; consider renaming max_breadcrumbs to maxBreadcrumbs for consistency with Go conventions.
const max_breadcrumbs = 100

runtime/sentryutils/sentry.go:39

  • You cannot range over an integer. Replace this with a standard loop, for example: for i := 0; i < thisPackageDepth; i++ { dir = path.Dir(dir) }.
	for range thisPackageDepth {

runtime/sentryutils/sentry.go:31

  • [nitpick] The thisPackagePath constant is declared but never used. Consider removing it or leveraging it in path resolution if intended.
const thisPackagePath = "github.com/hypermodeinc/modus/runtime/sentryutils"

@mattjohnsonpint mattjohnsonpint merged commit d1f156c into main Jul 11, 2025
33 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/sentry branch July 11, 2025 01:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants