JMX Metrics and New Relic

强颜欢笑 提交于 2020-01-03 05:04:38

问题


We have new relic’s agent to our configuration to get exposure and understand the configuration and capture of JMX metrics. Our CorDapp new shows up under our new relic account. However, the only metrics being captured and displayed are general and related to the JVM.

The only source file including the @MXBean annotation is HibernateStatistics.

I see under master that there is more details around metrics and monitoring.

I assume that the additional metric capture did not happen until after V3.1.

I am just looking to confirm that we are not overlooking something and metrics should actually for flows and transactions.


回答1:


In Corda 3.1, the only Corda-specific metrics exposed are:

  • The number of attachments (net.corda:name=Attachments)
  • The flow checkpointing rate (net.corda:type=Flows,name=Checkpointing Rate)
  • The number of started flows (net.corda:type=Flows,name=Started)
  • The number of in-flight flows (net.corda:type=Flows,name=InFlight)
  • The number of finished flows (net.corda:type=Flows,name=Finished)

Apache Artemis metrics are also exposed. The list of exposed metrics can be found here: https://docs.corda.net/node-administration.html#monitoring-your-node. As you note, future versions of Corda will expand this list of metrics.

The flow metrics are registered when the node's StateMachineManager is instantiated in StateMachineManagerImpl.kt, as follows:

// Monitoring support.
private val metrics = serviceHub.monitoringService.metrics

init {
    metrics.register("Flows.InFlight", Gauge<Int> { mutex.content.stateMachines.size })
}

private val checkpointingMeter = metrics.meter("Flows.Checkpointing Rate")
private val totalStartedFlows = metrics.counter("Flows.Started")
private val totalFinishedFlows = metrics.counter("Flows.Finished")


来源:https://stackoverflow.com/questions/51087910/jmx-metrics-and-new-relic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!