-
Notifications
You must be signed in to change notification settings - Fork 306
Add JMXFetch support for GraalVM Native #8569
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
Changes from all commits
76b4106
e3c1006
fe07e3f
0731f76
648a939
8ff5951
5d06a2f
03e3c12
2329be9
4b438da
5b25cb4
a61b6b1
9d0f210
55b6ee3
c56773b
0bde9b0
7364f8c
80bed74
8348240
2a1b752
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package datadog.trace.instrumentation.graal.nativeimage; | ||
|
||
import com.oracle.svm.core.annotate.Substitute; | ||
import com.oracle.svm.core.annotate.TargetClass; | ||
|
||
@TargetClass(className = "org.datadog.jmxfetch.App") | ||
public final class Target_org_datadog_jmxfetch_App { | ||
@Substitute | ||
private boolean getJsonConfigs() { | ||
// This method has a reference to the excluded transitive dependency jackson-jr-objects. | ||
// GraalVM Native detects it during the reachability analysis and results in | ||
// "Discovered unresolved method during parsing: | ||
// org.datadog.jmxfetch.App.<init>(org.datadog.jmxfetch.AppConfig)." | ||
// because of the missing classes that belong to the excluded dependencies. | ||
throw new IllegalStateException("Unreachable"); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package datadog.trace.instrumentation.graal.nativeimage; | ||
|
||
import com.oracle.svm.core.annotate.Substitute; | ||
import com.oracle.svm.core.annotate.TargetClass; | ||
import java.io.IOException; | ||
|
||
@TargetClass(className = "org.datadog.jmxfetch.Status") | ||
public final class Target_org_datadog_jmxfetch_Status { | ||
ygree marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@Substitute | ||
private String generateJson() throws IOException { | ||
// This method has a reference to the excluded transitive dependency jackson-jr-objects. | ||
// GraalVM Native detects it during the reachability analysis and results in | ||
// "Discovered unresolved type during parsing: com.fasterxml.jackson.jr.ob.JSON." | ||
// because of the missing classes that belong to the excluded dependencies. | ||
throw new IllegalStateException("Unreachable"); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package datadog.trace.instrumentation.graal.nativeimage; | ||
|
||
import com.oracle.svm.core.annotate.Substitute; | ||
import com.oracle.svm.core.annotate.TargetClass; | ||
|
||
@TargetClass(className = "org.datadog.jmxfetch.reporter.JsonReporter") | ||
public final class Target_org_datadog_jmxfetch_reporter_JsonReporter { | ||
ygree marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@Substitute | ||
public void doSendServiceCheck( | ||
String serviceCheckName, String status, String message, String[] tags) { | ||
// This method has a reference to the excluded transitive dependency jackson-jr-objects. | ||
// GraalVM Native detects it during the reachability analysis and results in | ||
// "Discovered unresolved type during parsing: com.fasterxml.jackson.jr.ob.JSON." | ||
// because of the missing classes that belong to the excluded dependencies. | ||
throw new IllegalStateException("Unreachable"); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ if (hasProperty('agentPath')) { | |
if (withProfiler && property('profiler') == 'true') { | ||
buildArgs.add("-J-Ddd.profiling.enabled=true") | ||
} | ||
buildArgs.add("--enable-monitoring=jmxserver") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if we try to enable JMXFetch in the native-image without adding this setting? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, it shouldn't be necessary - it'll work without it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll remove it in #8790 |
||
} | ||
} | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.