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

feature(1026): add sessioncount to prometheus metrics #1075

Merged

Conversation

paulkram
Copy link
Contributor

@paulkram paulkram commented Nov 3, 2022

No description provided.

@paulkram paulkram force-pushed the feature/paulkra/add-more-prometheus-metrics branch from c126e4e to 9f27e06 Compare November 3, 2022 12:26
void prom_inc_allocation(void);
void prom_dec_allocation(void);
void prom_inc_allocation(SOCKET_TYPE type);
void prom_dec_allocation(SOCKET_TYPE type);
#else

void start_prometheus_server(void);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method does not need to be guarded by the TURN_NO_PROMETHEUS define.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree - we should have minimal amount if ifdefs outside of prom_server.c file to improve readability of the code

@@ -201,7 +201,7 @@ int ur_map_foreach(ur_map* map, foreachcb_type func) {
return 0;
}

int ur_map_foreach_arg(ur_map* map, foreachcb_arg_type func, void* arg) {
int ur_map_foreach_arg(const ur_map* map, foreachcb_arg_type func, void* arg) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this in this PR? What does it fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had another approach how to add more metrics at first and missed to remove that. This only improves readability for new devs to understand which are in and which are out parameters.

@eakraly eakraly merged commit 5a28394 into coturn:master Nov 6, 2022
@paulkram
Copy link
Contributor Author

paulkram commented Nov 7, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants