File tree Expand file tree Collapse file tree 10 files changed +16
-12
lines changed
performance/configure-sample-rate Expand file tree Collapse file tree 10 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1010- Ruby: 5.5.0 or later
1111- Java: 6.5.0 or later
1212- .NET: 3.22.0 or later
13+ - Go: 0.16.0 or later
Original file line number Diff line number Diff line change @@ -10,19 +10,10 @@ import (
1010
1111func main () {
1212 err := sentry.Init (sentry.ClientOptions {
13- // Either set your DSN here or set the SENTRY_DSN environment variable.
1413 Dsn: " ___PUBLIC_DSN___" ,
15- // Either set environment and release here or set the SENTRY_ENVIRONMENT
16- // and SENTRY_RELEASE environment variables.
17- Environment: " " ,
18- 1914 // Enable printing of SDK debug messages.
2015 // Useful when getting started or trying to figure something out.
2116 Debug: true ,
22- // Set TracesSampleRate to 1.0 to capture 100%
23- // of transactions for performance monitoring.
24- // We recommend adjusting this value in production,
25- TracesSampleRate: 1.0 ,
2617 })
2718 if err != nil {
2819 log.Fatalf (" sentry.Init: %s " , err)
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ func main() {
55 err := sentry.Init (sentry.ClientOptions {
66 // ...
77
8+ EnableTracing: true ,
89 // Specify a fixed sample rate:
910 // We recommend adjusting this value in production
1011 TracesSampleRate: 1.0 ,
Original file line number Diff line number Diff line change @@ -14,17 +14,22 @@ initialized.
1414``` go
1515// ClientOptions that configures a SDK Client
1616type ClientOptions struct {
17- // The DSN to use. If the DSN is not set, the client is effectively disabled.
17+ // The DSN to use. If the DSN is not set, the client is effectively
18+ // disabled.
1819 Dsn string
19- // In debug mode, the debug information is printed to stdout to help you understand what sentry is doing.
20+ // In debug mode, the debug information is printed to stdout to help you
21+ // understand what sentry is doing.
2022 Debug bool
21- // Configures whether SDK should generate and attach stacktraces to pure capture message calls.
23+ // Configures whether SDK should generate and attach stacktraces to pure
24+ // capture message calls.
2225 AttachStacktrace bool
2326 // The sample rate for event submission in the range [0.0, 1.0]. By default,
2427 // all events are sent. Thus, as a historical special case, the sample rate
2528 // 0.0 is treated as if it was 1.0. To drop all events, set the DSN to the
2629 // empty string.
2730 SampleRate float64
31+ // Enable performance tracing.
32+ EnableTracing bool
2833 // The sample rate for sampling traces in the range [0.0, 1.0].
2934 TracesSampleRate float64
3035 // Used to customize the sampling of traces, overrides TracesSampleRate.
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import (
3636// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
3737if err := sentry.Init (sentry.ClientOptions {
3838 Dsn : " ___PUBLIC_DSN___" ,
39+ EnableTracing : true ,
3940 // Set TracesSampleRate to 1.0 to capture 100%
4041 // of transactions for performance monitoring.
4142 // We recommend adjusting this value in production,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import (
3636// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
3737if err := sentry.Init (sentry.ClientOptions {
3838 Dsn : " ___PUBLIC_DSN___" ,
39+ EnableTracing : true ,
3940 // Set TracesSampleRate to 1.0 to capture 100%
4041 // of transactions for performance monitoring.
4142 // We recommend adjusting this value in production,
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import (
3737// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
3838if err := sentry.Init (sentry.ClientOptions {
3939 Dsn : " ___PUBLIC_DSN___" ,
40+ EnableTracing : true ,
4041 // Set TracesSampleRate to 1.0 to capture 100%
4142 // of transactions for performance monitoring.
4243 // We recommend adjusting this value in production,
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import (
3535// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
3636if err := sentry.Init (sentry.ClientOptions {
3737 Dsn : " ___PUBLIC_DSN___" ,
38+ EnableTracing : true ,
3839 // Set TracesSampleRate to 1.0 to capture 100%
3940 // of transactions for performance monitoring.
4041 // We recommend adjusting this value in production,
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import (
3535// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
3636if err := sentry.Init (sentry.ClientOptions {
3737 Dsn : " ___PUBLIC_DSN___" ,
38+ EnableTracing : true ,
3839 // Set TracesSampleRate to 1.0 to capture 100%
3940 // of transactions for performance monitoring.
4041 // We recommend adjusting this value in production,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import (
3636// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
3737if err := sentry.Init (sentry.ClientOptions {
3838 Dsn : " ___PUBLIC_DSN___" ,
39+ EnableTracing : true ,
3940 // Set TracesSampleRate to 1.0 to capture 100%
4041 // of transactions for performance monitoring.
4142 // We recommend adjusting this value in production,
You can’t perform that action at this time.
0 commit comments