Skip to content

Conversation

@disq
Copy link
Member

@disq disq commented Jan 9, 2026

Part of https://linear.app/cloudquery/issue/ENG-2544/

Goes with cloudquery/plugin-pb-go#600

Brings back sentry init and panic handling from #1724

@disq disq marked this pull request as ready for review January 9, 2026 10:38
@disq disq requested a review from a team as a code owner January 9, 2026 10:38
@disq disq requested a review from hermanschaaf January 9, 2026 10:38
@murarustefaan
Copy link
Member

murarustefaan commented Jan 9, 2026

@disq I'm wondering if it would not be better to have DSNs hardcoded in plugins as we used to have (trough a SDK option) rather than having them injected on-demand since the latter could cause mix-matches between plugins. This way we can opt-in Sentry, but the DSNs would be plugin-tied rather than dynamic.

@disq disq marked this pull request as draft January 9, 2026 13:30
@disq disq changed the title feat: Add Sentry option to spec feat: Add optional Sentry support Jan 9, 2026
Long: servePluginShort,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, _ []string) error {
doSentry, _ := strconv.ParseBool(os.Getenv("CQ_SENTRY_ENABLED"))
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the thing to enable sentry.

@disq disq marked this pull request as ready for review January 9, 2026 14:27
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, _ []string) error {
doSentry, _ := strconv.ParseBool(os.Getenv("CQ_SENTRY_ENABLED"))
if doSentry && noSentry {
Copy link
Member

Choose a reason for hiding this comment

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

For future us, but we'll probably want to remove noSentry.

Comment on lines +231 to +242
ServerName: "oss", // set to "oss" on purpose to avoid sending any identifying information
// https://docs.sentry.io/platforms/go/configuration/options/#removing-default-integrations
Integrations: func(integrations []sentry.Integration) []sentry.Integration {
var filteredIntegrations []sentry.Integration
for _, integration := range integrations {
if integration.Name() == "Modules" {
continue
}
filteredIntegrations = append(filteredIntegrations, integration)
}
return filteredIntegrations
},
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Copy link
Member Author

Choose a reason for hiding this comment

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

Very old code :)

@disq disq added the automerge label Jan 9, 2026
@kodiakhq kodiakhq bot merged commit dab2ce8 into main Jan 9, 2026
9 checks passed
@kodiakhq kodiakhq bot deleted the feat/sentry-in-spec branch January 9, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants