Hello, I'm using 1.36.0 of the apm java agent against 7.17.9 apm server.
My app has manually instrumented code that I want to integrate with the apm traces.
Previously when using opentracing, I did this via just making a new ElasticApmTracer and it all worked.
Now I am using OpenTelemetry, everything seems to have gone very wrong! Even if in my instrumentation I use a noop tracer, it somehow seems to interfere with the apm agents traces, and has the consequence that while all the spans get reported same as they use to, nothing gets properly linked up as a transaction. I assume my noop tracer is somehow messing up apm spans.
I've looked through GitHub - elastic/apm-agent-java: Elastic APM Java Agent and really can't work out how to get a valid OpenTelemetry instance.
I see ElasticOpenTelemetry.java, but it requires a co.elastic.apm.agent.impl.ElasticApmTracer which is internal and in any case looks tricky to instantiate.
I see also GlobalOpenTelemetryInstrumentation.GlobalOpenTelemetryAdvice.ELASTIC_OPEN_TELEMETRY which returns an OpenTelemetry for me, and does look like the right sort of thing, but it's in apm-opentelemetry-plugin which sounds like a wrong thing for my library code to depend on, and I can't find any reference to ELASTIC_OPEN_TELEMETRY in documentation so I'm not sure I'm supposed to use it.
Based on OpenTelemetry bridge | APM Java Agent Reference [1.x] | Elastic I tried just doing GlobalOpenTelemetry.get(), but it didn't work either.
What is the correct way to obtain an OpenTelemetry instance I can use to integrate with elastic apm agent? I need an OpenTelemetry instance specifically because my code is polymorphic across lots of different tracing implementations.
I'd actually be happy at present just if the apm traces would work even ignoring my manual instrumentation, I find this behaviour with the nooptracer from opentelemetry messing up apm transactions very surprising.
My code using 1.22.0 dependencies of opentelemetry, maybe a conflict with 1.0.0 opentelemetry is to blame for all this strange behaviour... bit hard to image.
I don't open or close any scopes so I really can't see how the nooptracer is interact with apm tracing