Skip to content

Commit

Permalink
prometheus: sanitize dot for metric name
Browse files Browse the repository at this point in the history
  • Loading branch information
jsurloppe committed Feb 9, 2022
1 parent b6cf15d commit d3fd3d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions faust/sensors/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def setup_prometheus_sensors(
"Name prefix is not supplied. Using the name %s from App config.",
app_conf_name,
)
if "-" in app_conf_name:
name_prefix = app_conf_name.replace("-", "_")
if "-" in app_conf_name or "." in app_conf_name:
name_prefix = app_conf_name.replace("-", "_").replace(".", "_")
app.logger.warning(
"App config name %s does not conform to"
" Prometheus naming conventions."
Expand Down

0 comments on commit d3fd3d8

Please sign in to comment.