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

Make "event_source" configurable when saving to the events table

    XMLWordPrintable

Details

    Description

      We're going to have two "versions" of swatch-metrics running. Today, we're explicitly setting the "event_source" value to "prometheus" when creating MetricEvent objects.

      Reference: https://github.com/RedHatInsights/rhsm-subscriptions/blob/6fce78a963b9b0f64d6c60b5ec72f8644583a36a/src/main/java/org/candlepin/subscriptions/metering/MeteringEventFactory.java#L161

      This needs to be configurable so we can use the value "rhelemeter" when events are getting created by the swatch-metrics instance that is pulling from rhelemeter.

      Done

      1. "event_source" is configured as an env var, set in the clowdapp file, and the configured value saves in the "events" table appropriately

       

      Testing/Verification
      Use internal API against each pod, but will have to stand up a mock for rhelemeter response because we don’t have a product configured that would get its metrics (system_cpu_logical_count) from rhelemeter, and there’s not data readily available in stage rhelemeter yet.

      Attachments

        Issue Links

          Activity

            People

              jcarvaja@redhat.com Jose Carvajal Hilario
              lburnett0 Lindsey Burnett
              Trayvon McKnight Trayvon McKnight
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: