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) (#6079)
  • Loading branch information
mcculls committed Oct 24, 2023
1 parent 9a80d51 commit 7956126
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 7956126

Please sign in to comment.