Skip to content

Conversation

roidelapluie
Copy link
Member

Signed-off-by: Julien Pivotto [email protected]

@roidelapluie roidelapluie requested a review from SuperQ December 26, 2020 14:23
@roidelapluie
Copy link
Member Author

Ready for a second review, once that is in I will add metrics for the TLS part (or I can do in the same PR if you want)

u.failuresCounter = prometheus.NewCounter(
prometheus.CounterOpts{
Namespace: "prometheus_toolkit",
Subsystem: "https",
Copy link
Contributor

Choose a reason for hiding this comment

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

https and basic auth are not the same thing

In general, it's better to have the metric name as a single string literal as it makes grepping and determining what the actual metric name is easier.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have renamed the metric. However I think that keeping namespace separated is better, it that's fine for you.

Copy link
Member

Choose a reason for hiding this comment

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

I preferred it named based on the package name.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we change the package name?

Julien Pivotto added 2 commits December 27, 2020 09:58
Signed-off-by: Julien Pivotto <[email protected]>
Signed-off-by: Julien Pivotto <[email protected]>
@roidelapluie
Copy link
Member Author

Would renaming the package to http help, like this?

Signed-off-by: Julien Pivotto <[email protected]>
@roidelapluie
Copy link
Member Author

I did not like the "http" package rename as it is too close with go's net/http.

I have reworked this to have a metric name: prometheus_toolkit_https_basic_authentication_failures_total which does not read as 'https_requests' anymore. does it sound better ?

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.

3 participants