Hi,

Currently in MSF4J, the Carbon Metrics is lazily initialized when a service
method with a Metrics Annotation [1] is invoked.

However the Carbon Metrics also registers some JVM metrics (heap usages,
thread counts, cpu load etc). These metrics will be available only after
initialization. I think these JVM metrics are useful to the user even if
they are not using any Metrics annotations.

I also think we should let user to define their own Metrics and let them
use the MetricService directly. Even now they can use it, but it's only
initialized when it's used for the first time.

I think we should initialize the Metrics at MSF4J startup. So, if a user
added MSF4J Analytics dependency, we can initialize Metrics. For this, we
also need a way to register some callback function, which will be called
during MSF4J startup.

WDYT?

[1] https://github.com/wso2/msf4j#metrics-annotations

-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 <https://www.google.com/+IsuruPereraWSO2/about>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to