-
-
Notifications
You must be signed in to change notification settings - Fork 2
Add prometheus stats #16
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
Conversation
| addr = flag.String("prometheus-listen-address", ":8080", "The address to listen on for HTTP requests.") | ||
| ) | ||
|
|
||
| var ( |
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.
NIT: merge these 2 var sections.
internal/stats/main.go
Outdated
| ) | ||
|
|
||
| var ( | ||
| addr = flag.String("prometheus-listen-address", ":8080", "The address to listen on for HTTP requests.") |
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.
Should this come from a config or environment var, instead of the commandline?
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'd think a config, but this was the path of least resistance for this project since at the moment its all cli/flag based
| github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= | ||
| github.com/OneOfOne/xxhash v1.2.7 h1:fzrmmkskv067ZQbd9wERNGuxckWw67dyzoMG62p7LMo= | ||
| github.com/OneOfOne/xxhash v1.2.7/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= | ||
| github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= |
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.
WOW! This brings in a lot of dependencies!
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.
NIT: Also, consider running go mod tidy to clean up some of these. Ex, go-spew is still listed in this file.
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.
this actually is the output of go mod tidy. not sure where go-spew is coming from.
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.
yikes! Something else may be using it. it is pulling in go-kit and grpc. eithe one of those could have that as a dependency. go mod graph | grep go-spew would tell you what's using it.
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.
something seems to be using testify and logrus which have go-spew as dependencies
* origin/master: remove useless waitgroups in test
* origin/master: not every request is going to be a hit, so just check that some of them hit the cache
* origin/master: fix assertion logic
* origin/master: create new object for each connection
No description provided.