Skip to content

[processor/resourcedetection, receiver/hostmetrics] Report total memory and CPU capacity numbers as resource attributes #22099

Closed
@mx-psi

Description

Component(s)

processor/resourcedetection, receiver/hostmetrics

Describe the issue you're reporting

As part of improving the infrastructure monitoring capabilities of the OpenTelemetry Collector, I want to report total memory and filesystem capacity as well as CPU cores.

Part of this information can already be retrieved by combining information from the hostmetrics receiver; for example if you count the number of cpu values on system.cpu.time you can get the total number of cores. However, if you want to produce this information at the exporter, you then depend on all metrics reaching the same exporter and therefore you would make your deployment stateful.

I want therefore to add this information as resource attributes to avoid stateful deployments.

My remaining open question is where to add this. I see two possibilities:

  1. Make this part of the resource attributes on metrics generated by the host metrics receiver.
  2. Make this part of the resource attributes added by the resource detection processor system detector.

I am leaning towards (2), since that way this information can be leveraged by users that do not use the host metrics receiver but still want to have that kind of information, but I want some other opinions.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions