fix(go.sum): update ResolveSpec dependency to v1.0.87
CI / build-and-test (push) Failing after 1s
Release / release (push) Failing after 19m26s

This commit is contained in:
Hein
2026-06-23 13:17:16 +02:00
parent 0227912325
commit 1adf50e3db
2436 changed files with 1078758 additions and 114 deletions
+32
View File
@@ -0,0 +1,32 @@
package sentry
import (
"time"
)
// metricBatchProcessor batches metrics and sends them to Sentry.
type metricBatchProcessor struct {
*batchProcessor[Metric]
}
func newMetricBatchProcessor(client *Client) *metricBatchProcessor {
return &metricBatchProcessor{
batchProcessor: newBatchProcessor(func(items []Metric) {
if len(items) == 0 {
return
}
event := NewEvent()
event.Timestamp = time.Now()
event.EventID = EventID(uuid())
event.Type = traceMetricEvent.Type
event.Metrics = items
client.Transport.SendEvent(event)
}),
}
}
func (p *metricBatchProcessor) Send(metric *Metric) bool {
return p.batchProcessor.Send(*metric)
}