MSP-8172 Add vendor

This commit is contained in:
Синельник Тимур Романович committed 2026-07-29 12:52:27 +03:00
1 parent 5175d87e08
commit eb066cb055
2619 files changed
+757077 -2

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)
}