Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/platforms/go/guides/echo/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/echo
<Break />


```go {"onboardingOptions": {"performance": "14-17"}}
```go
import (
"fmt"
"net/http"
Expand All @@ -43,13 +43,15 @@ import (
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
if err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
// ___PRODUCT_OPTION_END___ performance
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
10 changes: 6 additions & 4 deletions docs/platforms/go/guides/fasthttp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/fasthttp
<Break />


```go {"onboardingOptions": {"performance": "12-16"}}
```go
import (
"fmt"
"net/http"
Expand All @@ -41,14 +41,16 @@ import (
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
if err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance
EnableTracing: true,
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
// ___PRODUCT_OPTION_END___ performance
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
15 changes: 12 additions & 3 deletions docs/platforms/go/guides/fiber/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ documentation](https://godoc.org/github.com/getsentry/sentry-go/fiber).

## Install

<OnboardingOptionButtons
options={[
'error-monitoring',
'performance',
]}
/>

```shell
go get github.com/getsentry/sentry-go/fiber
```
Expand All @@ -30,14 +37,16 @@ import (
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
if err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance
EnableTracing: true,
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
// ___PRODUCT_OPTION_END___ performance
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
10 changes: 6 additions & 4 deletions docs/platforms/go/guides/gin/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/gin
<Break />


```go {"onboardingOptions": {"performance": "13-17"}}
```go
import (
"fmt"
"net/http"
Expand All @@ -42,14 +42,16 @@ import (
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
if err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance
EnableTracing: true,
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
// ___PRODUCT_OPTION_END___ performance
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
10 changes: 6 additions & 4 deletions docs/platforms/go/guides/http/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/http
<Break />


```go {"onboardingOptions": {"performance": "12-16"}}
```go
import (
"fmt"
"net/http"
Expand All @@ -41,14 +41,16 @@ import (
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
if err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance
EnableTracing: true,
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
// ___PRODUCT_OPTION_END___ performance
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
10 changes: 6 additions & 4 deletions docs/platforms/go/guides/iris/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/iris
<Break />


```go {"onboardingOptions": {"performance": "12-16"}}
```go
import (
"fmt"

Expand All @@ -41,14 +41,16 @@ import (
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
if err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance
EnableTracing: true,
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
// ___PRODUCT_OPTION_END___ performance
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
4 changes: 3 additions & 1 deletion docs/platforms/go/guides/logrus/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ go get github.com/getsentry/sentry-go/logrus

<SignInNote />

```go {"onboardingOptions": {"performance": "14-17"}}
```go
import (
"fmt"
"net/http"
Expand All @@ -42,8 +42,10 @@ import (
logger.Level = logrus.DebugLevel
logger.Out = os.Stderr

// ___PRODUCT_OPTION_START___ performance
// Send only ERROR and higher level logs to Sentry
sentryLevels := []logrus.Level{logrus.ErrorLevel, logrus.FatalLevel, logrus.PanicLevel}
// ___PRODUCT_OPTION_END___ performance

// Initialize Sentry
sentryHook, err := sentrylogrus.New(sentryLevels, sentry.ClientOptions{
Expand Down
8 changes: 5 additions & 3 deletions docs/platforms/go/guides/negroni/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/negroni
<Break />


```go {"onboardingOptions": {"performance": "13-17"}}
```go
import (
"fmt"
"net/http"
Expand All @@ -42,14 +42,16 @@ import (
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
if err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// ___PRODUCT_OPTION_START___ performance
EnableTracing: true,
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
4 changes: 2 additions & 2 deletions docs/platforms/go/guides/zerolog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func main() {
err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
// Modify or filter events before sending them to Sentry
return event
Expand Down