XanderD99 / strapi-prometheus

Strapi prometheus plugin
MIT License
18 stars 4 forks source link

Value is not a valid number: NaN #28

Open reslear opened 1 week ago

reslear commented 1 week ago

How to avoid this mistake?

/opt/node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/lib/histogram.js:237
            throw new TypeError(
            ^
Value is not a valid number: NaN
    at /opt/node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/lib/histogram.js:237:10
    at Histogram.observeWithoutExemplar (/opt/node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/lib/histogram.js:74:54)
    at ServerResponse.<anonymous> (/opt/node_modules/.pnpm/strapi-prometheus@2.1.0_@strapi+sdk-plugin@5.2.7_@swc+helpers@0.5.13_@types+node@20.17.3_ters_a2bjtfecpiujqnuivnehsu6loy/node_modules/strapi-prometheus/dist/server/index.js:107:34)
    at /otel-auto-instrumentation-nodejs/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js:50:55
    at AsyncLocalStorage.run (node:async_hooks:346:14)
    at AsyncLocalStorageContextManager.with (/otel-auto-instrumentation-nodejs/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js:33:40)
    at ServerResponse.contextWrapper (/otel-auto-instrumentation-nodejs/node_modules/@opentelemetry/context-async-hooks/build/src/AbstractAsyncHooksContextManager.js:50:32)
    at Object.onceWrapper (node:events:633:28)
    at ServerResponse.emit (node:events:531:35)
    at ServerResponse.emit (node:domain:488:12)
Node.js v20.18.0
XanderD99 commented 1 week ago

Could you give a bit more context when or where this happened. I can't seem to find or replicate the issue