Skip to content

Commit 06da41f

Browse files
authored
Add new Go config options (#7868)
1 parent 437295c commit 06da41f

File tree

6 files changed

+22
-3
lines changed

6 files changed

+22
-3
lines changed

src/platform-includes/configuration/before-send-transaction/go.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ sentry.Init(sentry.ClientOptions{
1212
event.Message += " [example]"
1313
return event
1414
},
15+
})
1516
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```go
2+
sentry.Init(sentry.ClientOptions{
3+
// ...
4+
IgnoreErrors: []string{"my-error", "error-*"},
5+
})
6+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```go
2+
sentry.Init(sentry.ClientOptions{
3+
// ...
4+
IgnoreTransactions: []string{"/home", "/check-*"},
5+
})
6+
```

src/platform-includes/performance/traces-sampler-as-filter/go.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```go
2-
err := sentry.Init(sentry.ClientOptions{
2+
sentry.Init(sentry.ClientOptions{
33
// ...
44
TracesSampler: sentry.TracesSampler(func(ctx sentry.SamplingContext) float64 {
55
if condition {

src/platforms/common/configuration/filtering.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ In this example, the fingerprint is forced to a common value if an exception of
7575

7676
</PlatformSection>
7777

78-
<PlatformSection supported={["javascript", "node"]} >
78+
<PlatformSection supported={["javascript", "node", "go"]} >
7979

8080
### Using <PlatformIdentifier name="ignore-errors" />
8181

@@ -120,7 +120,7 @@ Learn more about <PlatformLink to="/configuration/sampling/">configuring the sam
120120

121121
</PlatformSection>
122122

123-
<PlatformSection supported={["javascript", "node"]} >
123+
<PlatformSection supported={["javascript", "node", "go"]} >
124124

125125
### Using <PlatformIdentifier name="ignore-transactions" />
126126

src/platforms/go/common/configuration/options.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@ type ClientOptions struct {
3434
TracesSampleRate float64
3535
// Used to customize the sampling of traces, overrides TracesSampleRate.
3636
TracesSampler TracesSampler
37+
// The sample rate for profiling traces in the range [0.0, 1.0].
38+
// This is relative to TracesSampleRate - it is a ratio of profiled traces out of all sampled traces.
39+
ProfilesSampleRate float64
3740
// List of regexp strings that will be used to match against event's message
3841
// and if applicable, caught errors type and value.
3942
// If the match is found, then a whole event will be dropped.
4043
IgnoreErrors []string
44+
// List of regexp strings that will be used to match against a transaction's
45+
// name. If a match is found, then the transaction will be dropped.
46+
IgnoreTransactions []string
4147
// If this flag is enabled, certain personally identifiable information (PII) is added by active integrations.
4248
// By default, no such data is sent.
4349
SendDefaultPII bool

0 commit comments

Comments
 (0)