fix(deps): update module github.com/getsentry/sentry-go to v0.31.0
#331
Merged
group_2759636_bot_1c34751f7eccad09e089ac15ee7bd902
merged 1 commits from renovate/github.com-getsentry-sentry-go-0.x into main2025-01-02 14:14:42 +00:00
Remove Segment field from the User struct. This field is no longer used in the Sentry product. (#928)
Every integration is now a separate module, reducing the binary size and number of dependencies. Once you update sentry-go to latest version, you'll need to go get the integration you want to use. For example, if you want to use the echo integration, you'll need to run go get github.com/getsentry/sentry-go/echo (#919).
Features
Add the ability to override hub in context for integrations that use custom context. (#931)
Add HubProvider Hook for sentrylogrus, enabling dynamic Sentry hub allocation for each log entry or goroutine. (#936)
This change enhances compatibility with Sentry's recommendation of using separate hubs per goroutine. To ensure a separate Sentry hub for each goroutine, configure the HubProvider like this:
hook,err:=sentrylogrus.New(nil,sentry.ClientOptions{})iferr!=nil{log.Fatalf("Failed to initialize Sentry hook: %v",err)}// Set a custom HubProvider to generate a new hub for each goroutine or log entryhook.SetHubProvider(func()*sentry.Hub{client,_:=sentry.NewClient(sentry.ClientOptions{})returnsentry.NewHub(client,sentry.NewScope())})logrus.AddHook(hook)
Bug Fixes
Add support for closing worker goroutines started by the HTTPTranport to prevent goroutine leaks. (#894)
client,_:=sentry.NewClient()deferclient.Close()
Worker can be also closed by calling Close() method on the HTTPTransport instance. Close should be called after Flush and before terminating the program otherwise some events may be lost.
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/getsentry/sentry-go](https://github.com/getsentry/sentry-go) | require | minor | `v0.30.0` -> `v0.31.0` |
---
### Release Notes
<details>
<summary>getsentry/sentry-go (github.com/getsentry/sentry-go)</summary>
### [`v0.31.0`](https://github.com/getsentry/sentry-go/releases/tag/v0.31.0): 0.31.0
[Compare Source](https://github.com/getsentry/sentry-go/compare/v0.30.0...v0.31.0)
##### Breaking Changes
- Remove support for metrics. Read more about the end of the Metrics beta [here](https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Metrics-Beta-Ended-on-October-7th). ([#​914](https://github.com/getsentry/sentry-go/pull/914))
- Remove support for profiling. ([#​915](https://github.com/getsentry/sentry-go/pull/915))
- Remove `Segment` field from the `User` struct. This field is no longer used in the Sentry product. ([#​928](https://github.com/getsentry/sentry-go/pull/928))
- Every integration is now a separate module, reducing the binary size and number of dependencies. Once you update `sentry-go` to latest version, you'll need to `go get` the integration you want to use. For example, if you want to use the `echo` integration, you'll need to run `go get github.com/getsentry/sentry-go/echo` ([#​919](github.com/getsentry/sentry-go/pull/919)).
##### Features
Add the ability to override `hub` in `context` for integrations that use custom context. ([#​931](https://github.com/getsentry/sentry-go/pull/931))
- Add `HubProvider` Hook for `sentrylogrus`, enabling dynamic Sentry hub allocation for each log entry or goroutine. ([#​936](https://github.com/getsentry/sentry-go/pull/936))
This change enhances compatibility with Sentry's recommendation of using separate hubs per goroutine. To ensure a separate Sentry hub for each goroutine, configure the `HubProvider` like this:
```go
hook, err := sentrylogrus.New(nil, sentry.ClientOptions{})
if err != nil {
log.Fatalf("Failed to initialize Sentry hook: %v", err)
}
// Set a custom HubProvider to generate a new hub for each goroutine or log entry
hook.SetHubProvider(func() *sentry.Hub {
client, _ := sentry.NewClient(sentry.ClientOptions{})
return sentry.NewHub(client, sentry.NewScope())
})
logrus.AddHook(hook)
```
##### Bug Fixes
- Add support for closing worker goroutines started by the `HTTPTranport` to prevent goroutine leaks. ([#​894](https://github.com/getsentry/sentry-go/pull/894))
```go
client, _ := sentry.NewClient()
defer client.Close()
```
Worker can be also closed by calling `Close()` method on the `HTTPTransport` instance. `Close` should be called after `Flush` and before terminating the program otherwise some events may be lost.
```go
transport := sentry.NewHTTPTransport()
defer transport.Close()
```
##### Misc
- Bump [gin-gonic/gin](https://github.com/gin-gonic/gin) to v1.9.1. ([#​946](https://github.com/getsentry/sentry-go/pull/946))
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this MR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box
---
This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44Ny4wIiwidXBkYXRlZEluVmVyIjoiMzkuODcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This MR contains the following updates:
v0.30.0->v0.31.0Release Notes
getsentry/sentry-go (github.com/getsentry/sentry-go)
v0.31.0: 0.31.0Compare Source
Breaking Changes
Remove support for metrics. Read more about the end of the Metrics beta here. (#914)
Remove support for profiling. (#915)
Remove
Segmentfield from theUserstruct. This field is no longer used in the Sentry product. (#928)Every integration is now a separate module, reducing the binary size and number of dependencies. Once you update
sentry-goto latest version, you'll need togo getthe integration you want to use. For example, if you want to use theechointegration, you'll need to rungo get github.com/getsentry/sentry-go/echo(#919).Features
Add the ability to override
hubincontextfor integrations that use custom context. (#931)HubProviderHook forsentrylogrus, enabling dynamic Sentry hub allocation for each log entry or goroutine. (#936)This change enhances compatibility with Sentry's recommendation of using separate hubs per goroutine. To ensure a separate Sentry hub for each goroutine, configure the
HubProviderlike this:Bug Fixes
HTTPTranportto prevent goroutine leaks. (#894)Worker can be also closed by calling
Close()method on theHTTPTransportinstance.Closeshould be called afterFlushand before terminating the program otherwise some events may be lost.Misc
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this MR and you won't be reminded about this update again.
This MR has been generated by Renovate Bot.
mentioned in issue #4
added 3 commits
mainf1b7a361- fix(deps): update module github.com/getsentry/sentry-go to v0.31.0Compare with previous version