Best way to add in custom monitoring metrics for workflow scenario

New to Prometheus but have used various monitoring tools in the past, so trying to figure the right way to do something here. We’ve got a vendor supplied app, which exposes some useful metrics via JMX, via calling a method with the time range of interest (e.g. for the last minute), which then returns an array of workflow tasks and their performance metrics i.e. how many messages waiting on each task, thruput of task, wait time etc.

Looking at things like JMX exporter, I don’t see them being able to call JMX remote methods and handle array type returns.

So, I’ve written a small new Java app that connects to this JMX source, and is grabbing all the data of interest, right now dropping out a CSV each minute like:

workflowTaskName, messagesWaiting, waitTime, processingTime
fileConsumer,100,455.4, 23.4
and so on

Initially I’d thought I could pump this data to push gateway, but that doesn’t sound like the correct fit?

Should I instead adopt the approach of instrumenting this Java app along the lines of GitHub - prometheus/client_java: Prometheus instrumentation library for JVM applications examples, and then be publishing a lot of gauges every minute so from previous CSV example,
and so on?

Or some better approach?
Many thanks!