core: bump github.com/getsentry/sentry-go from 0.15.0 to 0.16.0 (#4179)

* core: bump github.com/getsentry/sentry-go from 0.15.0 to 0.16.0

Bumps [github.com/getsentry/sentry-go](https://github.com/getsentry/sentry-go) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/getsentry/sentry-go/releases)
- [Changelog](https://github.com/getsentry/sentry-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-go/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: github.com/getsentry/sentry-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update custom tracer

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
dependabot[bot]
2022-12-09 12:20:41 +01:00
committed by GitHub
parent d3197f3430
commit c21c1757de
5 changed files with 10 additions and 8 deletions

View File

@ -23,12 +23,12 @@ func SentryNoSampleMiddleware(h http.Handler) http.Handler {
})
}
func SamplerFunc(defaultRate float64) sentry.TracesSamplerFunc {
return sentry.TracesSamplerFunc(func(ctx sentry.SamplingContext) sentry.Sampled {
func SamplerFunc(defaultRate float64) sentry.TracesSampler {
return func(ctx sentry.SamplingContext) float64 {
data, ok := ctx.Span.Context().Value(contextSentryNoSample{}).(bool)
if data && ok {
return sentry.SampledFalse
return 0
}
return sentry.UniformTracesSampler(defaultRate).Sample(ctx)
})
return defaultRate
}
}