You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When set to `true`, the SDK does not send client reports. Client reports track the number of discarded events and their reasons, helping you monitor SDK health. By default, client reports are enabled.
A number between `0.0` and `1.0`, controlling the percentage chance a given transaction will be sent to Sentry (`0.0` represents 0% while `1.0` represents 100%.) Applies equally to all transactions created in the app. Either this or `TracesSampler` must be defined to enable tracing.
156
164
@@ -191,6 +199,18 @@ When set to `true`, the W3C Trace Context HTTP `traceparent` header is propagate
When set to `true`, the SDK requires matching organization IDs in the incoming baggage header for continuing a trace. This is useful for preventing trace continuation from 3rd-party services that happen to be instrumented by Sentry but belong to a different organization.
205
+
206
+
</SdkOption>
207
+
208
+
<SdkOptionname="OrgID"type="uint64">
209
+
210
+
Configures the organization ID used for trace propagation and features like `StrictTraceContinuation`. In most cases, the organization ID is already parsed from the DSN. This option should be used when non-standard Sentry DSNs are used, such as self-hosted or when using a local Relay.
When set to `true`, disables the telemetry buffer layer for prioritizing events and uses the legacy transport layer instead.
327
+
328
+
</SdkOption>
329
+
304
330
### Providing SSL Certificates
305
331
306
332
By default, TLS uses the host's root CA set. If you don't have `ca-certificates` (which should be your go-to way of fixing the issue of the missing certificates) and want to use `gocertifi` instead, you can provide pre-loaded cert files as one of the options to the `sentry.Init` call:
Copy file name to clipboardExpand all lines: docs/platforms/go/common/enriching-events/scopes/index.mdx
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,3 +71,28 @@ On the other hand, <PlatformIdentifier name="with-scope" /> creates a clone of t
71
71
made will stay isolated within the <PlatformIdentifiername="with-scope" /> callback function. This allows you to
72
72
more easily isolate pieces of context information to specific locations in your code or
73
73
even call <PlatformIdentifiername="clear" /> to briefly remove all context information.
74
+
75
+
## Setting Attributes
76
+
77
+
You can set typed attributes on the scope using `SetAttributes`. These attributes are attached to logs and metrics emitted within the scope. Attributes use the `attribute` package for type safety.
78
+
79
+
```go
80
+
import"github.com/getsentry/sentry-go/attribute"
81
+
82
+
sentry.ConfigureScope(func(scope *sentry.Scope) {
83
+
scope.SetAttributes(
84
+
attribute.String("user.role", "admin"),
85
+
attribute.Int("retry.count", 3),
86
+
attribute.Bool("feature.enabled", true),
87
+
attribute.Float64("score", 99.5),
88
+
)
89
+
})
90
+
```
91
+
92
+
To remove an attribute from the scope, use `RemoveAttribute`:
0 commit comments