MCPcopy
hub / github.com/grafana/tempo / produceErrReason

Function produceErrReason

pkg/ingest/writer_client.go:339–355  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

337}
338
339func produceErrReason(err error) string {
340 if errors.Is(err, context.DeadlineExceeded) || errors.Is(err, kgo.ErrRecordTimeout) {
341 return "timeout"
342 }
343 if errors.Is(err, kgo.ErrMaxBuffered) {
344 return "buffer-full"
345 }
346 if errors.Is(err, kerr.MessageTooLarge) {
347 return "record-too-large"
348 }
349 if errors.Is(err, context.Canceled) {
350 // This should never happen because we don't cancel produce requests, however we
351 // check this error anyway to detect if something unexpected happened.
352 return "canceled"
353 }
354 return "other"
355}

Callers 1

ProduceSyncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected