Skip to content

[instrumentation-runtime-node] Add metrics from v8.getHeapStatistics #3518

@tpilewicz

Description

@tpilewicz

Is your feature request related to a problem? Please describe

When using instrumentation-runtime-node, I want to be able to divide the metrics on heap usage by the heap size limit. This would allow alerting on the fact that e.g 80% of the heap size limit is used.

Describe the solution you'd like to see

If metrics were collected from v8.getHeapStatistics, I could divide for example used_heap_size by heap_size_limit to get heap utilization ratio.

Describe alternatives you've considered

I tried using the heap space statistics that the instrumentation records today, but they do not report on the actual hard limits there are on memory. For example this metric represents the space's current size, but the space might grow. So dividing heap.used by heap.limit doesn't achieve my goal.

Additional context

Happy to open a PR if it is deemed useful!

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions