-
Notifications
You must be signed in to change notification settings - Fork 0
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
STORY-25143 - Add prometheus metrics to smokescreen #1
base: master
Are you sure you want to change the base?
STORY-25143 - Add prometheus metrics to smokescreen #1
Conversation
…lag to prometheus config
README.md
Outdated
@@ -59,6 +59,10 @@ Here are the options you can give Smokescreen: | |||
--deny-address value Add IP[:PORT] to list of blocked IPs. Repeatable. | |||
--allow-address value Add IP[:PORT] to list of allowed IPs. Repeatable. | |||
--egress-acl-file FILE Validate egress traffic against FILE | |||
--prometheus-endpoint ENDPOINT Expose Prometheus metrics on the given endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the default endpoint /metrics
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had gone for requiring this to be set to enable prometheus, so not having any default value.
I'd been on the fence with having an --expose-prometheus
flag which doesn't take a value, and then keep --prometheus-endpoint
with a default value of /metrics
which may be cleaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work! a few minor things
* Don't export metrics list * Follow project sytlistic choices
README.md
Outdated
@@ -59,6 +59,10 @@ Here are the options you can give Smokescreen: | |||
--deny-address value Add IP[:PORT] to list of blocked IPs. Repeatable. | |||
--allow-address value Add IP[:PORT] to list of allowed IPs. Repeatable. | |||
--egress-acl-file FILE Validate egress traffic against FILE | |||
--prometheus-endpoint ENDPOINT Expose Prometheus metrics on the given endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does ENDPOINT default to /metrics? I'm a bit confused by some of the wording here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alex-kalinowski: #1 (comment) <- I'm happy to add a --enable-prometheus
flag, and have the --prometheus-endpoint
default to /metrics
- it's probably the cleanest way to structure the config.
cli.StringFlag{ | ||
Name: "prometheus-endpoint", | ||
Usage: "Expose metrics via prometheus on `ENDPOINT`.", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is just how my brain works with cli args but can we default this to /metrics and add an additional flag to the effect of metric-type
where you would choose statsd and/or prometheus and then ride the defaults if needed?
As of now the default is always shipping statsd metrics. Might want to provide a toggle to flip those off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alex-kalinowski, I've pushed a change to add the --expose-prometheus-metrics
flag to toggle exposing prometheus metrics.
Currently the default isn't shipping statsd metrics? A default flag is set for statsd-address
, but unless the flag is explicitly passed in, IsSet("statsd-address")
will return false, and the SetupStatsd()
method won't be called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed IsSet() returned true for defaults as well.
…ggle exposing prometheus metrics
No description provided.