MCPcopy Create free account
hub / github.com/SethGammon/Citadel / pointsOf

Function pointsOf

scripts/test-telemetry-otlp.js:65–71  ·  view source on GitHub ↗
(payload, name)

Source from the content-addressed store, hash-verified

63}
64
65function pointsOf(payload, name) {
66 const metric = allMetrics(payload).find((m) => m.name === name);
67 if (!metric) return [];
68 if (metric.gauge) return metric.gauge.dataPoints || [];
69 if (metric.sum) return metric.sum.dataPoints || [];
70 return [];
71}
72
73function attrValue(point, key) {
74 const found = (point.attributes || []).find((attribute) => attribute.key === key);

Callers 1

mainFunction · 0.85

Calls 1

allMetricsFunction · 0.85

Tested by

no test coverage detected