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

MON-3231: add metric for the configured profile #2030

Merged
merged 3 commits into from Jul 6, 2023

Conversation

rexagod
Copy link
Member

@rexagod rexagod commented Jul 2, 2023

- adds a metric with the label value set to the current collection profile.
  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

@openshift-ci-robot
Copy link
Contributor

@rexagod: No Jira issue with key MON-2301 exists in the tracker at https://issues.redhat.com/.
Once a valid jira issue is referenced in the title of this pull request, request a refresh with /jira refresh.

In response to this:

  • adds a metric with the label value set to the current collection profile.
  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot requested review from jan--f and raptorsun July 2, 2023 16:23
@rexagod rexagod changed the title MON-2301: add metric for the configured profile MON-3231: add metric for the configured profile Jul 2, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 2, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 2, 2023

@rexagod: This pull request references MON-3231 which is a valid jira issue.

In response to this:

  • adds a metric with the label value set to the current collection profile.
  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rexagod rexagod force-pushed the 2301 branch 5 times, most recently from f254d61 to 700ac82 Compare July 2, 2023 21:33
@rexagod
Copy link
Member Author

rexagod commented Jul 3, 2023

/test e2e-aws-ovn-single-node

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

Since collection profiles are gated via TechPreview, I would only expose the metric if tech preview is explicitly enabled.

I'd also recommend exposing all collection profile values, e.g.

cluster_monitoring_operator_collection_profile{..., collection_profile="full"} 1
cluster_monitoring_operator_collection_profile{..., collection_profile="minimal"} 0

Having 0 for all series would mean that the collection profile is misconfigured.

pkg/metrics/metrics.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

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

Generally this looks good to me. Can you please add separate commits for the lint fix, the metrics refactor and for adding the new metric? This will make future change archeology much easier.
Also this does not add the telemetry config yet, we could add the CMO side for this here too?

One thing I'd like to raise for discussion: Should we maybe add a cluster_monitoring_operator_configuration metric instead of single metrics for config options we're interested in? We're mostly interested in the label we set anyway and I think such a metadata metric can make it easier to add additional signals and send them to telemetry.

pkg/manifests/config.go Outdated Show resolved Hide resolved
@jan--f
Copy link
Contributor

jan--f commented Jul 3, 2023

One thing I'd like to raise for discussion: Should we maybe add a cluster_monitoring_operator_configuration metric instead of single metrics for config options we're interested in? We're mostly interested in the label we set anyway and I think such a metadata metric can make it easier to add additional signals and send them to telemetry.

Briefly discussed in slack, individual metrics have clear benefits.

@rexagod
Copy link
Member Author

rexagod commented Jul 3, 2023

Can you please add separate commits for the lint fix, the metrics refactor and for adding the new metric? This will make future change archeology much easier.

@jan--f Does it sound good if do this once the PR is LGTM'd and good to merge? That way I can keep adding any lint fixes or refactors during further reviews and split them all in the end.

@rexagod rexagod force-pushed the 2301 branch 2 times, most recently from ae68b0e to 3538917 Compare July 4, 2023 02:04
Documentation/data-collection.md Outdated Show resolved Hide resolved
pkg/manifests/config.go Outdated Show resolved Hide resolved
pkg/manifests/config.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/manifests/config.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
@jan--f
Copy link
Contributor

jan--f commented Jul 5, 2023

/lgtm
/hold
for better commits :)

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 5, 2023
@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 5, 2023
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

one last nit :)

jsonnet/rules.libsonnet Outdated Show resolved Hide resolved
* Allow govet on `Main()`.
* Remove trailing whitespaces for telemetry metrics.
* Reword description for `manifests.NewConfigFromString`.
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 5, 2023
move meta metrics under the `metrics` package.
add meta metric and telemeter signal that depicts the current state of
the various collection profiles and the one that is active,
respectively.
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 5, 2023

@rexagod: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@jan--f
Copy link
Contributor

jan--f commented Jul 6, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jan--f, rexagod

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

@jan--f
Copy link
Contributor

jan--f commented Jul 6, 2023

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 6, 2023
@openshift-merge-robot openshift-merge-robot merged commit 60f4899 into openshift:master Jul 6, 2023
16 checks passed
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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants