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

Function buildPayload

internal/telemetry/otlp_http_exporter.go:187–196  ·  view source on GitHub ↗
(kind string, records []map[string]any)

Source from the content-addressed store, hash-verified

185}
186
187func buildPayload(kind string, records []map[string]any) map[string]any {
188 switch kind {
189 case "metrics":
190 return map[string]any{"resourceMetrics": []map[string]any{{"metrics": records}}}
191 case "events":
192 return map[string]any{"resourceEvents": []map[string]any{{"events": records}}}
193 default:
194 return map[string]any{"resourceSpans": []map[string]any{{"spans": records}}}
195 }
196}

Callers 1

flushMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected