-
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 k8s metrics for jobs and cronjobs #1660
base: main
Are you sure you want to change the base?
Conversation
36fccd7
to
85355c5
Compare
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.
It seems like these should all be UpDownCounters, rather than gauges.
Good catch @dashpole! My only concern is about the k8s.job.desired_successful_pods and |
The main question is how they should be aggregated. UpDownCounters aggregate by summing, gauges aggregate by averaging. If I was aggregating |
This is a very interesting point. These metrics being additive makes sense to me. But the data point type from the receiver is gauge. I think most instrumentation libraries export UpDownCounter as non-monotonic sums but I am not sure if this a standard. Would this cause some confusion for users? Should there be a way to clarify export and instrument type in cases as this? |
Yes, that is correct. It is a bit odd to specify an instrument type for metrics that are not recorded using an instrument, but that seems mostly editorial here. IMO we should update the data point type in the receiver to be a non-monotonic sum. |
I think this is the closest we have: which specifies exporting UpDownCounter with Cumulative aggregation in all cases |
6944146
to
b1691ad
Compare
Do @open-telemetry/semconv-system-approvers want to take a look? |
Signed-off-by: ChrsMark <[email protected]>
b1691ad
to
9c9e0db
Compare
Part of #1032
Changes
This PR adds metrics for k8s jobs and cronjobs that are already in use by the Opentelemetry Collector (k8scluster receiver).
k8s.job.active_pods
(collector)k8s.job.failed_pods
(collector)k8s.job.successful_pods
(collector)k8s.job.desired_successful_pods
(collector)k8s.job.max_parallel_pods
(collector)k8s.cronjob.active_jobs
(collector)Merge requirement checklist
[chore]