Skip to content

Commit

Permalink
Label metrics by endpoint not path
Browse files Browse the repository at this point in the history
Metrics are not logs!

Currently, OWS pods are exporting ~5k metrics each due to a misconfiguration, unreasonably requiring Prometheus to retain multiple separate time-series per HTTP path. High cardinality information (individual HTTP paths) belong in logs but not metrics.

This change makes OWS consistent with datacube-explorer:
opendatacube/datacube-explorer@6051dd6
  • Loading branch information
benjimin authored and omad committed Dec 5, 2023
1 parent 721c457 commit 637dd67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datacube_ows/startup_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def initialise_prometheus(app, log=None):
if os.environ.get("prometheus_multiproc_dir", False):
from prometheus_flask_exporter.multiprocess import \
GunicornInternalPrometheusMetrics
metrics = GunicornInternalPrometheusMetrics(app)
metrics = GunicornInternalPrometheusMetrics(app, group_by="endpoint")
if log:
log.info("Prometheus metrics enabled")
return metrics
Expand Down

0 comments on commit 637dd67

Please sign in to comment.