-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch instrumentation #2550
Comments
So far, the only change I've made to the agent is as follows: diff --git a/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/logging/LoggerFactory.java b/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/logging/LoggerFactory.java
index c61257d21..4bcf2ee57 100644
--- a/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/logging/LoggerFactory.java
+++ b/apm-agent-plugin-sdk/src/main/java/co/elastic/apm/agent/sdk/logging/LoggerFactory.java
@@ -18,6 +18,9 @@
*/
package co.elastic.apm.agent.sdk.logging;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
public class LoggerFactory {
private static volatile ILoggerFactory iLoggerFactory;
@@ -32,11 +35,16 @@ public class LoggerFactory {
* @param name The name of the logger.
* @return logger
*/
- public static Logger getLogger(String name) {
+ public static Logger getLogger(final String name) {
if (iLoggerFactory == null) {
return NoopLogger.INSTANCE;
}
- return iLoggerFactory.getLogger(name);
+ return AccessController.doPrivileged(new PrivilegedAction<Logger> () {
+ @Override
+ public Logger run() {
+ return iLoggerFactory.getLogger(name);
+ }
+ });
}
/** This may not ultimately be what we want to do, but I got me further. The problem with |
I've noticed that the May not be entirely in scope of this issue but having the ability to pull in all sources to that the agent can be debugged within a project that it's integrated in seems like an important capability. That's not only in the context of Elasticsearch but arguably specifically important there. |
I tried running a 3 node cluster in docker-compose, and noticed that the service map doesn't break down the cluster, which I think would be useful if one was in a degraded state. I set a different |
Regarding the spans that are created as transactions: all the parent-child relationships are created through the context propagator, as a consequence even the spans that are on the same node are considered to be remote. We should add a distinction between:
Given the parent/child relationship for inherited Also, with OTel (and also our internal agent API), the "currently active span" is the one that is picked as parent when another child span is created. Ideally, in the |
This issue groups all the tasks that are required to allow proper usage of APM agent within Elasticsearch itself.
java.lang.Throwable
when agent is loaded within ES, adding system module access to security policy fixed that.Relates to
The text was updated successfully, but these errors were encountered: