Hi, we are trying to implement a custom OpenTelemetry integration for ACU COBOL software.
We want to sent traces and metrics to a Spunk Observability instance and visualize the data on APM.
We already know there is no OpenTelemetry SDK for COBOL, so we are exploring the following options.
For anyone experienced in developing custom OTel integrations:
How would you proceed to get started over those implementations?
Can we contact you to talk about this?
Hey javier — your breakdown is solid, and you've landed on the right primary path. Option 1 (the C++ wrapper) is the one that actually gets you COBOL-level visibility in APM, because it's the only approach that creates spans from inside the ACUCOBOL runtime. Option 2 is real but complementary — the Java agent only sees the JVM boundary, so it captures a Java tier and its DB calls, not what's happening inside your COBOL programs. I'd build Option 1 and treat Option 2 as a bonus if you already have a Java front end.
A few things I'd lock in before writing much code:
One correction on the interop: CALL "C$SYSTEM" runs an OS command — it's not the hook for invoking your wrapper. What you want is ACUCOBOL-GT's C subroutine interface: expose your functions with a C ABI (extern "C" so the names aren't C++-mangled), make them callable from the runtime, then CALL "start_span" etc. from COBOL. The "Interoperating with C" section of the AcuCOBOL-GT (OpenText/Micro Focus) docs covers the linkage and parameter passing.
The gotcha that bites people: the batch span processor buffers, so on a short-lived batch run you'll lose spans unless you explicitly flush/shut down the tracer provider at program exit. Init the provider once per runtime process and shut it down cleanly on the way out. And don't span every paragraph if volume is high — instrument at meaningful boundaries (program entry/exit, transactions, DB calls) or you'll drown in overhead and cardinality.
How I'd actually get started, smallest provable steps first:
On Option 2: if any COBOL is already fronted by Java (web services, Acu4GL through a JVM), attaching the Splunk Java agent there is basically free APM for that tier and its JDBC calls. Just note APM only sees the DB dependency if the driver runs inside that instrumented JVM — if Acu4GL talks to the database natively from the COBOL runtime, the Java agent won't see it, so that visibility still has to come from your Option 1 spans.
Happy to keep going on the thread — better to keep it public so it helps the next person who tries this. For real-time back-and-forth there's the Splunk community #observability Slack, and for a production COBOL rollout it's worth looping in Splunk PS or a partner SE.
Docs:
What does the COBOL runtime look like — standalone batch, or fronted by a service tier? That changes whether you need traceparent propagation from day one.