Skip to content

Commit 6ee5de7

Browse files
committed
misc fixes
1 parent 90740d9 commit 6ee5de7

File tree

7 files changed

+21
-54
lines changed

7 files changed

+21
-54
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type ClientOptions struct {
2323
// 0.0 is treated as if it was 1.0. To drop all events, set the DSN to the
2424
// empty string.
2525
SampleRate float64
26+
// Enable structured logging.
27+
EnableLogs bool
2628
// Enable performance tracing.
2729
EnableTracing bool
2830
// The sample rate for sampling traces in the range [0.0, 1.0].
@@ -129,15 +131,6 @@ By default, TLS uses the host's root CA set. If you don't have `ca-certificates`
129131

130132

131133
```go
132-
package main
133-
134-
import (
135-
"log"
136-
137-
"github.com/certifi/gocertifi"
138-
"github.com/getsentry/sentry-go"
139-
)
140-
141134
sentryClientOptions := sentry.ClientOptions{
142135
Dsn: "___PUBLIC_DSN___",
143136
}

docs/platforms/go/common/configuration/transports.mdx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,13 @@ To configure transport, provide an instance of `sentry.Transport` interface to `
1414

1515

1616
```go
17-
package main
17+
sentrySyncTransport := sentry.NewHTTPSyncTransport()
18+
sentrySyncTransport.Timeout = time.Second * 3
1819

19-
import (
20-
"time"
21-
22-
"github.com/getsentry/sentry-go"
23-
)
24-
25-
func main() {
26-
sentrySyncTransport := sentry.NewHTTPSyncTransport()
27-
sentrySyncTransport.Timeout = time.Second * 3
28-
29-
sentry.Init(sentry.ClientOptions{
30-
Dsn: "___PUBLIC_DSN___",
31-
Transport: sentrySyncTransport,
32-
})
33-
}
20+
sentry.Init(sentry.ClientOptions{
21+
Dsn: "___PUBLIC_DSN___",
22+
Transport: sentrySyncTransport,
23+
})
3424
```
3525

3626
Each transport, provide it's own factory function. `NewHTTPTransport` and `NewHTTPSyncTransport` respectively.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Fiber
33
description: "Learn how to add Sentry instrumentation to programs using the Fiber package."
44
---
55

6-
For a quick reference, there is a [complete example](https://github.com/getsentry/sentry-go/tree/master/_examples/fiber) at the Go SDk source code repository.
6+
For a quick reference, there is a [complete example](https://github.com/getsentry/sentry-go/tree/master/_examples/fiber) at the Go SDK source code repository.
77

88
[Go Dev-style API documentation](https://godoc.org/github.com/getsentry/sentry-go/fiber) is also available.
99

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,10 @@ For a quick reference, there is a [complete example](https://github.com/getsentr
77

88
[Go Dev-style API documentation](https://pkg.go.dev/github.com/getsentry/sentry-go/http) is also available.
99

10-
## Features
11-
12-
In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/).
13-
14-
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
15-
1610
## Install
1711

18-
<OnboardingOptionButtons
19-
options={[
20-
'error-monitoring',
21-
'performance',
22-
]}
23-
/>
24-
2512
```bash
13+
go get github.com/getsentry/sentry-go
2614
go get github.com/getsentry/sentry-go/http
2715
```
2816

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ go get github.com/getsentry/sentry-go/iris
2828

2929
```go
3030
// Whether Sentry should repanic after recovery, in most cases it should be set to true,
31-
// as iris.Default includes its own Recovery middleware what handles http responses.
31+
// as iris.Default includes its own Recovery middleware that handles http responses.
3232
Repanic bool
3333
// Whether you want to block the request before moving forward with the response.
3434
// Because Iris's default `Recovery` handler doesn't restart the application,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ go get github.com/getsentry/sentry-go/slog
2626

2727
<PlatformContent includePath="getting-started-config" />
2828

29-
### Slog Integration
29+
### Options
3030

3131
`sentryslog` provides options to configure the integration with Sentry. It accepts a struct of `sentryslog.Options` that allows you to configure how the handler will behave. The options are:
3232

platform-includes/configuration/drain-example/go.mdx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,20 @@ for at most the given timeout. It returns `false` if the timeout was reached. In
99
that case, some events may not have been sent.
1010

1111
```go
12-
func main() {
13-
// err := sentry.Init(...)
14-
defer sentry.Flush(2 * time.Second)
12+
// err := sentry.Init(...)
13+
defer sentry.Flush(2 * time.Second)
1514

16-
sentry.CaptureMessage("my message")
17-
}
15+
sentry.CaptureMessage("my message")
1816
```
1917

2018
`FlushWithContext` is an alternative to Flush that uses a context.Context to manage the timeout or cancellation of the flush operation. This approach is particularly useful in applications where you are already using contexts for managing deadlines and cancellations.
2119

2220

2321
```go
24-
func main() {
25-
// err := sentry.Init(...)
26-
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
27-
defer cancel()
28-
29-
sentry.CaptureMessage("my message")
30-
sentry.FlushWithContext(ctx)
31-
}
22+
// err := sentry.Init(...)
23+
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
24+
defer cancel()
25+
26+
sentry.CaptureMessage("my message")
27+
sentry.FlushWithContext(ctx)
3228
```

0 commit comments

Comments
 (0)