Repository navigation
feat(metrics): align metrics schema with Cloud Metric Descriptor conventions (k8s_gcs_fuse_volume) - #5100
Conversation
There was a problem hiding this comment.
Code Review
This pull request renames the "fs/ops_latency" metric to "fs/ops_latencies" across the codebase, adds size-check guards before updating reader sizes in "internal/fs/handle/file.go", and enhances the metrics generator to format output files and search fallback paths for templates. The review feedback highlights a critical data race vulnerability in "internal/fs/handle/file.go" where reader sizes are modified under a read lock; it is recommended to return false and let the caller acquire a write lock instead. Additionally, the metrics generator should fail fast on formatting errors rather than silently ignoring them to prevent writing invalid Go code.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5100 +/- ##
===========================================
+ Coverage 0 84.92% +84.92%
===========================================
Files 0 178 +178
Lines 0 19651 +19651
===========================================
+ Hits 0 16689 +16689
- Misses 0 2961 +2961
- Partials 0 1 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
925ff2c to
43fc09f
Compare
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
14 similar comments
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @anushka567, @meet2mky, @kislaykishore, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
43fc09f to
776eb12
Compare
e41592d to
9051597
Compare
9051597 to
c101a3c
Compare
c101a3c to
e6bfc8a
Compare
Description
This PR aligns GCSFuse OpenTelemetry metric names with the
k8s_gcs_fuse_volumeMonitored Resource schema in Google Cloud Monitoring while supporting flag-controlled fallback to the legacy metric name:--metrics-enable-new-metrics-schemaCLI flag /metrics.enable-new-metrics-schemaconfig option (default: true, reusingproto-tag: 130incfg/params.yaml) so callers such as the GKE GCSFuse CSI driver can explicitly toggle between the newfs/ops_latenciesmetric name (true) and the legacyfs/ops_latencymetric name (false).metric.WithView/metric.NewViewininternal/monitor/otelexporters.go) to renamefs/ops_latencytofs/ops_latencieswhenmetrics.enable-new-metrics-schemaistrue, avoiding any changes tometrics/metrics.yaml,tools/metrics-gen, or generatedmetrics/code.tools/integration_tests/monitoring/prom_test.go), config validation tests (cmd/root_test.go,cmd/config_validation_test.go), OTel view unit tests (internal/monitor/otelexporters_test.go), and VM metrics scripts (perfmetrics/scripts/vm_metrics/vm_metrics.py) to match the updated metric schema.Link to the issue in case of a bug fix.
b/483847747
Testing details
go test -race ./internal/monitor/... ./metrics/... ./cmd/... ./cfg/...andpython3 -m unittest perfmetrics/scripts/vm_metrics/vm_metrics_test.pytools/integration_tests/monitoring/prom_test.go