-
Notifications
You must be signed in to change notification settings - Fork 37
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 IORuntimeMetrics
#861
Add IORuntimeMetrics
#861
Conversation
@@ -89,7 +89,7 @@ object AutoConfigure { | |||
* @tparam A | |||
* the type of the component | |||
*/ | |||
abstract class WithHint[F[_]: MonadThrow, A]( | |||
abstract class WithHint[F[_]: MonadCancelThrow, A]( | |||
hint: String, | |||
configKeys: Set[Config.Key[_]] | |||
) extends AutoConfigure[F, A] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compiler can no longer lift an instance of ApplicativeError[Resource[F, *], Throwable]
. I assume it's caused by:
bb51631
to
44cc8a8
Compare
@armanbilge wanna take a look? |
def withComputeMetrics: Config | ||
def withoutComputeMetrics: Config | ||
def withComputeMetricsAttributes(attributes: Attributes): Config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config feels verbose. On the other hand, we can easily add support for new metrics (e.g., typelevel/cats-effect#4187) in a binary-compatible way.
bd108b5
to
a9b0275
Compare
I tweaked the configuration definition, looks good so far. Patiently waiting for CE |
a9b0275
to
ce0d0b5
Compare
ce0d0b5
to
1a94fd6
Compare
1a94fd6
to
0d17bda
Compare
This implementation utilizes typelevel/cats-effect#3317.
How to use:
A few things to discuss
1. The name
org.typelevel.otel4s.instrumentation.ce.IORuntimeMetrics
clashes with thecats.effect.unsafe.metrics.IORuntimeMetrics
2. Any alternatives to the
org.typelevel.otel4s.instrumentation.ce
package?Perhaps
org.typelevel.otel4s.instrumentation.catseffect
fits better?