Peer metrics reporting and the callback System Property


#1

It appears that when the first time the Datomic library is called it will check the datomic.metricsCallback property. The examples suggest setting it at startup with -Ddatomic.metricsCallback=callback however we are currently setting it early at runtime. This is fine in production but causes issues in testing, where our callback may not yet be installed so a null is retrieved and no further metrics will be reported.

Is there a way to force Datomic to reload this property?

edit I forgot to mention, we are using datomic-pro:0.9.5561.50 which is not the latest version.


#2

The resolution of the callback target can (as you’ve determined) be dependent on class loading orders. Dependency load order can depend on many factors, including those out of our control (transient library deps for example), and so shouldn’t be relied on for semantic behavior. Per our documentation we have only documented setting this peer system property at the command line.


#3

Thanks for the reply! We’ve switched to setting the callback handler property in the command line.