-
I have noticed that after agent injection, the time consumption increases for a certain method, which dynamically generates anonymous classes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Agent needs to inspect all loaded classes to determine whether they need to be transformed, this can be expensive when you create a lot of class loaders (specially when you are running an old version as we have improved this in the last year). To ignore classes you can use https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java SPI in an agent extension. If you are creating a lot of class loaders then try |
Beta Was this translation helpful? Give feedback.
Agent needs to inspect all loaded classes to determine whether they need to be transformed, this can be expensive when you create a lot of class loaders (specially when you are running an old version as we have improved this in the last year). To ignore classes you can use https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesConfigurer.java SPI in an agent extension. If you are creating a lot of class loaders then try
opentelemetry-java-instrumentation/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/extension/ignore/IgnoredTypesBuilder.java
Line 56 in