From d595c727b4f885ca32a8fde2274b74c423fe4255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emir=20Ribi=C4=87?= Date: Fri, 13 Sep 2024 16:51:52 +0200 Subject: [PATCH 1/5] add Integrations page for Go --- .../go/common/integrations/index.mdx | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docs/platforms/go/common/integrations/index.mdx diff --git a/docs/platforms/go/common/integrations/index.mdx b/docs/platforms/go/common/integrations/index.mdx new file mode 100644 index 0000000000000..fe3f53b0fe3e8 --- /dev/null +++ b/docs/platforms/go/common/integrations/index.mdx @@ -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. + +### EnvironmentIntegration + +This integration fills the event data with Go runtime and OS-level information, such as CPU count, Go architecture, and runtime version. + +### 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. + +### 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 + }, +}) +``` From afb1a389d35ff132241951899e97a0a47cb334d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emir=20Ribi=C4=87?= Date: Mon, 14 Oct 2024 18:39:55 +0200 Subject: [PATCH 2/5] Update docs/platforms/go/common/integrations/index.mdx Co-authored-by: Michi Hoffmann --- docs/platforms/go/common/integrations/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/go/common/integrations/index.mdx b/docs/platforms/go/common/integrations/index.mdx index fe3f53b0fe3e8..5ad27825f0e12 100644 --- a/docs/platforms/go/common/integrations/index.mdx +++ b/docs/platforms/go/common/integrations/index.mdx @@ -42,7 +42,7 @@ This integration captures context around lines of code that caused an error. It ### 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. +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. ### Disabling certain Integrations From bb8dcad3dc9415643e85a4982a974a26d6138e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emir=20Ribi=C4=87?= Date: Mon, 14 Oct 2024 18:40:02 +0200 Subject: [PATCH 3/5] Update docs/platforms/go/common/integrations/index.mdx Co-authored-by: Michi Hoffmann --- docs/platforms/go/common/integrations/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/go/common/integrations/index.mdx b/docs/platforms/go/common/integrations/index.mdx index 5ad27825f0e12..5fb2716cd1f4b 100644 --- a/docs/platforms/go/common/integrations/index.mdx +++ b/docs/platforms/go/common/integrations/index.mdx @@ -22,7 +22,7 @@ sentry.Init(sentry.ClientOptions{ ### ModulesIntegration -This integration logs all the Go modules used in your project, including versions, as part of event details. +This integration records all Go modules used in your application, including the version, as part of event details. ### EnvironmentIntegration From 6d1bf56c7202f4633e9e542ff4f4970ab0c37887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emir=20Ribi=C4=87?= Date: Mon, 14 Oct 2024 18:40:11 +0200 Subject: [PATCH 4/5] Update docs/platforms/go/common/integrations/index.mdx Co-authored-by: Michi Hoffmann --- docs/platforms/go/common/integrations/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/go/common/integrations/index.mdx b/docs/platforms/go/common/integrations/index.mdx index 5fb2716cd1f4b..7f2a5d44c773e 100644 --- a/docs/platforms/go/common/integrations/index.mdx +++ b/docs/platforms/go/common/integrations/index.mdx @@ -26,7 +26,7 @@ This integration records all Go modules used in your application, including the ### EnvironmentIntegration -This integration fills the event data with Go runtime and OS-level information, such as CPU count, Go architecture, and runtime version. +This integration fills the event data with Go runtime and OS-level specific information, such as CPU core/thread count, Go architecture, and runtime version. ### IgnoreErrorsIntegration From 70af967989bb29c2a26f9031ae8498a58c8e9ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emir=20Ribi=C4=87?= Date: Mon, 14 Oct 2024 18:54:52 +0200 Subject: [PATCH 5/5] add sentry package --- docs/platforms/go/common/integrations/index.mdx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/platforms/go/common/integrations/index.mdx b/docs/platforms/go/common/integrations/index.mdx index 7f2a5d44c773e..b3d16ec6e0f6e 100644 --- a/docs/platforms/go/common/integrations/index.mdx +++ b/docs/platforms/go/common/integrations/index.mdx @@ -12,12 +12,11 @@ To disable default integrations, you can provide an empty list of integrations w ```go sentry.Init(sentry.ClientOptions{ - Dsn: "___PUBLIC_DSN___", - Integrations: func(i []Integration) []Integration { - return []Integration{} - }, - } -) + Dsn: "https://examplePublicKey@o0.ingest.sentry.io/0", + Integrations: func(i []sentry.Integration) []sentry.Integration { + return []sentry.Integration{} + }, +}) ``` ### ModulesIntegration @@ -26,7 +25,7 @@ This integration records all Go modules used in your application, including the ### EnvironmentIntegration -This integration fills the event data with Go runtime and OS-level specific information, such as CPU core/thread count, Go architecture, and runtime version. +This integration fills the event data with Go runtime and OS-level specific information, such as CPU core/thread count and runtime version. ### IgnoreErrorsIntegration