From 066db318af43aec377e04c6082c7cc154964eb47 Mon Sep 17 00:00:00 2001 From: Riadh Meghenem Date: Thu, 21 Nov 2024 16:14:43 +0100 Subject: [PATCH] feat(metrics): support metrics configuration (#27) --- config/application.conf | 23 ++++++++++++++++++++++- values.yaml | 6 ++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/config/application.conf b/config/application.conf index f8b4138..8aa7eda 100644 --- a/config/application.conf +++ b/config/application.conf @@ -14,8 +14,29 @@ play { } } +{{- if .Values.metrics.enabled }} +kamon { + modules { + apm-reporter.enabled = no + prometheus-reporter.enabled = yes + host-metrics.enabled = no + jvm-metrics { + enabled = no + } + } + prometheus { + include-environment-tags = true + embedded-server { + hostname = 0.0.0.0 + port = {{ .Values.metrics.port }} + } + } + init.hide-banner = yes +} +{{- end }} + {{- if .Values.extraConfig }} # Extra configuration injected by extraConfig {{ .Values.extraConfig | nindent 2 }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/values.yaml b/values.yaml index 061d6d3..2b892ba 100644 --- a/values.yaml +++ b/values.yaml @@ -605,3 +605,9 @@ extraObjects: ## - key: stream-secret-key ## name: stream-secret-name +## Enable Prometheus metrics +metrics: + ## @param metrics.enabled Whether to enable Prometheus metrics + enabled: false + ## @param metrics.port Prometheus metrics port + port: 9095