Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-1234

Refactor prometheus integration to use swatch-product-configuration

XMLWordPrintable

      As a developer, I'd like to refactor prometheus lookups to use swatch-product-configuration, so that I can retire tag_profile.

       

       

      Don't forget about the template substitution stuff at https://github.com/RedHatInsights/rhsm-subscriptions/blob/main/src/main/java/org/c[…]scriptions/metering/service/prometheus/promql/QueryBuilder.java

      That query builder injects into templates defined in properties. https://github.com/RedHatInsights/rhsm-subscriptions/blob/main/src/main/resources/application-openshift-metering-worker.yaml#L15 

       

      Note that some of those queryParam identifiers were renamed when migrated to swatch-product-configuration.

       

      tag_profile.yaml swatch-product-configuration yaml files
      prometheusMetric metrics[].prometheus.queryParams.metric
      prometheusMetadataMetric metrics[].prometheus.queryParams.metadata_metric
      resourceName metrics[].prometheus.queryParams.resourceName

       

      Done:

      • The following classes contain no references to tag_profile
        • InternalMeteringResource
        • PrometheusMeteringController
        • PrometheusAccountSource
        • PrometheusMeteringController
        • PrometheusMetricsTaskManager
        • MeteringJob
        • Remove the use of .withEventType(MeteringEventFactory.getEventType(measuredMetric.value(), productTag)) from MeteringEventFactory

      QE:

      Verify metering

            karshah@redhat.com Kartik Shah
            khowell@redhat.com Kevin Howell
            Aurobinda Nayak Aurobinda Nayak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: