Introducing: Splunk App for Corda. Enhanced Visibility Into Your R3 Corda Blockchain Network

Jayson Jacobs
Splunk DLT
Published in
4 min readJun 10, 2021

How do you know that your blockchain infrastructure and applications are running smoothly? You monitor them, right? What if you’re using Corda? Over my last year of using Corda, I have not found a holistic solution for monitoring Corda nodes, networks, and applications — so I built it.

Splunk App for Corda works to identify and address the pain points of running and developing on a Corda network (both Enterprise and Open Source). With this app — you can see the health of your deployments, throughput of your CorDapps, and even get trace-level metrics from the underlying databases.

You may be wondering how the app makes sense of and extracts value from the default text logs that come out of the Corda node. The answer is that it doesn’t. Instead, using a custom log4j2 config, the node is told to log in JSON. In addition, there is a pattern to log arbitrary, structured data from CorDapps by using log4j2’s ThreadContext. When sent to Splunk, the result is similar to the below screenshot.

Pretty awesome, right!?

As if that wasn’t enough — by plugging in the Prometheus JMX Agent & Open Telemetry Agent into Corda’s JVM (in conjunction with the Open Telemetry Collector) I was able to pull out Corda’s JMX metrics and gather trace data, respectively.

Building on that foundation, this app changes the game when it comes to monitoring and observing your Corda environment. Now, using the Splunk App for Corda, you can see all of the important logs, metrics, and traces from your entire deployment in one place.

In the Analytics Workspace, you’ll see all of the metrics from the Corda node. You will be able to view metrics like P2P send latency, active threads, and flows in flight directly from the node for any time period. Optionally, you can also send in similar metrics from your host environment. This can help you identify environmental issues, like too much load on a shared CPU, or low disk space, versus logic inefficiencies in your CorDapps.

And of course, you can use all of this data in the app’s pre-built dashboards, or build your own.

Flow analysis — no problem! Use this in conjunction with the rich logging pattern through ThreadContext and pull in all of the relevant data for any flow or transaction in one place.

Flow Analysis Dashboard

Whether you’re using the built-in H2 database for dev, or you’re using a SQL database in production, we’ve got you covered with tracing-level metrics. Right away, you’ll be able to see the breakdown of database queries the Corda node is executing.

Database Tracing Dashboard

If you’re looking to try it for yourself, the GitHub repo has everything needed to get you started. In the examples/docker directory, you’ll find the quickest way to get up and running. The start.sh script will bootstrap a network of a few Corda OS nodes, compile a sample CorDapp, start up the environment, and send all of the data to a local Splunk instance. Try it out and let us know what you think either in the comments or at blockchain@splunk.com.

--

--