Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make writing default sentry properties optional #571

Closed
SupaHam opened this issue Feb 6, 2023 · 2 comments
Closed

Make writing default sentry properties optional #571

SupaHam opened this issue Feb 6, 2023 · 2 comments
Assignees

Comments

@SupaHam
Copy link

SupaHam commented Feb 6, 2023

Summary

There should be a way to disable the forceful nature of some sentry defaults being inserted for transactions

Motivation

#570 is an issue with concurrent writes caused by sentry's transaction submission code. SDK tries to be useful and inserts data which isn't accurate to the context of the user. In our case we have access to device model but not CPU, arch etc, (which we don't have access to) so sentry will insert that automatically, but it ends up crashing the application instead. Crash rate is low, but still non-zero and that shouldn't be acceptable from a library of error reporting tools.

@cleptric
Copy link
Member

cleptric commented Feb 6, 2023

You can overwrite which integrations are applied by passing ClientOptions.Integrations during the SDK init.

sentry.Init(sentry.ClientOptions{
	Integrations: func(integrations []sentry.Integration) []sentry.Integration {
		var filteredIntegrations []sentry.Integration
		for _, integration := range integrations {
			if integration.Name() == "Environment" {
				continue
			}
			filteredIntegrations = append(filteredIntegrations, integration)
		}
		return filteredIntegrations
	},
})

@cleptric cleptric self-assigned this Feb 6, 2023
@SupaHam
Copy link
Author

SupaHam commented Feb 6, 2023

Alright, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants