Skip to content

Conversation

@giovanniborella
Copy link
Contributor

@giovanniborella giovanniborella commented Jun 26, 2025

This pull request introduces Prometheus metrics to the project, enabling detailed monitoring of various operations. Metrics are added for SQL queries, WMS requests, print operations, and HTTP endpoints, allowing tracking of counts, durations, and response sizes. Additionally, documentation has been updated to reflect these changes and provide configuration instructions.

The feature has been implemented as an "Opt-in", and the metrics are not yet feature-complete - more metrics may be added down the line.

There is no dashboard yet, but one is in the works.

Metrics Implementation:

SQL Controller (controllers/gc2/sql.js):

  • Added counters and histograms for SQL query counts, durations, and response sizes, with labels such as db, format, and status. [1] [2]

WMS Controller (controllers/gc2/wms.js):

  • Introduced metrics for WMS request counts, durations, and response sizes, including labels like db, request_type, and status. [1] [2]

Print Controller (controllers/print.js):

  • Added tracking for print request counts and durations, with labels for scale, format, template, and db. Metrics are updated for success, error, and various formats (e.g., PNG, PDF). [1] [2] [3] [4] [5]

Documentation Updates:

  • Updated docs/pages/standard/90_build_configuration.rst with instructions for enabling metrics in the config.js file, including endpoint and port configuration for Prometheus integration.

Changelog:

  • Added an entry in CHANGELOG.md summarizing the new Prometheus metrics feature, including details on supported controllers and metrics types.

@giovanniborella giovanniborella marked this pull request as draft July 1, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant