Open trask opened 2 years ago
I think this is not about "allowing", it is about is it expected to have this instrumentation? Do we want to maintain this in all the language? etc.
/cc @yurishkuro
I think this may be a language-ecosystem thing.
The JVM has been emitting "process cpu time" for almost 2 decades, so Java users very much expect this to be emitted by any Java metric library.
Allow instrumentations to report process.cpu.time for their own process (resource attributes would differentiate it from process.cpu.time reported by the OpenTelemetry Collector)
Did you also mean process.cpu.utilization
? Looks this issue was opened based on conversation from #2436.
I'm beginning to question if it is even possible for an instrumentation library to support process.cpu.utilization
given its current definition:
Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process.
In the event of multiple meter providers, their reporting intervals may be different. So, calculating the difference in process.cpu.time since the last measurement requires the instrumentation to maintain some state per meter provider. I don't think the metric API spec offers the support necessary for this.
What are you trying to achieve?
Clarification on whether language-based instrumentation is allowed to report
process.cpu.time
for its process.The specification currently says:
I think there are roughly three options:
process.cpu.time
for their own process (resource attributes would differentiate it fromprocess.cpu.time
reported by the OpenTelemetry Collector)process.runtime.*
orprocess.runtime.[jvm].*
, e.g.process.runtime.cpu.time
orprocess.runtime.[jvm].cpu.time