Skip to content
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

Enable new set of Go metrics in Kubernetes #111910

Merged
merged 1 commit into from Aug 29, 2022

Conversation

tosi3k
Copy link
Member

@tosi3k tosi3k commented Aug 18, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

This change adds more Golang-related metrics to Kubernetes which are useful when debugging Golang-related problems in Kubernetes.

Which issue(s) this PR fixes:

No issue is opened for that.

Special notes for your reviewer:

Bases on prometheus/client_golang version bump in #112052 which has to be submitted first.

Does this PR introduce a user-facing change?

Add new Golang runtime-related metrics to Kubernetes components:
* go_gc_cycles_automatic_gc_cycles_total
* go_gc_cycles_forced_gc_cycles_total
* go_gc_cycles_total_gc_cycles_total
* go_gc_heap_allocs_by_size_bytes
* go_gc_heap_allocs_bytes_total
* go_gc_heap_allocs_objects_total
* go_gc_heap_frees_by_size_bytes
* go_gc_heap_frees_bytes_total
* go_gc_heap_frees_objects_total
* go_gc_heap_goal_bytes
* go_gc_heap_objects_objects
* go_gc_heap_tiny_allocs_objects_total
* go_gc_pauses_seconds
* go_memory_classes_heap_free_bytes
* go_memory_classes_heap_objects_bytes
* go_memory_classes_heap_released_bytes
* go_memory_classes_heap_stacks_bytes
* go_memory_classes_heap_unused_bytes
* go_memory_classes_metadata_mcache_free_bytes
* go_memory_classes_metadata_mcache_inuse_bytes
* go_memory_classes_metadata_mspan_free_bytes
* go_memory_classes_metadata_mspan_inuse_bytes
* go_memory_classes_metadata_other_bytes
* go_memory_classes_os_stacks_bytes
* go_memory_classes_other_bytes
* go_memory_classes_profiling_buckets_bytes
* go_memory_classes_total_bytes
* go_sched_goroutines_goroutines
* go_sched_latencies_seconds

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 18, 2022
@k8s-ci-robot
Copy link
Contributor

Please note that we're already in Test Freeze for the release-1.25 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.25.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Thu Aug 18 07:40:11 UTC 2022.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/apiserver area/cloudprovider labels Aug 18, 2022
@k8s-ci-robot k8s-ci-robot added the area/dependency Issues or PRs related to dependency changes label Aug 18, 2022
@k8s-ci-robot k8s-ci-robot requested review from cici37 and a team August 18, 2022 13:31
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 18, 2022
@leilajal
Copy link
Contributor

/cc @liggitt
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 18, 2022
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 24, 2022
@dashpole
Copy link
Contributor

/assign @logicalhan
cc @dgrisonnet
for sig-instrumentation

@dgrisonnet
Copy link
Member

For anyone looking into what this new Go package brings compare to the previous one, I would recommand having a look at prometheus/client_golang#955, it is well describe in this PR.

@tosi3k
Copy link
Member Author

tosi3k commented Aug 26, 2022

/retest

@dgrisonnet
Copy link
Member

Looks good to me, leaving approval to @logicalhan since he also wanted to have a look.

Copy link
Member

@logicalhan logicalhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the diff in the metrics? If there is a large delta (i.e. metrics are removed) this could break consumers.

@dgrisonnet
Copy link
Member

This implementation adds all these metrics on top of the already exposed one: https://github.com/prometheus/client_golang/blob/main/prometheus/collectors/go_collector_latest_test.go#L92-L120.

No metrics are removed, only new ones are added.

@logicalhan
Copy link
Member

This implementation adds all these metrics on top of the already exposed one: https://github.com/prometheus/client_golang/blob/main/prometheus/collectors/go_collector_latest_test.go#L92-L120.

No metrics are removed, only new ones are added.

We should add these to the release note.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Aug 29, 2022
@tosi3k
Copy link
Member Author

tosi3k commented Aug 29, 2022

This implementation adds all these metrics on top of the already exposed one: https://github.com/prometheus/client_golang/blob/main/prometheus/collectors/go_collector_latest_test.go#L92-L120.
No metrics are removed, only new ones are added.

We should add these to the release note.

Done. Let me know if the release notes format in the PR's description suits you.

Copy link
Member

@logicalhan logicalhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 29, 2022
@liggitt
Copy link
Member

liggitt commented Aug 29, 2022

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, logicalhan, tosi3k

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 29, 2022
@k8s-ci-robot k8s-ci-robot merged commit bf2e850 into kubernetes:master Aug 29, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver area/cloudprovider area/dependency Issues or PRs related to dependency changes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants