Skip to content

Commit 0ef7957

Browse files
authored
fix: don't require authentication for crud-web-apps metrics endpoints (kubeflow/kubeflow#7697)
Signed-off-by: Justin Bronn <justin.bronn@maxar.com>
1 parent f1f441c commit 0ef7957

File tree

1 file changed

+6
-1
lines changed
  • components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend

1 file changed

+6
-1
lines changed

components/crud-web-apps/common/backend/kubeflow/kubeflow/crud_backend/metrics.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from flask import Flask
55
from prometheus_flask_exporter import PrometheusMetrics
66

7+
from .authn import no_authentication
8+
79
log = logging.getLogger(__name__)
810

911

@@ -36,7 +38,10 @@ def enable_metrics(app: Flask) -> None:
3638
backend_version = _get_backend_version()
3739
log.debug("Backend version is %s", backend_version)
3840
metrics = PrometheusMetrics(
39-
app, group_by="url_rule", default_labels={"app": app.name}
41+
app,
42+
group_by="url_rule",
43+
default_labels={"app": app.name},
44+
metrics_decorator=no_authentication,
4045
)
4146
# add default metrics with info about app
4247
metrics.info(

0 commit comments

Comments
 (0)