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

Measure metrics using otel4s #396

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Measure metrics using otel4s #396

wants to merge 27 commits into from

Conversation

iRevive
Copy link
Contributor

@iRevive iRevive commented Jun 9, 2022

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

The tests are green locally.

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

This is super cool. I have some bad feelings about the incs and decs and >> and how they play with cancellation.

build.sbt Outdated Show resolved Hide resolved
# Conflicts:
#	core/src/main/scala/org/typelevel/keypool/KeyPool.scala
#	core/src/main/scala/org/typelevel/keypool/KeyPoolBuilder.scala
# Conflicts:
#	build.sbt
#	core/src/main/scala/org/typelevel/keypool/KeyPool.scala
#	core/src/main/scala/org/typelevel/keypool/KeyPoolBuilder.scala
# Conflicts:
#	build.sbt
#	core/shared/src/test/scala/org/typelevel/keypool/KeyPoolSpec.scala
@iRevive iRevive changed the title WIP: Measure metrics using otel4s Draft: Measure metrics using otel4s Jul 3, 2022
build.sbt Outdated Show resolved Hide resolved
build.sbt Outdated Show resolved Hide resolved
@Fristi
Copy link

Fristi commented Dec 30, 2022

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.

@armanbilge
Copy link
Member

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.

@Fristi
Copy link

Fristi commented Dec 30, 2022

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

# Conflicts:
#	.github/workflows/ci.yml
#	build.sbt
# Conflicts:
#	.github/workflows/ci.yml
#	build.sbt
#	core/shared/src/main/scala/org/typelevel/keypool/KeyPool.scala
@iRevive iRevive marked this pull request as ready for review April 16, 2024 18:00
@iRevive iRevive changed the title Draft: Measure metrics using otel4s Measure metrics using otel4s Apr 16, 2024
@iRevive
Copy link
Contributor Author

iRevive commented Apr 16, 2024

The PR is ready to be reviewed.

@iRevive
Copy link
Contributor Author

iRevive commented Apr 16, 2024

@danicheg could you please take a look?

@iRevive
Copy link
Contributor Author

iRevive commented Apr 16, 2024

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.

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.

None yet

4 participants