mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 02:12:26 -06:00
[chore] update dependencies (#4196)
- go.opentelemetry.io/contrib/exporters/autoexport v0.60.0 -> v0.61.0 - go.opentelemetry.io/contrib/instrumentation/runtime v0.60.0 -> v0.61.0 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4196 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
311d9a1697
commit
143febb318
152 changed files with 2635 additions and 1688 deletions
28
vendor/go.opentelemetry.io/otel/sdk/log/batch.go
generated
vendored
28
vendor/go.opentelemetry.io/otel/sdk/log/batch.go
generated
vendored
|
|
@ -156,13 +156,20 @@ func (b *BatchProcessor) poll(interval time.Duration) (done chan struct{}) {
|
|||
global.Warn("dropped log records", "dropped", d)
|
||||
}
|
||||
|
||||
qLen := b.q.TryDequeue(buf, func(r []Record) bool {
|
||||
ok := b.exporter.EnqueueExport(r)
|
||||
if ok {
|
||||
buf = slices.Clone(buf)
|
||||
}
|
||||
return ok
|
||||
})
|
||||
var qLen int
|
||||
// Don't copy data from queue unless exporter can accept more, it is very expensive.
|
||||
if b.exporter.Ready() {
|
||||
qLen = b.q.TryDequeue(buf, func(r []Record) bool {
|
||||
ok := b.exporter.EnqueueExport(r)
|
||||
if ok {
|
||||
buf = slices.Clone(buf)
|
||||
}
|
||||
return ok
|
||||
})
|
||||
} else {
|
||||
qLen = b.q.Len()
|
||||
}
|
||||
|
||||
if qLen >= b.batchSize {
|
||||
// There is another full batch ready. Immediately trigger
|
||||
// another export attempt.
|
||||
|
|
@ -272,6 +279,13 @@ func newQueue(size int) *queue {
|
|||
}
|
||||
}
|
||||
|
||||
func (q *queue) Len() int {
|
||||
q.Lock()
|
||||
defer q.Unlock()
|
||||
|
||||
return q.len
|
||||
}
|
||||
|
||||
// Dropped returns the number of Records dropped during enqueueing since the
|
||||
// last time Dropped was called.
|
||||
func (q *queue) Dropped() uint64 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue