2026-09-10 14:15:13: merge [main:14224c2de53289839839d51f5885722051e41349];

This commit is contained in:
txix committed 2026-09-10 14:15:13 +03:00
1 parent 554123722d
commit 5cb3885330
2726 files changed
+779293 -2185

No files matched your search

+32
View File
@@ -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)
}