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

Function runExporter

scripts/test-telemetry-otlp.js:38–53  ·  view source on GitHub ↗
(tmpRoot, extraArgs)

Source from the content-addressed store, hash-verified

36}
37
38function runExporter(tmpRoot, extraArgs) {
39 return new Promise((resolve, reject) => {
40 const env = { ...process.env };
41 delete env.OTEL_EXPORTER_OTLP_ENDPOINT;
42 const child = spawn(process.execPath, [EXPORTER, '--project-root', tmpRoot, ...extraArgs], {
43 env,
44 windowsHide: true,
45 });
46 let stdout = '';
47 let stderr = '';
48 child.stdout.on('data', (data) => { stdout += data; });
49 child.stderr.on('data', (data) => { stderr += data; });
50 child.on('error', reject);
51 child.on('close', (code) => resolve({ code, stdout, stderr }));
52 });
53}
54
55function allMetrics(payload) {
56 const metrics = [];

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected