(kind string, record map[string]any)
| 104 | } |
| 105 | |
| 106 | func (e *OTLPHTTPExporter) enqueue(kind string, record map[string]any) { |
| 107 | e.mu.Lock() |
| 108 | e.buffer[kind] = append(e.buffer[kind], record) |
| 109 | shouldFlushNow := len(e.buffer[kind]) >= e.batchSize || time.Since(e.lastFlush) >= e.flushEvery |
| 110 | e.mu.Unlock() |
| 111 | if shouldFlushNow { |
| 112 | e.flush() |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func (e *OTLPHTTPExporter) flush() { |
| 117 | e.mu.Lock() |
no test coverage detected