Skip to content

Integrate Prometheus metrics exporter for refresh stats #38

Description

@niteshpurohit

Feature Request

Description:

Expose key refresh metrics (e.g., counts, durations, error rates) via a /metrics endpoint in a format compatible with Prometheus for scraping.

Use Case:

Enables integration with modern, industry-standard monitoring and alerting systems like Prometheus and Grafana for advanced observability.

Proposed Solution:

  • Add a dependency on a Prometheus client library for Ruby.
  • Instrument the MatViewRefreshJob to update metrics for duration, success count, and failure count.
  • Mount the /metrics endpoint within the engine.
  • Provide sample Grafana dashboard configurations in the documentation.

RSpec Tests:

  • Perform a successful and a failed refresh job.
  • Access the /metrics endpoint and verify that the Prometheus output contains the correct metrics (e.g., mat_views_refresh_total{status='success'} 1).
  • Check that refresh duration histograms or summaries are correctly recorded.

Checklist:

  • I have searched for a similar feature request and didn't find any duplicates.
  • I have included all the required information.
  • I have tagged the issue with the label "enhancement".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    • Status
      Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions