Ran `make update-dependencies`

https://mattermost.atlassian.net/browse/MM-32961
Этот коммит содержится в:
Agniva De Sarker
2021-03-09 11:26:42 +05:30
коммит произвёл GitHub
родитель 9858413ed2
Коммит 91099818df
696 изменённых файлов: 19751 добавлений и 6505 удалений

5
vendor/github.com/getsentry/sentry-go/.craft.yml сгенерированный поставляемый
Просмотреть файл

@@ -6,9 +6,8 @@ preReleaseCommand: bash scripts/craft-pre-release.sh
changelogPolicy: simple
statusProvider:
name: github
config:
contexts:
- Travis CI - Branch
artifactProvider:
name: none
targets:
- name: github
includeNames: /none/

59
vendor/github.com/getsentry/sentry-go/.travis.yml сгенерированный поставляемый
Просмотреть файл

@@ -1,59 +0,0 @@
language: go
go:
- 1.13.x
- 1.14.x
- 1.15.x
- master
env:
- GO111MODULE=on GOFLAGS=-mod=readonly
- GO111MODULE=off
jobs:
include:
- name: "Module support outside of GOPATH"
go: stable
before_script: >-
mv $GOPATH/src/github.com/getsentry/sentry-go ~/sentry-go &&
cd ~/sentry-go &&
export GOPATH= &&
go env GOPATH
script: >-
go test ./... &&
go test ./... -race
allow_failures:
- go: master
- env: GO111MODULE=off
fast_finish: true
before_install:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.27.0/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
# Fetch origin/master. This is required for `git merge-base` when testing a
# branch, since Travis clones only the target branch.
- git fetch origin master:remotes/origin/master
install: |
if [[ $GO111MODULE == off ]]; then
# Iris is not supported in legacy GOPATH mode. We delete the source code
# because otherwise lint, build, and test steps would fail.
rm -vrf ./iris/ ./example/iris/
go get -v -t ./...
fi
# go get is not required in Module mode
script:
- golangci-lint run --new-from-rev=$(git merge-base origin/master HEAD)
- go build ./...
- go test ./...
- go test ./... -race
notifications:
webhooks:
urls:
- https://zeus.ci/hooks/befe9810-9285-11e9-b01a-0a580a281808/public/provider/travis/webhook
on_success: always
on_failure: always
on_start: always
on_cancel: always
on_error: always

16
vendor/github.com/getsentry/sentry-go/CHANGELOG.md сгенерированный поставляемый
Просмотреть файл

@@ -1,5 +1,15 @@
# Changelog
## v0.10.0
- feat: Debug connection reuse (#323)
- fix: Send root span data as `Event.Extra` (#329)
- fix: Do not double sample transactions (#328)
- fix: Do not override trace context of transactions (#327)
- fix: Drain and close API response bodies (#322)
- ci: Run tests against Go tip (#319)
- ci: Move away from Travis in favor of GitHub Actions (#314) (#321)
## v0.9.0
- feat: Initial tracing and performance monitoring support (#285)
@@ -81,11 +91,11 @@ allocated.
Before the SDK accepted a concrete value of type `*http.Transport` in
`ClientOptions`, now it accepts any value implementing the `http.RoundTripper`
interface. Note that `*http.Transport` implements `http.RoundTripper`, so most
code bases will continue to work unchanged.
code bases will continue to work unchanged.
Users of custom transport gain the ability to pass in other implementations of
`http.RoundTripper` and may be able to simplify their code bases.
- fix: Do not panic when scope event processor drops event (#192)
- **[breaking]** fix: Use time.Time for timestamps (#191)
- **[breaking]** fix: Use time.Time for timestamps (#191)
Users of sentry-go typically do not need to manipulate timestamps manually.
For those who do, the field type changed from `int64` to `time.Time`, which
should be more convenient to use. The recommended way to get the current time
@@ -94,7 +104,7 @@ allocated.
- feat: Add Exception.ThreadID field (#183)
- ci: Test against Go 1.14, drop 1.11 (#170)
- feat: Limit reading bytes from request bodies (#168)
- **[breaking]** fix: Rename fasthttp integration package sentryhttp => sentryfasthttp
- **[breaking]** fix: Rename fasthttp integration package sentryhttp => sentryfasthttp
The current recommendation is to use a named import, in which case existing
code should not require any change:
```go

6
vendor/github.com/getsentry/sentry-go/README.md сгенерированный поставляемый
Просмотреть файл

@@ -7,7 +7,7 @@
# Official Sentry SDK for Go
[![Build Status](https://travis-ci.com/getsentry/sentry-go.svg?branch=master)](https://travis-ci.com/getsentry/sentry-go)
[![Build Status](https://github.com/getsentry/sentry-go/workflows/go-workflow/badge.svg)](https://github.com/getsentry/sentry-go/actions?query=workflow%3Ago-workflow)
[![Go Report Card](https://goreportcard.com/badge/github.com/getsentry/sentry-go)](https://goreportcard.com/report/github.com/getsentry/sentry-go)
[![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)
[![GoDoc](https://godoc.org/github.com/getsentry/sentry-go?status.svg)](https://godoc.org/github.com/getsentry/sentry-go)
@@ -26,7 +26,7 @@ The only requirement is a Go compiler.
We verify this package against the 3 most recent releases of Go. Those are the
supported versions. The exact versions are defined in
[`.travis.yml`](.travis.yml).
[`GitHub workflow`](.github/workflows/ci.yml).
In addition, we run tests against the current master branch of the Go toolchain,
though support for this configuration is best-effort.
@@ -47,7 +47,7 @@ version number as well:
$ go get github.com/getsentry/sentry-go@latest
```
Check out the [list of released versions](https://pkg.go.dev/github.com/getsentry/sentry-go?tab=versions).
Check out the [list of released versions](https://pkg.go.dev/github.com/getsentry/sentry-go?tab=versions).
## Configuration

24
vendor/github.com/getsentry/sentry-go/client.go сгенерированный поставляемый
Просмотреть файл

@@ -13,6 +13,7 @@ import (
"os"
"reflect"
"sort"
"strings"
"sync"
"time"
@@ -212,10 +213,26 @@ func NewClient(options ClientOptions) (*Client, error) {
options.Environment = os.Getenv("SENTRY_ENVIRONMENT")
}
if env := os.Getenv("SENTRYGODEBUG"); env == "dumphttp=1" {
// SENTRYGODEBUG is a comma-separated list of key=value pairs (similar
// to GODEBUG). It is not a supported feature: recognized debug options
// may change any time.
//
// The intended public is SDK developers. It is orthogonal to
// options.Debug, which is also available for SDK users.
dbg := strings.Split(os.Getenv("SENTRYGODEBUG"), ",")
sort.Strings(dbg)
// dbgOpt returns true when the given debug option is enabled, for
// example SENTRYGODEBUG=someopt=1.
dbgOpt := func(opt string) bool {
s := opt + "=1"
return dbg[sort.SearchStrings(dbg, s)%len(dbg)] == s
}
if dbgOpt("httpdump") || dbgOpt("httptrace") {
options.HTTPTransport = &debug.Transport{
RoundTripper: http.DefaultTransport,
Output: os.Stderr,
Dump: dbgOpt("httpdump"),
Trace: dbgOpt("httptrace"),
}
}
@@ -486,7 +503,10 @@ func (client *Client) processEvent(event *Event, hint *EventHint, scope EventMod
options.SampleRate = 1.0
}
if !sample(options.SampleRate) {
// Transactions are sampled by options.TracesSampleRate or
// options.TracesSampler when they are started. All other events
// (errors, messages) are sampled here.
if event.Type != transactionType && !sample(options.SampleRate) {
Logger.Println("Event dropped due to SampleRate hit.")
return nil
}

4
vendor/github.com/getsentry/sentry-go/interfaces.go сгенерированный поставляемый
Просмотреть файл

@@ -150,8 +150,8 @@ func NewRequest(r *http.Request) *Request {
// Exception specifies an error that occurred.
type Exception struct {
Type string `json:"type,omitempty"`
Value string `json:"value,omitempty"`
Type string `json:"type,omitempty"` // used as the main issue title
Value string `json:"value,omitempty"` // used as the main issue subtitle
Module string `json:"module,omitempty"`
ThreadID string `json:"thread_id,omitempty"`
Stacktrace *Stacktrace `json:"stacktrace,omitempty"`

58
vendor/github.com/getsentry/sentry-go/internal/debug/transport.go сгенерированный поставляемый
Просмотреть файл

@@ -1,38 +1,72 @@
package debug
import (
"bytes"
"fmt"
"io"
"net/http"
"net/http/httptrace"
"net/http/httputil"
)
// Transport implements http.RoundTripper and can be used to wrap other HTTP
// transports to dump request and responses for debugging.
// transports for debugging, normally http.DefaultTransport.
type Transport struct {
http.RoundTripper
Output io.Writer
// Dump controls whether to dump HTTP request and responses.
Dump bool
// Trace enables usage of net/http/httptrace.
Trace bool
}
func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
b, err := httputil.DumpRequestOut(req, true)
if err != nil {
return nil, err
var buf bytes.Buffer
if t.Dump {
b, err := httputil.DumpRequestOut(req, true)
if err != nil {
panic(err)
}
_, err = buf.Write(ensureTrailingNewline(b))
if err != nil {
panic(err)
}
}
_, err = t.Output.Write(ensureTrailingNewline(b))
if err != nil {
return nil, err
if t.Trace {
trace := &httptrace.ClientTrace{
DNSDone: func(di httptrace.DNSDoneInfo) {
fmt.Fprintf(&buf, "* DNS %v → %v\n", req.Host, di.Addrs)
},
GotConn: func(ci httptrace.GotConnInfo) {
fmt.Fprintf(&buf, "* Connection local=%v remote=%v", ci.Conn.LocalAddr(), ci.Conn.RemoteAddr())
if ci.Reused {
fmt.Fprint(&buf, " (reused)")
}
if ci.WasIdle {
fmt.Fprintf(&buf, " (idle %v)", ci.IdleTime)
}
fmt.Fprintln(&buf)
},
}
req = req.WithContext(httptrace.WithClientTrace(req.Context(), trace))
}
resp, err := t.RoundTripper.RoundTrip(req)
if err != nil {
return nil, err
}
b, err = httputil.DumpResponse(resp, true)
if err != nil {
return nil, err
if t.Dump {
b, err := httputil.DumpResponse(resp, true)
if err != nil {
panic(err)
}
_, err = buf.Write(ensureTrailingNewline(b))
if err != nil {
panic(err)
}
}
_, err = t.Output.Write(ensureTrailingNewline(b))
_, err = io.Copy(t.Output, &buf)
if err != nil {
return nil, err
panic(err)
}
return resp, nil
}

8
vendor/github.com/getsentry/sentry-go/scope.go сгенерированный поставляемый
Просмотреть файл

@@ -364,6 +364,14 @@ func (scope *Scope) ApplyToEvent(event *Event, hint *EventHint) *Event {
}
for key, value := range scope.contexts {
if key == "trace" && event.Type == transactionType {
// Do not override trace context of
// transactions, otherwise it breaks the
// transaction event representation.
// For error events, the trace context is used
// to link errors and traces/spans in Sentry.
continue
}
event.Contexts[key] = value
}
}

2
vendor/github.com/getsentry/sentry-go/sentry.go сгенерированный поставляемый
Просмотреть файл

@@ -6,7 +6,7 @@ import (
)
// Version is the version of the SDK.
const Version = "0.9.0"
const Version = "0.10.0"
// apiVersion is the minimum version of the Sentry API compatible with the
// sentry-go SDK.

1
vendor/github.com/getsentry/sentry-go/tracing.go сгенерированный поставляемый
Просмотреть файл

@@ -333,6 +333,7 @@ func (s *Span) toEvent() *Event {
"trace": s.traceContext(),
},
Tags: s.Tags,
Extra: s.Data,
Timestamp: s.EndTime,
StartTime: s.StartTime,
Spans: finished,

31
vendor/github.com/getsentry/sentry-go/transport.go сгенерированный поставляемый
Просмотреть файл

@@ -6,6 +6,8 @@ import (
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"strconv"
@@ -17,6 +19,17 @@ const defaultBufferSize = 30
const defaultRetryAfter = time.Second * 60
const defaultTimeout = time.Second * 30
// maxDrainResponseBytes is the maximum number of bytes that transport
// implementations will read from response bodies when draining them.
//
// Sentry's ingestion API responses are typically short and the SDK doesn't need
// the contents of the response body. However, the net/http HTTP client requires
// response bodies to be fully drained (and closed) for TCP keep-alive to work.
//
// maxDrainResponseBytes strikes a balance between reading too much data (if the
// server is misbehaving) and reusing TCP connections.
const maxDrainResponseBytes = 16 << 10
// Transport is used by the Client to deliver events to remote server.
type Transport interface {
Flush(timeout time.Duration) bool
@@ -371,18 +384,21 @@ func (t *HTTPTransport) worker() {
}
response, err := t.client.Do(request)
if err != nil {
Logger.Printf("There was an issue with sending an event: %v", err)
continue
}
if response != nil && response.StatusCode == http.StatusTooManyRequests {
if response.StatusCode == http.StatusTooManyRequests {
deadline := time.Now().Add(retryAfter(time.Now(), response))
t.mu.Lock()
t.disabledUntil = deadline
t.mu.Unlock()
Logger.Printf("Too many requests, backing off till: %s\n", deadline)
}
// Drain body up to a limit and close it, allowing the
// transport to reuse TCP connections.
_, _ = io.CopyN(ioutil.Discard, response.Body, maxDrainResponseBytes)
response.Body.Close()
}
// Signal that processing of the batch is done.
@@ -472,15 +488,18 @@ func (t *HTTPSyncTransport) SendEvent(event *Event) {
)
response, err := t.client.Do(request)
if err != nil {
Logger.Printf("There was an issue with sending an event: %v", err)
return
}
if response != nil && response.StatusCode == http.StatusTooManyRequests {
if response.StatusCode == http.StatusTooManyRequests {
t.disabledUntil = time.Now().Add(retryAfter(time.Now(), response))
Logger.Printf("Too many requests, backing off till: %s\n", t.disabledUntil)
}
// Drain body up to a limit and close it, allowing the
// transport to reuse TCP connections.
_, _ = io.CopyN(ioutil.Discard, response.Body, maxDrainResponseBytes)
response.Body.Close()
}
// Flush is a no-op for HTTPSyncTransport. It always returns true immediately.