Add debug logging for metrics collection failures#778
Open
rishh09 wants to merge 1 commit into
Open
Conversation
Author
|
Hi @jdmarshall, I opened this PR for #649 based on your latest comment about adding debug output to empty catch blocks. I wasn’t able to add you as a reviewer directly, so tagging you here for visibility. Happy to adjust the namespace or message style if you prefer a different convention. |
Signed-off-by: rishh09 <ra0182108@gmail.com>
e57a3bd to
9a32906
Compare
jdmarshall
reviewed
Jul 13, 2026
| }, | ||
| "dependencies": { | ||
| "@opentelemetry/api": "^1.4.0", | ||
| "debug": "^4.4.1", |
Contributor
There was a problem hiding this comment.
Since this library is only used within other tools, should this be a dep or a peer dependency? @SimenB @zbjornson
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #649
What this PR does
Adds debug logging for metrics collection failures that were previously silently ignored.
The debug namespaces are scoped by metric area, for example:
prom:metrics:gcprom:metrics:event-loop-lagprom:metrics:process-open-fdsprom:metrics:process-max-fdsThis keeps the default behavior quiet, while allowing users to inspect these failure paths with
DEBUG=prom:*.Notes
debugis moved fromdevDependenciestodependenciesbecause it is now required by runtime library files.Tests
npm run lintnpm run check-prettiernpm run compile-typescriptnpm run test-unit -- --runInBand --forceExitnpm test -- --runInBand --forceExit