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
@@ -11,149 +11,124 @@ With Sentry Structured Logs, you can send text based log information from your a
11
11
12
12
## Requirements
13
13
14
-
Logs in Go are supported in Sentry Go SDK version `0.33.0` and above.
14
+
Logs in Go are supported in Sentry Go SDK version `0.33.0` and above. To use integrations with other logging libraries, check their specific documentation pages for detailed requirements.
15
15
16
-
## Setup
16
+
## Configure
17
+
18
+
### Initialize the Sentry SDK
17
19
18
20
To enable logging, you need to initialize the SDK with the `EnableLogs` option set to true.
In order to properly attach the correct trace with each Log entry, a
116
-
`context.Context` is required. The `Write` function of the `io.Writer`
117
-
interface doesn't provide `context`, so wrapping the custom logger will not
118
-
get the trace and current span attached. We recommend using the
119
-
`sentry.Logger` to ensure your logs are connected to spans and errors in the
120
-
Sentry UI.
121
-
</Alert>
110
+
Currently, the `attribute` API supports only these value types: `int`, `string`, `bool`, and `float`.
111
+
112
+
## Integrations
122
113
123
-
### Integrations
114
+
### Supported libraries
124
115
-[Slog](/platforms/go/guides/slog)
125
116
-[Logrus](/platforms/go/guides/logrus)
126
117
127
-
### Upcoming Integrations
128
-
129
-
We're actively working on adding more integration support for Logs. Currently, we are looking at adding support for [`zerolog`](https://pkg.go.dev/github.com/rs/zerolog). You can follow this [GitHub issue](https://github.com/getsentry/sentry-go/issues/1015) to track progress.
130
-
131
-
## Options
132
-
133
-
### BeforeSendLog
118
+
### `io.Writer` interface
134
119
135
-
To filter logs, or update them before they are sent to Sentry, you can use the `BeforeSendLog` client option.
120
+
The `sentry.Logger` implements the `io.Writer` interface, so you can easily inject the logger into your existing setup. However, to correctly
121
+
link your traces you would need to create a new logger everytime you want to pass a new context. Due to this limitation we recommend using the
122
+
`sentry.Logger` or any of the other supported integrations.
0 commit comments