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

Prometheus Effect suspension #2370



Copy link

@ChristopherDavenport ChristopherDavenport commented Jan 22, 2019

Fixes #2367

Registration is not happening in an effect and can throw if it double registered for the same metric.

Copy link

@rossabaker rossabaker left a comment

Test failure is legit. It broke a tut.

Spirit of it looks good.

@@ -62,7 +62,7 @@ object Prometheus {
* * @param prefix a prefix that will be added to all metrics
def apply[F[_]](registry: CollectorRegistry, prefix: String = "org_http4s_server")(
implicit F: Sync[F]): MetricsOps[F] =
implicit F: Sync[F]): F[MetricsOps[F]] = Sync[F].delay {
Copy link

@rossabaker rossabaker Jan 24, 2019

Could just call F.delay here... it already has a name.

@rossabaker rossabaker dismissed their stale review Feb 3, 2019

Test failure is resolved

Copy link

@rossabaker rossabaker left a comment

I like @aeons' suggestion. 👍 after that.

Co-Authored-By: ChristopherDavenport <>
@aeons aeons merged commit 3ead64c into http4s:master Feb 4, 2019
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants