Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-5513

GlitchTip: push_to_gateway() missing 1 required positional argument: 'registry'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 2024-Sep-24
    • None
    • DevOps
    • 5
    • False
    • None
    • False

      Due to changes in #5293.

      https://glitchtip.devshift.net/insights/issues/3037656

      TypeError:push_to_gateway() missing 1 required positional argument: 'registry'
      File "celery/app/trace.py", line 734, in __protected_call__
           return self.run(*args, **kwargs)
      File "koku/metrics.py", line 133, in collect_metrics
           push_to_gateway(settings.PROMETHEUS_PUSHGATEWAY, job="koku.metrics.collect_metrics")
      

      Hopefully this is a simple fix.

      There may be some issues with how we are using multiprocess mode.

      The docs state that a pushgateway may not be used with multiprocess mode, yet that is what we are doing.

      The CollectorRegistry is instantiated on import since it is a global in koku.metrics. That registy is then registered with a MultiProcessCollector, also on import. This may work, but it seems like it may be problematic.

              rh-ee-sdoran Sam Doran
              rh-ee-sdoran Sam Doran
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: