-
Notifications
You must be signed in to change notification settings - Fork 36
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
base: main
Are you sure you want to change the base?
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.
44cc8a8
to
bd108b5
Compare
bd108b5
to
a9b0275
Compare
I tweaked the configuration definition, looks good so far. Patiently waiting for CE |
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?