Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-36845

Progress metrics are not in the monitoring package

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • CNV v4.16.1
    • None
    • CNV Storage
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • CNV v4.16.1.rhel9-9, CNV v4.17.0.rhel9-60
    • ---
    • ---
    • Storage Core Sprint 252, Storage Core Sprint 253, Storage Core Sprint 254, Storage Core Sprint 255, Storage Core Sprint 256
    • No

      Description of problem:

      clone_progress, import_progress and openstack_volume_populator metrics are not in the monitoring package.
      These metrics are not with correct metrics names , based on the CNV and Prometheus metrics naming conventions, they are not documented and are not located under /pkg/monitoring.
      After the code refactoring we should not have Prometheus metrics in other places in the code, other than the /monitoring/metrics package, and metrics should be registered using operator-observability package.
      
      We have a linter to make sure no one adds new metrics in other places, which is currently blocked by this issue and this goes against the refactoring effort.
      This linter was already enabled in almost all other CNV repos.
      Linter output for CDI:
      go install github.com/kubevirt/monitoring/monitoringlinter/cmd/monitoringlinter@e2be790
      monitoringlinter ./...
      /root/go/src/kubevirt.io/containerized-data-importer/cmd/cdi-cloner/clone-source.go:110:2: monitoring-linter: metrics should be registered only within pkg/monitoring directory, using operator-observability packages.
      /root/go/src/kubevirt.io/containerized-data-importer/pkg/image/qemu.go:99:12: monitoring-linter: metrics should be registered only within pkg/monitoring directory, using operator-observability packages.
      /root/go/src/kubevirt.io/containerized-data-importer/pkg/importer/format-readers.go:51:12: monitoring-linter: metrics should be registered only within pkg/monitoring directory, using operator-observability packages.
      /root/go/src/kubevirt.io/containerized-data-importer/pkg/importer/vddk-datasource_amd64.go:792:12: monitoring-linter: metrics should be registered only within pkg/monitoring directory, using operator-observability packages.
      /root/go/src/kubevirt.io/containerized-data-importer/cmd/openstack-populator/openstack-populator.go:102:12: monitoring-linter: metrics should be registered only within pkg/monitoring directory, using operator-observability packages.

       

       

      Version-Release number of selected component (if applicable):

      4.14

      How reproducible:

      100%

      Steps to Reproduce:

      1. Check the code for the metrics
      2.
      3.
      

      Actual results:

      The metrics are not in the /monitoring/metrics package and name is not according to the naming conventions.

      Expected results:

      Prometheus metrics should only be generated and handled in the /monitoring/metrics package and metric names should comply with the metrics name linter

      Additional info:

       

            agilboa@redhat.com Arnon Gilboa
            sradco Shirly Radco
            Kevin Alon Goldblatt Kevin Alon Goldblatt
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: