-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore(host-metrics): solve some TODO comments #124
Conversation
@@ -206,27 +214,41 @@ class SystemCpuUtilizationAggregation extends Aggregation { | |||
/** @type {HostMetrics} */ | |||
let hostMetricsInstance; | |||
function enableHostMetrics() { | |||
// TODO: make this configurable, user might collect host metrics with a separate utility | |||
// NOTE: we set the scope name to the package name `@opentelemetry/host-metrics` like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewer: maybe this is a hot take but IMO if we let the user to name the scope of host metrics as he/she wants we wont have a clear way to know if the metrics came from @opentelemetry/host-metrics
or another utility/package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see any value in passing in a value here, or having it configurable? I don't, but I may be missing soemthing. If not, then this whole function could be:
function enableHostMetrics() {
hostMetricsInstance = new HostMetrics();
hostMetricsInstance.start();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing it since it has a default value
new View({ | ||
instrumentName: 'system.cpu.time', | ||
aggregation: Aggregation.Drop(), | ||
}), | ||
// use the aggregation we craeted above | ||
// drop `process.*` (not in Kibana) | ||
new View({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewer: dropping process.*
metrics for now since there is no UI showing them. We probably want an aggregation for process.cpu.utilization
but I think it would be easier and shorter once open-telemetry/opentelemetry-js#4616 is done
…-otel-node into dluna/host-metrics-todos
This PR address a couple of
TODO
comments for metrics. I proposed a couple of changes that are meant to be discussed here before the alpha comes out.