Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usrloc: change "-" for "_" in stats name to be prometheus compliant #2304

Merged
merged 6 commits into from May 2, 2020
2 changes: 2 additions & 0 deletions src/core/config.h
Expand Up @@ -211,4 +211,6 @@

#define DEFAULT_MAX_WHILE_LOOPS 100 /*!< Maximum allowed iterations for a while (to catch runaways) */

#define KSR_STATS_NAMESEP '_'

#endif
2 changes: 1 addition & 1 deletion src/modules/ims_usrloc_pcscf/udomain.c
Expand Up @@ -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++) = KSR_STATS_NAMESEP;
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/p_usrloc/udomain.c
Expand Up @@ -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++) = KSR_STATS_NAMESEP;
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/usrloc/udomain.c
Expand Up @@ -61,7 +61,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
*(p++) = '_';
*(p++) = KSR_STATS_NAMESEP;
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;
Expand Down