GitHub user pjfanning edited a discussion: Add hooks so that metrics tools can generate metrics on key events
One of the reasons to open this discussion is that there are a few ways to do this and it would be good to debate some of the approaches. Ideally, we would have a solution that has low performance head and close to zero overhead if no metrics tools are in use. https://github.com/apache/pekko/issues/1484 will probably be implemented in Pekko 1.1.2 to get the Kamon metrics tool to work with Pekko again. It is likely preferable in future Pekko versions to have an endorsed way to gather the metrics so that we can avoid breaking the metrics tools when we make changes to the Pekko internals. Kamon is basically instrumenting the Pekko code at runtime and is depending on some private functions and if these change name, param signature or get inlined, the Kamon instrumentation will stop working. To summarise the Pekko 1.1 situation. * Pekko 1.1 build enabled Scala 2 compiler inlining * This means that functions marked as final or functions in classes marked as final - or functions explicitly annotated with `@inline` annotation can be inlined by the Scala compiler * This broke some [Kamon](https://github.com/kamon-io/Kamon) and [micrometer-pekko](https://github.com/pjfanning/micrometer-pekko) functionality that relied on [AOP](https://www.baeldung.com/aspectj) or similar approaches to instrument named functions in Pekko code. * The aim for Pekko 1.1.2 is to add some `@noinline` annotations to force some functions not to be inlined. Nothing was inlined in Pekko 1.0. If you find `@noinline` annotations in Pekko code, this is likely to be the reason. * Hopefully, we will find a better way to support metrics introspection in Pekko 1.2/2.0 - the point of this discussion. GitHub link: https://github.com/apache/pekko/discussions/1487 ---- This is an automatically sent email for notifications@pekko.apache.org. To unsubscribe, please send an email to: notifications-unsubscr...@pekko.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org