fix(go.sum): update ResolveSpec dependency to v1.0.87
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
package sentry
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// logBatchProcessor batches logs and sends them to Sentry.
|
||||
type logBatchProcessor struct {
|
||||
*batchProcessor[Log]
|
||||
}
|
||||
|
||||
func newLogBatchProcessor(client *Client) *logBatchProcessor {
|
||||
return &logBatchProcessor{
|
||||
batchProcessor: newBatchProcessor(func(items []Log) {
|
||||
if len(items) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
event := NewEvent()
|
||||
event.Timestamp = time.Now()
|
||||
event.EventID = EventID(uuid())
|
||||
event.Type = logEvent.Type
|
||||
event.Logs = items
|
||||
|
||||
client.Transport.SendEvent(event)
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
func (p *logBatchProcessor) Send(log *Log) bool {
|
||||
return p.batchProcessor.Send(*log)
|
||||
}
|
||||
Reference in New Issue
Block a user