APM Server version :
8.15.2
APM Agent language and version :
java 1.52.0
DEBUG
elastic-apm.log
2024-10-09 14:50:44,756 [main] DEBUG co.elastic.apm.agent.util.ExecutorUtils - A new thread named `elastic-apm-configuration-reloader` was created. The original context class loader of this thread (jdk.internal.loader.ClassLoaders$AppClassLoader@4e0e2f2a) has been overridden
2024-10-09 14:50:44,819 [main] DEBUG co.elastic.apm.agent.util.ExecutorUtils - A new thread named `elastic-apm-metadata-0` was created. The original context class loader of this thread (jdk.internal.loader.ClassLoaders$AppClassLoader@4e0e2f2a) has been overridden
2024-10-09 14:50:44,822 [main] DEBUG co.elastic.apm.agent.util.ExecutorUtils - A new thread named `elastic-apm-metadata-1` was created. The original context class loader of this thread (jdk.internal.loader.ClassLoaders$AppClassLoader@4e0e2f2a) has been overridden
2024-10-09 14:50:44,838 [elastic-apm-metadata-1] DEBUG co.elastic.apm.agent.util.ExecutorUtils - A new thread named `elastic-apm-cloud-metadata-0` was created. The original context class loader of this thread (ShadedClassLoader{parent=ShadedClassLoader{parent=jdk.internal.loader.ClassLoaders$PlatformClassLoader@5427c60c, customPrefix='cached-lookup-key/', manifest=java.util.jar.Manifest@f3af8319, jarUrl=file:/home/bob/elastic/elastic-apm-agent-1.52.0.jar}, customPrefix='agent/', manifest=java.util.jar.Manifest@f3af8319, jarUrl=file:/home/bob/elastic/elastic-apm-agent-1.52.0.jar}) has been overridden
2024-10-09 14:50:44,841 [elastic-apm-metadata-1] DEBUG co.elastic.apm.agent.util.ExecutorUtils - A new thread named `elastic-apm-cloud-metadata-1` was created. The original context class loader of this thread (ShadedClassLoader{parent=ShadedClassLoader{parent=jdk.internal.loader.ClassLoaders$PlatformClassLoader@5427c60c, customPrefix='cached-lookup-key/', manifest=java.util.jar.Manifest@f3af8319, jarUrl=file:/home/bob/elastic/elastic-apm-agent-1.52.0.jar}, customPrefix='agent/', manifest=java.util.jar.Manifest@f3af8319, jarUrl=file:/home/bob/elastic/elastic-apm-agent-1.52.0.jar}) has been overridden
2024-10-09 14:50:44,845 [elastic-apm-metadata-1] DEBUG co.elastic.apm.agent.util.UrlConnectionUtils - Opening http://169.254.169.254/metadata/instance/compute?api-version=2019-08-15 without proxy
2024-10-09 14:50:44,860 [elastic-apm-cloud-metadata-1] DEBUG co.elastic.apm.agent.util.UrlConnectionUtils - Opening http://metadata.google.internal/computeMetadata/v1/?recursive=true without proxy
2024-10-09 14:50:44,862 [elastic-apm-cloud-metadata-0] DEBUG co.elastic.apm.agent.util.UrlConnectionUtils - Opening http://169.254.169.254/latest/api/token without proxy
2024-10-09 14:50:44,889 [elastic-apm-cloud-metadata-0] DEBUG co.elastic.apm.agent.util.UrlConnectionUtils - Opening http://169.254.169.254/latest/dynamic/instance-identity/document without proxy
2024-10-09 14:50:44,894 [elastic-apm-metadata-1] DEBUG co.elastic.apm.agent.impl.metadata.CloudMetadataProvider - cloud_provider configured AUTO, no cloud metadata discovered
This file has been truncated. show original
TRACE
elastic-apm-trace.log
2024-10-09 15:30:19,050 [main] DEBUG co.elastic.apm.agent.util.ExecutorUtils - A new thread named `elastic-apm-configuration-reloader` was created. The original context class loader of this thread (jdk.internal.loader.ClassLoaders$AppClassLoader@4e0e2f2a) has been overridden
2024-10-09 15:30:19,057 [main] TRACE co.elastic.apm.agent.util.ExecutorUtils - Stack trace related to thread creation:
java.lang.Throwable: null
at co.elastic.apm.agent.util.ExecutorUtils.logThreadCreation(ExecutorUtils.java:141) [elastic-apm-agent-1.52.0.jar:1.52.0]
at co.elastic.apm.agent.util.ExecutorUtils$SingleNamedThreadFactory.newThread(ExecutorUtils.java:130) [elastic-apm-agent-1.52.0.jar:1.52.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.<init>(ThreadPoolExecutor.java:637) [?:?]
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:928) [?:?]
at java.util.concurrent.ThreadPoolExecutor.ensurePrestart(ThreadPoolExecutor.java:1609) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:346) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate(ScheduledThreadPoolExecutor.java:632) [?:?]
This file has been truncated. show original
elastic-apm.log
There are no transactions. you should still see the service listed in the UI and be able to see the metrics, but I think you are saying you don't see transactions. Either you are not executing any requests, or your requests do not exercise any of the tech that are automatically instrumented
Thank you.
Yes. We have GitHub - replay-framework/replay: Fork of the Play1 Framework
How can I start/finish transactions manually?
play is not a tech that is supported. You have a number of options to kick off transactions
Use trace_methods to configure specific methods to start tracing
Add the @CaptureTransaction or similar to your code to start tracing
Add manual transactions into the code using the OpenTelemetry APIs
Add manual transactions into the code using the agent APIs
Thank you again.
Now I have started transactions manually and I see only transaction and SQL queries as spans under transactions.
But I want to see all method calls as spans, to analyze where time is going. Should I also create those method spans manually? That is not the way I imagined APM.
APM instruments known commonly used tech, not everything in an app - instrumenting everything would cause unacceptable overhead, and is the domain of profiling. APM is not profiling. You want APM to magically know which methods to show and which to ignore (because there are a LOT of methods executing).
Fortunately for you, Elastic pioneered implementing exactly that magic. You want our inferred spans .