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

Add Prometheus middleware for gundeck, cannon, cargohold, brig, proxy #672

Merged
merged 13 commits into from
Mar 26, 2019

Conversation

ChrisPenner
Copy link
Contributor

@ChrisPenner ChrisPenner commented Mar 21, 2019

There are some test refactorings in here; feel free to read commit-by-commit.

I took the opportunity to try to standardize a few things across all services. Now all services have a consistent Run module with a separated middleware stack.

When adding tests I tried to stay mostly consistent with the project's style; so some of the tests may look different from others.

@ChrisPenner ChrisPenner changed the title Add Prometheus middleware for gundeck, cannon, cargohold, brig Add Prometheus middleware for gundeck, cannon, cargohold, brig, proxy Mar 21, 2019
@ChrisPenner ChrisPenner changed the base branch from develop to cp/prometheus-galley March 21, 2019 15:31
@ChrisPenner ChrisPenner force-pushed the cp/prometheus-middleware branch from cc8bc24 to 94fe8e7 Compare March 21, 2019 15:57
@ChrisPenner ChrisPenner changed the base branch from cp/prometheus-galley to develop March 25, 2019 11:27
services/gundeck/test/integration/Metrics.hs Outdated Show resolved Hide resolved
services/proxy/src/Proxy/Run.hs Show resolved Hide resolved
services/gundeck/test/integration/TestSetup.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@fisx fisx left a comment

Choose a reason for hiding this comment

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

i've made some comments, and it needs rebasing, otherwise 👍 !

libs/metrics-wai/src/Data/Metrics/Middleware/Prometheus.hs Outdated Show resolved Hide resolved
services/galley/src/Galley/Run.hs Outdated Show resolved Hide resolved
services/brig/package.yaml Show resolved Hide resolved
services/cargohold/test/integration/TestSetup.hs Outdated Show resolved Hide resolved
services/gundeck/test/integration/TestSetup.hs Outdated Show resolved Hide resolved
services/proxy/src/Proxy/Run.hs Show resolved Hide resolved
@ChrisPenner ChrisPenner force-pushed the cp/prometheus-middleware branch from 94fe8e7 to fcbb64e Compare March 25, 2019 14:03
@fisx
Copy link
Contributor

fisx commented Mar 25, 2019 via email

@fisx
Copy link
Contributor

fisx commented Mar 25, 2019

👍

@ChrisPenner
Copy link
Contributor Author

@fisx (re: explicit imports) I can definitely see that being a problem in certain cases; I like them because they shield the importer from all of your helper functions polluting the namespace; as well as being a cheap form of module documentation (you can quickly see what the purpose of the module is and what it contains. I'm open to following a standard if we have one; but it sounds like it's kinda wishy washy right now.

@fisx
Copy link
Contributor

fisx commented Mar 26, 2019

@fisx (re: explicit imports) I can definitely see that being a problem in certain cases; I like them because they shield the importer from all of your helper functions polluting the namespace; as well as being a cheap form of module documentation (you can quickly see what the purpose of the module is and what it contains. I'm open to following a standard if we have one; but it sounds like it's kinda wishy washy right now.

I think I was talking about exported modules in package.yaml (even though my wording was poor). I agree in principle that explicit names exports in modules are good, but I prefer having an Internal module behind every restrictively exporting module that allows me to break the library interface and do whatever I want. Of course that also breaks ghc optimization, which is best if it has lots of module internals to optimize away entirely...

@ChrisPenner ChrisPenner merged commit 1be7003 into develop Mar 26, 2019
@ChrisPenner ChrisPenner deleted the cp/prometheus-middleware branch March 26, 2019 15:50
@ChrisPenner ChrisPenner mentioned this pull request Apr 9, 2019
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