Skip to content

Commit

Permalink
Mark some default services as off during native-image build (avoids C…
Browse files Browse the repository at this point in the history
…NFE shutting down the generated image)
  • Loading branch information
mcculls committed Oct 21, 2023
1 parent fcb4d04 commit 67498f2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ public static void start(final Instrumentation inst, final URL agentJarURL, Stri
createAgentClassloader(agentJarURL);

if (Platform.isNativeImageBuilder()) {
// these default services are not used during native-image builds
jmxFetchEnabled = false;
remoteConfigEnabled = false;
telemetryEnabled = false;
// apply trace instrumentation, but skip starting other services
startDatadogAgent(inst);
StaticEventLogger.end("Agent.start");
return;
}

Expand Down

0 comments on commit 67498f2

Please sign in to comment.