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

Add one sample metric for csm-metrics-powerscale #2

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

taohe1012
Copy link
Contributor

@taohe1012 taohe1012 commented Jun 28, 2022

Description

Add a sample metric for volume to csm-metrics-powerscale, and display
powerscale_volume_used_capacity_in_bytes in the Prometheus firstly:

  • CreateClient and GetVolumeSize from goisilon;
  • Implement GetPersistentVolumes and GetStorageClass from k8s;
  • Implement LeaderElection;
  • Implement asyncInstrument, metric and exporter for opentelemetry;
  • Push and display real-time metric value in Prometheus;
  • Add mockgen files, and test coverage over 90%.

Note: we upgrade the OpenTelemetry to v1.7.0, and its subpackages to v0.30.0, to use Async UpDownCounter instead of Sync UpDownCounter.
According official reference, UpDownCounter :
For fetching the snapshot of the “current value” is straightforward, use Asynchronous UpDownCounter instead, not Synchronous UpDownCounter.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#452

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have inspected the Grafana dashboards to verify the data is displayed properly
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

How Has This Been Tested?

  • Test A: make check

make_check

  • Test B: UT

make_test

  • Test C:manual testing(add the screenshot of promethus)
    Add/Delete resource under the volume, the values displayed on the Promethus also increase or decrease

UI_Prometheus_2

Manual inspection of the GUI

#I have verified that the dashboards show the data properly while generating I/O and storage resources
I have verified that the GUI of Prometheus show the data properly while generating storage resources.

  • Yes
  • No

@taohe1012 taohe1012 changed the title Add one same metric for csm-metrics-powerscale Add one sample metric for csm-metrics-powerscale Jun 29, 2022
@taohe1012 taohe1012 force-pushed the feature-343-PScaleMetrics branch from b6da51c to fdcf8f9 Compare June 29, 2022 01:51
Add a sample metric for volume to csm-metrics-powerscale, and display
powerscale_volume_used_capacity_in_bytes in the Prometheus firstly:
  - CreateClient and GetVolumeSize from goisilon;
  - Implement GetPersistentVolumes and GetStorageClass from k8s;
  - Implement LeaderElection;
  - Implement asyncInstrument, metric and exporter for opentelemetry;
  - Push and display real-time metric value in Prometheus;
  - Add mockgen files, and test coverage over 90%.
@taohe1012 taohe1012 force-pushed the feature-343-PScaleMetrics branch from fdcf8f9 to 5f42701 Compare June 29, 2022 12:06
@taohe1012
Copy link
Contributor Author

run e2e test

1 similar comment
@taohe1012
Copy link
Contributor Author

run e2e test

@taohe1012
Copy link
Contributor Author

run e2e test

@sharmilarama sharmilarama requested a review from alikdell June 30, 2022 18:29
@taohe1012
Copy link
Contributor Author

run e2e test

@taohe1012
Copy link
Contributor Author

e2e pass

@taohe1012
Copy link
Contributor Author

e2e pass

@taohe1012
Copy link
Contributor Author

run e2e test

1 similar comment
@taohe1012
Copy link
Contributor Author

run e2e test

@taohe1012 taohe1012 merged commit 29ceb89 into main Jul 11, 2022
@taohe1012 taohe1012 deleted the feature-343-PScaleMetrics branch July 11, 2022 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants