Skip to content

Commit 73b320a

Browse files
committed
refactor: migrate Golang and related guides to inline product options
sytnax related to #13361
1 parent cda95aa commit 73b320a

File tree

7 files changed

+33
-19
lines changed

7 files changed

+33
-19
lines changed

docs/platforms/go/guides/echo/index.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/echo
2929
<Break />
3030

3131

32-
```go {"onboardingOptions": {"performance": "14-17"}}
32+
```go
3333
import (
3434
"fmt"
3535
"net/http"
@@ -43,13 +43,15 @@ import (
4343
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
4444
if err := sentry.Init(sentry.ClientOptions{
4545
Dsn: "___PUBLIC_DSN___",
46+
// ___PRODUCT_OPTION_START___ performance
4647
// Set TracesSampleRate to 1.0 to capture 100%
4748
// of transactions for tracing.
4849
// We recommend adjusting this value in production,
4950
TracesSampleRate: 1.0,
50-
// Adds request headers and IP for users,
51-
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
52-
SendDefaultPII: true,
51+
// ___PRODUCT_OPTION_END___ performance
52+
// Adds request headers and IP for users,
53+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
54+
SendDefaultPII: true,
5355
}); err != nil {
5456
fmt.Printf("Sentry initialization failed: %v\n", err)
5557
}

docs/platforms/go/guides/fasthttp/index.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/fasthttp
2929
<Break />
3030

3131

32-
```go {"onboardingOptions": {"performance": "12-16"}}
32+
```go
3333
import (
3434
"fmt"
3535
"net/http"
@@ -41,14 +41,16 @@ import (
4141
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
4242
if err := sentry.Init(sentry.ClientOptions{
4343
Dsn: "___PUBLIC_DSN___",
44+
// ___PRODUCT_OPTION_START___ performance
4445
EnableTracing: true,
4546
// Set TracesSampleRate to 1.0 to capture 100%
4647
// of transactions for tracing.
4748
// We recommend adjusting this value in production,
4849
TracesSampleRate: 1.0,
49-
// Adds request headers and IP for users,
50-
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
51-
SendDefaultPII: true,
50+
// ___PRODUCT_OPTION_END___ performance
51+
// Adds request headers and IP for users,
52+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
53+
SendDefaultPII: true,
5254
}); err != nil {
5355
fmt.Printf("Sentry initialization failed: %v\n", err)
5456
}

docs/platforms/go/guides/gin/index.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/gin
2929
<Break />
3030

3131

32-
```go {"onboardingOptions": {"performance": "13-17"}}
32+
```go
3333
import (
3434
"fmt"
3535
"net/http"
@@ -42,14 +42,16 @@ import (
4242
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
4343
if err := sentry.Init(sentry.ClientOptions{
4444
Dsn: "___PUBLIC_DSN___",
45+
// ___PRODUCT_OPTION_START___ performance
4546
EnableTracing: true,
4647
// Set TracesSampleRate to 1.0 to capture 100%
4748
// of transactions for tracing.
4849
// We recommend adjusting this value in production,
4950
TracesSampleRate: 1.0,
50-
// Adds request headers and IP for users,
51-
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
52-
SendDefaultPII: true,
51+
// ___PRODUCT_OPTION_END___ performance
52+
// Adds request headers and IP for users,
53+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
54+
SendDefaultPII: true,
5355
}); err != nil {
5456
fmt.Printf("Sentry initialization failed: %v\n", err)
5557
}

docs/platforms/go/guides/http/index.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/http
2929
<Break />
3030

3131

32-
```go {"onboardingOptions": {"performance": "12-16"}}
32+
```go
3333
import (
3434
"fmt"
3535
"net/http"
@@ -41,14 +41,16 @@ import (
4141
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
4242
if err := sentry.Init(sentry.ClientOptions{
4343
Dsn: "___PUBLIC_DSN___",
44+
// ___PRODUCT_OPTION_START___ performance
4445
EnableTracing: true,
4546
// Set TracesSampleRate to 1.0 to capture 100%
4647
// of transactions for tracing.
4748
// We recommend adjusting this value in production,
4849
TracesSampleRate: 1.0,
49-
// Adds request headers and IP for users,
50-
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
51-
SendDefaultPII: true,
50+
// ___PRODUCT_OPTION_END___ performance
51+
// Adds request headers and IP for users,
52+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
53+
SendDefaultPII: true,
5254
}); err != nil {
5355
fmt.Printf("Sentry initialization failed: %v\n", err)
5456
}

docs/platforms/go/guides/iris/index.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/iris
2929
<Break />
3030

3131

32-
```go {"onboardingOptions": {"performance": "12-16"}}
32+
```go
3333
import (
3434
"fmt"
3535

@@ -41,11 +41,13 @@ import (
4141
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
4242
if err := sentry.Init(sentry.ClientOptions{
4343
Dsn: "___PUBLIC_DSN___",
44+
// ___PRODUCT_OPTION_START___ performance
4445
EnableTracing: true,
4546
// Set TracesSampleRate to 1.0 to capture 100%
4647
// of transactions for tracing.
4748
// We recommend adjusting this value in production,
4849
TracesSampleRate: 1.0,
50+
// ___PRODUCT_OPTION_END___ performance
4951
// Adds request headers and IP for users,
5052
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
5153
SendDefaultPII: true,

docs/platforms/go/guides/logrus/index.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ go get github.com/getsentry/sentry-go/logrus
2323

2424
<SignInNote />
2525

26-
```go {"onboardingOptions": {"performance": "14-17"}}
26+
```go
2727
import (
2828
"fmt"
2929
"net/http"
@@ -42,8 +42,10 @@ import (
4242
logger.Level = logrus.DebugLevel
4343
logger.Out = os.Stderr
4444

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

4850
// Initialize Sentry
4951
sentryHook, err := sentrylogrus.New(sentryLevels, sentry.ClientOptions{

docs/platforms/go/guides/negroni/index.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ go get github.com/getsentry/sentry-go/negroni
2929
<Break />
3030

3131

32-
```go {"onboardingOptions": {"performance": "13-17"}}
32+
```go
3333
import (
3434
"fmt"
3535
"net/http"
@@ -42,11 +42,13 @@ import (
4242
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
4343
if err := sentry.Init(sentry.ClientOptions{
4444
Dsn: "___PUBLIC_DSN___",
45+
// ___PRODUCT_OPTION_START___ performance
4546
EnableTracing: true,
4647
// Set TracesSampleRate to 1.0 to capture 100%
4748
// of transactions for tracing.
4849
// We recommend adjusting this value in production,
4950
TracesSampleRate: 1.0,
51+
// ___PRODUCT_OPTION_END___ performance
5052
// Adds request headers and IP for users,
5153
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
5254
SendDefaultPII: true,

0 commit comments

Comments
 (0)