-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add resource attribute for number of cores #977
Comments
We had a long discussion on #99 about whether this should be an attribute or a metric and we decided it would be a metric. You can see #99 (comment). I don't think we should represent the same concept as both a metric and a resource attribute. |
@mx-psi Thank you for the pointer. I just left a comment (#99 (comment)). My use case would be profiling, where we use the number of logical CPUs as part of the CO2 and $ cost calculations. |
hey @rockdaboot, I'm not sure if cpu cores can be a resource attribute today since it is potentially mutable (open-telemetry/opentelemetry-specification#2384 (comment)) but I think this limitation is being worked on by the resources and entities SIG, see https://github.com/open-telemetry/community/blob/main/projects/resources-and-entities.md#problem-3-lack-of-mutable-attributes |
Hey @trask, thanks for the links, just my point of view...
Well, isn't everything above the hardware level mutable during runtime!? For me, the question is where to draw the line, e.g. why are We are talking about the host/OS level here, not about single processes. Is seems not to be relevant whether the Java runtime is able to pick up changed CPU values or whether Let's see how the resources and entities SIG decides :) |
We discussed this at KubeCon NA 2024 on 2024-11-14. Now that the resources and entities SIG is pushing the possibility of mutable attributes, this is unblocked and could be added. There is precedent about the same concept being represented as both a resource attribute and a metric (e.g. HTTP request body size) so we can add this if useful regardless of the existance of metrics |
Area(s)
area:host, area:system
Is your change request related to a problem? Please describe.
The profiling agent that recently has been donated to OTEL by Elastic sends the number of present logical CPU cores as host metadata.
Currently, the field name is specific to Elastic and should be changed it to something fitting for OTEL semantic conventions.
Describe the solution you'd like
Add a new resource attribute like
system.cpu.logical.count
(or underhost.cpu.*
).A more generic approach would be to reflect the CPU topology, similar to what Linux systems present (see https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-system-cpu) or at least keep that in mind when deciding for a name.
Describe alternatives you've considered
Use a field name outside the OTEL semantic conventions (what is done currently). Not ideal regarding future compatibility (may theoretically cause conflicts).
Additional context
No response
The text was updated successfully, but these errors were encountered: