Module: kamailio
Branch: master
Commit: 2fe0378c3d0596e30d8ec9ea4cb7d828321d2030
URL:
https://github.com/kamailio/kamailio/commit/2fe0378c3d0596e30d8ec9ea4cb7d82…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Date: 2020-04-28T14:48:59+02:00
p_usrloc, ims_usrloc_pcscf: change "-" for "_" in stats name to be
prometheus compliant
---
Modified: src/modules/ims_usrloc_pcscf/udomain.c
Modified: src/modules/p_usrloc/udomain.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2fe0378c3d0596e30d8ec9ea4cb7d82…
Patch:
https://github.com/kamailio/kamailio/commit/2fe0378c3d0596e30d8ec9ea4cb7d82…
---
diff --git a/src/modules/ims_usrloc_pcscf/udomain.c
b/src/modules/ims_usrloc_pcscf/udomain.c
index 1be609ad42..7f63932e6b 100644
--- a/src/modules/ims_usrloc_pcscf/udomain.c
+++ b/src/modules/ims_usrloc_pcscf/udomain.c
@@ -82,7 +82,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
- *(p++) = '-';
+ *(p++) = '_';
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;
diff --git a/src/modules/p_usrloc/udomain.c b/src/modules/p_usrloc/udomain.c
index c25f1c6253..88612e957b 100644
--- a/src/modules/p_usrloc/udomain.c
+++ b/src/modules/p_usrloc/udomain.c
@@ -55,7 +55,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
- *(p++) = '-';
+ *(p++) = '_';
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;