I stuck in monitoring logs, can someone help me please, I'm using OpenTelemetry Java Agent with a Spring Boot application. I think it is because I am trying to attach the agent with RuntimeAttach.attachJavaagentToCurrentJvm(); that is not working on Cloud foundry, this is the right dependency to build an agent for running in CF?
<dependency>
<groupId>co.elastic.otel</groupId>
<artifactId>elastic-otel-javaagent</artifactId>
<version>1.4.1</version>
</dependency>
In my local development environment, everything works as expected: traces are collected and I can see full details in the APM. However, when running the same application with the same OTEL parameters (
OTEL_EXPORTER_OTLP_HEADERS=my header
OTEL_EXPORTER_OTLP_ENDPOINT=my endpoint
OTEL_SERVICE_NAME=my service name
OTEL_RESOURCE_ATTRIBUTES=service.environment=test)
inside a CI/CD pipeline (Azure), could not create trace and trace is incomplete (just shows conrtroller URL) , and instead an error in elastic:
at io.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter.Instrumenter.doEnd(Instrumenter.java:273) at io.opentelemetry.javaagent.shaded.instrumentation.api.instrumenter.Instrumenter.end(Instrumenter.java:151) at io.opentelemetry.javaagent.instrumentation.tomcat.common.TomcatHelper.end(TomcatHelper.java:53) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:426) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:398) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1740) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1189) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:658) at