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

Process metrics should not be reported (at least by default) by the instrumentation libraries #2322

Open
lmolkova opened this issue Jul 8, 2024 · 2 comments
Labels
bug Something isn't working information-requested pkg:host-metrics priority:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization

Comments

@lmolkova
Copy link

lmolkova commented Jul 8, 2024

Description

See open-telemetry/semantic-conventions#1215 for the context

Node.js process instrumentation reports process metrics, which are not an intended for instrumentation libraries.

Individual runtimes are expected to report their own CPU and memory metrics even if process.* ones are suitable.
There is no clear conclusion on whether runtimes are not allowed to report them vs they should be opt-in.

Expected behavior

JS/node.js may define runtime-specific CPU/memory metrics and should not report process ones (by default)

@lmolkova lmolkova added the bug Something isn't working label Jul 8, 2024
@JamieDanielson
Copy link
Member

These metrics have to be explicitly enabled (so they are not reported by default), so we think we are compliant here.

@lmolkova
Copy link
Author

I believe the compliance means that the metric is reported with appropriate process resources being set, which instrumentation cannot guarantee. Still, the attachment to process resource is not documented and I'd not take any action on this bug until semconv issue is resolved.

I created this one to create more awareness wrt process vs runtime metrics. The approach we're taking (for java and .NET) is to emit {runtime}.cpu.time metric and leave process ones for collector. I.e. JS (node) should probably define new process-like metrics and report them instead.

@pichlermarc pichlermarc added pkg:host-metrics priority:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working information-requested pkg:host-metrics priority:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization
Projects
None yet
Development

No branches or pull requests

3 participants