Replies: 5 comments 3 replies
-
For reference: |
Beta Was this translation helpful? Give feedback.
-
My elasticapm agent is reporting jvm metrics to Elastic APM, so it seems the agent is configured correctly and sending data. When looking the the logs of the agent I found
Even though I have added alle the opentelemetry depenendencies think is needed to micronaut
Even if I enable opentelemetry with https://www.elastic.co/guide/en/apm/agent/java/master/config-core.html#config-enable-instrumentations configuration it always say "not applying excluded instrumentation" Found this config https://www.elastic.co/guide/en/apm/agent/java/master/config-core.html#config-enable-experimental-instrumentations and tried it just to see if anything happens, and now found some new loglines in the agent log! Seems that it enabled the opentelemetry instrumentation!
Now got lots of this stuff in the agent log, but cant find anything in the Elastic APM where I hoped they should show up as transactions. Seems like the |
Beta Was this translation helpful? Give feedback.
-
This is a call to a micronaut controller endpoint without any special annotations, but also when adding |
Beta Was this translation helpful? Give feedback.
-
Changed Java agent from Elastic APM java agent to OpentTelemetry Java Agent and configured it like described on https://www.elastic.co/guide/en/apm/guide/current/open-telemetry.html worked on first try, but the drawback is that no more JVM metrics is reported from the agent. Unfortunately the agent throws the following warning, most probably you could try to get the instance from the agent and return instead.
|
Beta Was this translation helpful? Give feedback.
-
Just for info, I configured Micronaut 3.6.0 integrated open telemetry feature which run the opentelemetry-exporter in Micronaut.
and I configured the opentelemetry-exporter like the official otel docs describes by setting the environment variables to my application like below.
This sends OTEL transactions directly to Elastic APM without any agent and using both Otel Annotations and manual transactions to send traces to Elasti APM. I didnt get any stacktraces reported under errors and no JVM metrics is reported but otherwise requests to the controllers and methods annotated with WithSpan is reported without any workaround or extra code in Micronaut and without any running agents. |
Beta Was this translation helpful? Give feedback.
-
It seems like the Elastic APM java agent has a "OTEL bridge" feature but its a little bit complicated to understand what they mean by that. I have interpreted it like the Elastic APM java agent in addition to instrumenting and creating metrics from the JVM it also can instrument the otel-api and annotations. By using this you could get the best worlds of additional JVM instrumentation of the Elastic APM and also the micronaut tracing instrumentation.
It seems like there is at least three different approaches to integrate micronaut and Elastic APM.
This is my repo that I'm experimenting in https://github.com/nsbno/trafficinfo-baseline-micronaut
Beta Was this translation helpful? Give feedback.
All reactions