0

[WIP] lint a bit, update deps

This commit is contained in:
eleksir
2024-02-27 00:34:44 +03:00
parent 1892960896
commit 1f97424f31
201 changed files with 21474 additions and 9282 deletions

View File

@@ -1,5 +1,17 @@
# Changelog
## 0.27.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.27.0.
### Breaking Changes
- `Exception.ThreadId` is now typed as `uint64`. It was wrongly typed as `string` before. ([#770](https://github.com/getsentry/sentry-go/pull/770))
### Misc
- Export `Event.Attachments` ([#771](https://github.com/getsentry/sentry-go/pull/771))
## 0.26.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.26.0.

View File

@@ -241,7 +241,7 @@ type Exception struct {
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"`
ThreadID uint64 `json:"thread_id,omitempty"`
Stacktrace *Stacktrace `json:"stacktrace,omitempty"`
Mechanism *Mechanism `json:"mechanism,omitempty"`
}
@@ -317,6 +317,7 @@ type Event struct {
Request *Request `json:"request,omitempty"`
Exception []Exception `json:"exception,omitempty"`
DebugMeta *DebugMeta `json:"debug_meta,omitempty"`
Attachments []*Attachment `json:"-"`
// The fields below are only relevant for transactions.
@@ -333,7 +334,6 @@ type Event struct {
// The fields below are not part of the final JSON payload.
sdkMetaData SDKMetaData
attachments []*Attachment
}
// SetException appends the unwrapped errors to the event's exception list.

View File

@@ -344,7 +344,7 @@ func (scope *Scope) ApplyToEvent(event *Event, hint *EventHint) *Event {
}
if len(scope.attachments) > 0 {
event.attachments = append(event.attachments, scope.attachments...)
event.Attachments = append(event.Attachments, scope.attachments...)
}
if len(scope.tags) > 0 {

View File

@@ -6,7 +6,7 @@ import (
)
// The version of the SDK.
const SDKVersion = "0.26.0"
const SDKVersion = "0.27.0"
// apiVersion is the minimum version of the Sentry API compatible with the
// sentry-go SDK.

View File

@@ -185,7 +185,7 @@ func envelopeFromBody(event *Event, dsn *Dsn, sentAt time.Time, body json.RawMes
}
// Attachments
for _, attachment := range event.attachments {
for _, attachment := range event.Attachments {
if err := encodeAttachment(enc, &b, attachment); err != nil {
return nil, err
}