keypool icon indicating copy to clipboard operation
keypool copied to clipboard

Measure metrics using `otel4s`

Open iRevive opened this issue 3 years ago • 6 comments

Experimental integration with https://github.com/typelevel/otel4s.

The tests are green locally.

iRevive avatar Jun 09 '22 12:06 iRevive

Very nice PR! .. I see very useful for measuring acquire durations for skunk and ember http4s client connections. Would it also work for doobie ?

And would this work for prometheus as well ? I guess implementing the Meter for prometheus could work

What's needed to finish this one, maybe we can offer help.

Fristi avatar Dec 30 '22 14:12 Fristi

What's needed to finish this one, maybe we can offer help.

@Fristi We're still working towards a stable release of otel4s :) lots to do! https://github.com/typelevel/otel4s

Would it also work for doobie

Does doobie do its own pooling? I would have thought this happens in the underlying JDBC connectors.

armanbilge avatar Dec 30 '22 14:12 armanbilge

Hikari is being used .. but @ChristopherDavenport wrote doobie-pool which is also keyedpool https://github.com/ChristopherDavenport/doobie-pool/blob/master/core/src/main/scala/io/chrisdavenport/doobiepool/PooledTransactor.scala

Fristi avatar Dec 30 '22 16:12 Fristi

The PR is ready to be reviewed.

iRevive avatar Apr 16 '24 18:04 iRevive

@danicheg could you please take a look?

iRevive avatar Apr 16 '24 18:04 iRevive

The otel4s is still in active development. While I expect the future releases of the otel4s-core-metrics modules to be binary compatible, there can be breaking changes towards 1.0.

As an alternative, we can move forward only with the Metrics trait. And move keypool-otel4s to a standalone repository with its own release cycle.

iRevive avatar Apr 16 '24 18:04 iRevive