Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus fixes #9

Merged
merged 3 commits into from
Nov 28, 2023
Merged

Prometheus fixes #9

merged 3 commits into from
Nov 28, 2023

Conversation

lenisko
Copy link
Contributor

@lenisko lenisko commented Nov 21, 2023

Possibly solve

TypeError: Value is not a valid number: undefined
    at set (/home/rotom/node_modules/prom-client/lib/gauge.js:144:9)
    at Gauge.set (/home/rotom/node_modules/prom-client/lib/gauge.js:30:3)
    at forEach (/home/rotom/dist/packages/server/webpack:/rotom/packages/server/src/index.ts:292:41)
    at Array.forEach (<anonymous>)
    at Timeout._onTimeout (/home/rotom/dist/packages/server/webpack:/rotom/packages/server/src/index.ts:288:38)
    at listOnTimeout (node:internal/timers:569:17)
    at processTimers (node:internal/timers:512:7)
TypeError: Value is not a valid number: undefined
    at set (/home/rotom/node_modules/prom-client/lib/gauge.js:144:9)
    at Gauge.set (/home/rotom/node_modules/prom-client/lib/gauge.js:30:3)
    at forEach (/home/rotom/dist/packages/server/webpack:/rotom/packages/server/src/index.ts:292:41)
    at Array.forEach (<anonymous>)
    at Timeout._onTimeout (/home/rotom/dist/packages/server/webpack:/rotom/packages/server/src/index.ts:288:38)
    at listOnTimeout (node:internal/timers:569:17)
    at processTimers (node:internal/timers:512:7) Uncaught Exception thrown
2023-11-20 22:14:51.923  ERROR TypeError: Value is not a valid number: undefined
    at set (/home/rotom/node_modules/prom-client/lib/gauge.js:144:9)
    at Gauge.set (/home/rotom/node_modules/prom-client/lib/gauge.js:30:3)
    at forEach (/home/rotom/dist/packages/server/webpack:/rotom/packages/server/src/index.ts:292:41)
    at Array.forEach (<anonymous>)
    at Timeout._onTimeout (/home/rotom/dist/packages/server/webpack:/rotom/packages/server/src/index.ts:288:38)
    at listOnTimeout (node:internal/timers:569:17)
    at processTimers (node:internal/timers:512:7) Uncaught Exception thrown 

@Fabio1988
Copy link
Contributor

The null coalescing operator would have been better than the OR operator
Also, the Number.isFinite operator doesn't convert string. I'm not sure the values returned are valid Numbers

@lenisko lenisko self-assigned this Nov 25, 2023
@Fabio1988 Fabio1988 requested a review from na-ji November 28, 2023 19:36
@Fabio1988 Fabio1988 merged commit 55ea8fc into main Nov 28, 2023
10 checks passed
@Fabio1988 Fabio1988 deleted the prom-fixes branch November 28, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants