akka/akka-core

MetricsCollector.apply() does not report exceptions from custom collector creation

Open

#27,673 opened on Sep 10, 2019

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Scala (3,547 forks)batch import
1 - triagedhelp wanted

Repository metrics

Stars
 (13,277 stars)
PR merge metrics
 (Avg merge 8d 19h) (10 merged PRs in 30d)

Description

When custom collector class is specified and fallback collector is allowed, MetricsCollector.apply() attempts to instantiate it in a TryNative. If it fails, it simply instatiates the fallback collector without reporting the problem. It should log the exception with stack trace.

We've discovered by accident that some of our non-critical metrics were not collected because of this --- without any indication in the logs.

Contributor guide