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

Merged

Conversation

Projects
None yet
3 participants
@ChristopherDavenport
Copy link
Member

commented Jan 22, 2019

Fixes #2367

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

@rossabaker
Copy link
Member

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 {

This comment has been minimized.

Copy link
@rossabaker

rossabaker Jan 24, 2019

Member

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

Test failure is resolved

@rossabaker
Copy link
Member

left a comment

I like @aeons' suggestion. 👍 after that.

Update to use F directly
Co-Authored-By: ChristopherDavenport <chris@christopherdavenport.tech>

@aeons aeons merged commit 3ead64c into http4s:master Feb 4, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.