-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add Integrations page for Go #11360
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
Merged
Merged
Add Integrations page for Go #11360
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d595c72
add Integrations page for Go
ribice afb1a38
Update docs/platforms/go/common/integrations/index.mdx
ribice bb8dcad
Update docs/platforms/go/common/integrations/index.mdx
ribice 6d1bf56
Update docs/platforms/go/common/integrations/index.mdx
ribice 70af967
add sentry package
ribice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| title: Integrations | ||
| description: "Learn about the automatic integrations Sentry provides and how to configure them." | ||
| sidebar_order: 500 | ||
| --- | ||
|
|
||
| ## Default Integrations | ||
|
|
||
| These integrations are enabled by default and integrate into the standard library or the Go runtime itself. They are documented so you can be aware of what they do and disable them if they cause issues. | ||
|
|
||
| To disable default integrations, you can provide an empty list of integrations when calling `sentry.Init()`. | ||
|
|
||
| ```go | ||
| sentry.Init(sentry.ClientOptions{ | ||
| Dsn: "___PUBLIC_DSN___", | ||
| Integrations: func(i []Integration) []Integration { | ||
| return []Integration{} | ||
| }, | ||
| } | ||
| ) | ||
| ``` | ||
|
|
||
| ### ModulesIntegration | ||
|
|
||
| This integration logs all the Go modules used in your project, including versions, as part of event details. | ||
ribice marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### EnvironmentIntegration | ||
|
|
||
| This integration fills the event data with Go runtime and OS-level information, such as CPU count, Go architecture, and runtime version. | ||
ribice marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### IgnoreErrorsIntegration | ||
|
|
||
| This integration allows you to ignore certain error patterns using regular expressions. It ensures that errors matching the specified patterns are not sent to Sentry. | ||
|
|
||
| ### IgnoreTransactionsIntegration | ||
|
|
||
| This integration lets you ignore specific transactions that match the provided patterns. This is useful when certain transaction names should not be captured. | ||
|
|
||
| ### ContextifyFramesIntegration | ||
|
|
||
| This integration captures context around lines of code that caused an error. It provides a snapshot of source code, including lines before and after the error, for better debugging. | ||
|
|
||
| ### GlobalTagsIntegration | ||
|
|
||
| This integration adds global tags to all events. These can be defined as environment variables using the SENTRY_TAGS_ prefix or within the client options. | ||
ribice marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Disabling certain Integrations | ||
|
|
||
| You can customize the list of integrations without disabling all the default ones using the Integrations option. In the example below, all integrations are enabled except the ContextifyFrames Integration: | ||
|
|
||
| ```go | ||
| sentry.Init(sentry.ClientOptions{ | ||
| Integrations: func(integrations []sentry.Integration) []sentry.Integration { | ||
| var filteredIntegrations []sentry.Integration | ||
| for _, integration := range integrations { | ||
| if integration.Name() == "ContextifyFrames" { | ||
| continue | ||
| } | ||
| filteredIntegrations = append(filteredIntegrations, integration) | ||
| } | ||
| return filteredIntegrations | ||
| }, | ||
| }) | ||
| ``` | ||
|
Comment on lines
+50
to
+63
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation is off.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: