You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const sumoLogger = new SumoLogger({
endpoint: ENV_VARS.SumologicMetricsCollectorEndpoint,
graphite: true,
hostName: `WMS-${process.env.COMMIT_HASH}`,
batchSize: 10000,
interval: 5000,
});
sumoLogger.log({
path: 'metric.path', // metric path as a dot separated string
value: 100, // value of the metric
});
results in
SyntaxError: Unexpected token m in JSON at position 0
at JSON.parse (<anonymous>)
at /Users/[redacted]/api/node_modules/sumo-logger/lib/sumoLogger.js:129:26
at Array.reduce (<anonymous>)
at SumoLogger.batchReadyToSend (/Users/[redacted]/api/node_modules/sumo-logger/lib/sumoLogger.js:126:48)
at SumoLogger.log (/Users/[redacted]/api/node_modules/sumo-logger/lib/sumoLogger.js:355:48)
at Object.<anonymous> (/Users/[redacted]/api/build/config/sumoLogger.js:22:12)
at Module._compile (node:internal/modules/cjs/loader:1196:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
at Module.load (node:internal/modules/cjs/loader:1074:32)
at Function.Module._load (node:internal/modules/cjs/loader:909:12)
The text was updated successfully, but these errors were encountered:
When I attempt to send metrics as per the docs, it attempts to JSON parse the graphite string.
in your code:
conflicts with
the code i'm calling with
results in
The text was updated successfully, but these errors were encountered: