MCPcopy Create free account
hub / github.com/InferCore/InferCore / enqueue

Method enqueue

internal/telemetry/otlp_http_exporter.go:106–114  ·  view source on GitHub ↗
(kind string, record map[string]any)

Source from the content-addressed store, hash-verified

104}
105
106func (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
116func (e *OTLPHTTPExporter) flush() {
117 e.mu.Lock()

Callers 3

EmitMetricMethod · 0.95
EmitEventMethod · 0.95
EmitTraceMethod · 0.95

Calls 1

flushMethod · 0.95

Tested by

no test coverage detected