Update dependencies
This commit is contained in:
27
vendor/github.com/getsentry/sentry-go/client.go
generated
vendored
27
vendor/github.com/getsentry/sentry-go/client.go
generated
vendored
@@ -90,7 +90,7 @@ type EventProcessor func(event *Event, hint *EventHint) *Event
|
||||
// ApplyToEvent changes an event based on external data and/or
|
||||
// an event hint.
|
||||
type EventModifier interface {
|
||||
ApplyToEvent(event *Event, hint *EventHint, client *Client) *Event
|
||||
ApplyToEvent(event *Event, hint *EventHint) *Event
|
||||
}
|
||||
|
||||
var globalEventProcessors []EventProcessor
|
||||
@@ -133,6 +133,9 @@ type ClientOptions struct {
|
||||
TracesSampleRate float64
|
||||
// Used to customize the sampling of traces, overrides TracesSampleRate.
|
||||
TracesSampler TracesSampler
|
||||
// The sample rate for profiling traces in the range [0.0, 1.0].
|
||||
// This is relative to TracesSampleRate - it is a ratio of profiled traces out of all sampled traces.
|
||||
ProfilesSampleRate float64
|
||||
// List of regexp strings that will be used to match against event's message
|
||||
// and if applicable, caught errors type and value.
|
||||
// If the match is found, then a whole event will be dropped.
|
||||
@@ -510,14 +513,6 @@ func (client *Client) Flush(timeout time.Duration) bool {
|
||||
return client.Transport.Flush(timeout)
|
||||
}
|
||||
|
||||
// Close clean up underlying Transport resources.
|
||||
//
|
||||
// Close should be called after Flush and before terminating the program
|
||||
// otherwise some events may be lost.
|
||||
func (client *Client) Close() {
|
||||
client.Transport.Close()
|
||||
}
|
||||
|
||||
// EventFromMessage creates an event from the given message string.
|
||||
func (client *Client) EventFromMessage(message string, level Level) *Event {
|
||||
if message == "" {
|
||||
@@ -595,6 +590,14 @@ func (client *Client) GetSDKIdentifier() string {
|
||||
return client.sdkIdentifier
|
||||
}
|
||||
|
||||
// reverse reverses the slice a in place.
|
||||
func reverse(a []Exception) {
|
||||
for i := len(a)/2 - 1; i >= 0; i-- {
|
||||
opp := len(a) - 1 - i
|
||||
a[i], a[opp] = a[opp], a[i]
|
||||
}
|
||||
}
|
||||
|
||||
func (client *Client) processEvent(event *Event, hint *EventHint, scope EventModifier) *EventID {
|
||||
if event == nil {
|
||||
err := usageError{fmt.Errorf("%s called with nil event", callerFunctionName())}
|
||||
@@ -682,7 +685,7 @@ func (client *Client) prepareEvent(event *Event, hint *EventHint, scope EventMod
|
||||
}
|
||||
|
||||
if scope != nil {
|
||||
event = scope.ApplyToEvent(event, hint, client)
|
||||
event = scope.ApplyToEvent(event, hint)
|
||||
if event == nil {
|
||||
return nil
|
||||
}
|
||||
@@ -706,6 +709,10 @@ func (client *Client) prepareEvent(event *Event, hint *EventHint, scope EventMod
|
||||
}
|
||||
}
|
||||
|
||||
if event.sdkMetaData.transactionProfile != nil {
|
||||
event.sdkMetaData.transactionProfile.UpdateFromEvent(event)
|
||||
}
|
||||
|
||||
return event
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user