Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Update all dependencies, add go1.19, drop go1.16, prepare changelog #477

Merged
merged 3 commits into from Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -46,8 +46,8 @@ jobs:
- name: Vet
run: go vet ./...
- name: Check go.mod Tidiness
run: go mod tidy -go=1.18 -compat=1.16 && git diff --exit-code
if: ${{ matrix.go == '1.18' }}
run: go mod tidy -go=1.19 -compat=1.17 && git diff --exit-code
if: ${{ matrix.go == '1.19' }}
- name: Test
run: go test -count=1 ./...
- name: Test (race)
Expand All @@ -56,11 +56,11 @@ jobs:
# pull requests, only run this step for a single job in the matrix. For
# all other workflow triggers (e.g., pushes to a release branch) run
# this step for the whole matrix.
if: ${{ github.event_name != 'pull_request' || (matrix.go == '1.18' && matrix.os == 'ubuntu') }}
if: ${{ github.event_name != 'pull_request' || (matrix.go == '1.19' && matrix.os == 'ubuntu') }}
timeout-minutes: 10
strategy:
matrix:
go: ["1.18", "1.17", "1.16"]
go: ["1.19", "1.18", "1.17"]
os: [ubuntu, windows, macos]
fail-fast: false
test-gopath:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,7 +2,16 @@

## Unreleased

- feat: Add function to continue from trace string (#434)
- feat: Add `max-depth` options (#428)
- ref: Use a `Context` type mapping to a `map[string]interface{}` for all event contexts (#444)
- ref: Optimize `stacktrace.go` from size and speed (#467)
- ref: Replace deprecated `ioutil` pkg with `os` & `io` (#454)
- ci: Test against `go1.19` and `go1.18`, drop `go1.16` and `go1.15` support (#432, #477)
- deps: Dependency update to fix CVEs (#462, #464, #477)

_NOTE:_
This version drops support for Go 1.16 and Go 1.15. The currently supported Go versions are the last 3 stable releases: 1.19, 1.18 and 1.17.

## v0.13.0

Expand Down
12 changes: 2 additions & 10 deletions README.md
Expand Up @@ -17,11 +17,11 @@
[![go.dev](https://img.shields.io/badge/go.dev-pkg-007d9c.svg?style=flat)](https://pkg.go.dev/github.com/getsentry/sentry-go)

`sentry-go` provides a Sentry client implementation for the Go programming
language. This is the next line of the Go SDK for [Sentry](https://sentry.io/),
language. This is the next generation of the Go SDK for [Sentry](https://sentry.io/),
intended to replace the `raven-go` package.

> Looking for the old `raven-go` SDK documentation? See the Legacy client section [here](https://docs.sentry.io/clients/go/).
> If you want to start using sentry-go instead, check out the [migration guide](https://docs.sentry.io/platforms/go/migration/).
> If you want to start using `sentry-go` instead, check out the [migration guide](https://docs.sentry.io/platforms/go/migration/).

## Requirements

Expand All @@ -38,14 +38,6 @@ though support for this configuration is best-effort.

`sentry-go` can be installed like any other Go library through `go get`:

```console
$ go get github.com/getsentry/sentry-go
```

Or, if you are already using
[Go Modules](https://github.com/golang/go/wiki/Modules), you may specify a
version number as well:

```console
$ go get github.com/getsentry/sentry-go@latest
```
Expand Down
7 changes: 3 additions & 4 deletions client.go
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
"net/http"
Expand Down Expand Up @@ -60,7 +59,7 @@ func (r *lockedRand) Float64() float64 {
// other hand, the source returned from rand.NewSource is not safe for
// concurrent use, so we need to couple its use with a sync.Mutex.
var rng = &lockedRand{
//#nosec G404 -- We are fine using transparent, non-secure value here.
// #nosec G404 -- We are fine using transparent, non-secure value here.
r: rand.New(rand.NewSource(time.Now().UnixNano())),
}

Expand All @@ -74,7 +73,7 @@ type usageError struct {

// Logger is an instance of log.Logger that is use to provide debug information about running Sentry Client
// can be enabled by either using Logger.SetOutput directly or with Debug client option.
var Logger = log.New(ioutil.Discard, "[Sentry] ", log.LstdFlags)
var Logger = log.New(io.Discard, "[Sentry] ", log.LstdFlags)

// EventProcessor is a function that processes an event.
// Event processors are used to change an event before it is sent to Sentry.
Expand Down Expand Up @@ -393,7 +392,7 @@ func (client *Client) Recover(err interface{}, hint *EventHint, scope EventModif
// use the Context for communicating deadline nor cancelation. All it does
// is store the Context in the EventHint and there nil means the Context is
// not available.
//nolint: staticcheck
// nolint: staticcheck
return client.RecoverWithContext(nil, err, hint, scope)
}

Expand Down
4 changes: 2 additions & 2 deletions fasthttp/sentryfasthttp.go
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"context"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"
"time"
Expand Down Expand Up @@ -125,7 +125,7 @@ func convert(ctx *fasthttp.RequestCtx) *http.Request {
r.URL.RawQuery = string(ctx.URI().QueryString())

// Body
r.Body = ioutil.NopCloser(bytes.NewReader(ctx.Request.Body()))
r.Body = io.NopCloser(bytes.NewReader(ctx.Request.Body()))

return r
}
64 changes: 32 additions & 32 deletions go.mod
@@ -1,19 +1,19 @@
module github.com/getsentry/sentry-go

go 1.18
go 1.19

require (
github.com/gin-gonic/gin v1.7.7
github.com/go-errors/errors v1.0.1
github.com/gin-gonic/gin v1.8.1
github.com/go-errors/errors v1.4.2
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab
github.com/google/go-cmp v0.5.8
github.com/kataras/iris/v12 v12.2.0-beta4
github.com/labstack/echo/v4 v4.5.0
github.com/google/go-cmp v0.5.9
github.com/kataras/iris/v12 v12.2.0-beta5
github.com/labstack/echo/v4 v4.9.0
github.com/pingcap/errors v0.11.4
github.com/pkg/errors v0.8.1
github.com/pkg/errors v0.9.1
github.com/urfave/negroni v1.0.0
github.com/valyala/fasthttp v1.34.0
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418
github.com/valyala/fasthttp v1.40.0
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec
golang.org/x/text v0.3.7
)

Expand All @@ -29,50 +29,50 @@ require (
github.com/fatih/structs v1.1.0 // indirect
github.com/flosch/pongo2/v4 v4.0.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/iris-contrib/jade v1.1.4 // indirect
github.com/iris-contrib/schema v0.0.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kataras/blocks v0.0.6 // indirect
github.com/kataras/blocks v0.0.7 // indirect
github.com/kataras/golog v0.1.7 // indirect
github.com/kataras/pio v0.0.10 // indirect
github.com/kataras/sitemap v0.0.5 // indirect
github.com/kataras/pio v0.0.11 // indirect
github.com/kataras/sitemap v0.0.6 // indirect
github.com/kataras/tunnel v0.0.4 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/labstack/gommon v0.3.0 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/klauspost/compress v1.15.11 // indirect
github.com/labstack/gommon v0.3.1 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mailgun/raymond/v2 v2.0.46 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/microcosm-cc/bluemonday v1.0.19 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/microcosm-cc/bluemonday v1.0.21 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/tdewolff/minify/v2 v2.12.0 // indirect
github.com/tdewolff/parse/v2 v2.6.1 // indirect
github.com/ugorji/go/codec v1.1.7 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/tdewolff/minify/v2 v2.12.4 // indirect
github.com/tdewolff/parse/v2 v2.6.4 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yosssi/ace v0.0.5 // indirect
golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect
golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 // indirect
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be // indirect
golang.org/x/net v0.0.0-20221002022538-bcab6841153b // indirect
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)