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

chore: add time metrics to the exporter #265

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

ramonberrutti
Copy link
Contributor

Parse time metrics as gauge

@@ -332,14 +338,6 @@ func (nc *NATSCollector) objectToMetrics(response map[string]interface{}, namesp
"gateway_tls_timeout": {},
"gateway_connect_retries": {},
}
labelKeys := map[string]struct{}{
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we want to gather metrics from all keys in varz. Other than the time-based metrics you want to add, this would include all the other strings from Varz struct, like go version, system account, http_base_path etc. I think we should leave labelKeys at they are and just add the required time metrics.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. I deleted it to test all the metrics and forgot to add it again.

Copy link
Contributor

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution!

@piotrpio piotrpio merged commit f6cb9e6 into nats-io:main Nov 8, 2023
3 checks passed
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