File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed
ide-common/src/main/kotlin/org/digma/intellij/plugin/common
jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/execution Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import com.intellij.openapi.wm.IdeFocusManager
77
88fun findActiveProject (): Project ? {
99
10- // best effort to find aa active project
10+ // best effort to find an active project
1111
1212 var project = ProjectUtil .getActiveProject()
1313 if (project == null || ! isProjectValid(project)) {
Original file line number Diff line number Diff line change @@ -48,27 +48,23 @@ open class JavaToolOptionsBuilder(
4848 throw JavaToolOptionsBuilderException (" useAgent is true but can't find agent or extension paths" )
4949 }
5050
51- if (isExtendedObservabilityConfigured()) {
52-
53- if (! otelAgentPathProvider.hasDigmaAgentPath()) {
54- throw JavaToolOptionsBuilderException (" can't find digma-agent path" )
55- }
56-
57- javaToolOptions
58- .append(" -javaagent:${otelAgentPathProvider.digmaAgentPath} " )
59- .append(" " )
60-
61- withDigmaAgentDebug()
51+ if (! otelAgentPathProvider.hasDigmaAgentPath()) {
52+ throw JavaToolOptionsBuilderException (" can't find digma-agent path" )
53+ }
6254
55+ // digma agent must be before otel agent in the command line
56+ javaToolOptions
57+ .append(" -javaagent:${otelAgentPathProvider.digmaAgentPath} " )
58+ .append(" " )
6359
64- }
6560
6661 javaToolOptions
6762 .append(" -javaagent:${otelAgentPathProvider.otelAgentPath} " )
6863 .append(" " )
6964 .append(" -Dotel.javaagent.extensions=${otelAgentPathProvider.digmaExtensionPath} " )
7065 .append(" " )
7166
67+ withDigmaAgentDebug()
7268 withOtelTracesExporterOtlpEndpoint()
7369 }
7470
@@ -326,7 +322,7 @@ open class JavaToolOptionsBuilder(
326322
327323 @Suppress(" MemberVisibilityCanBePrivate" )
328324 fun isExtendedObservabilityConfigured (): Boolean {
329- return ! SettingsState .getInstance().extendedObservability.isNullOrBlank()
325+ return SettingsState .getInstance().extendedObservability.isNullOrBlank(). not ()
330326 }
331327
332328}
You can’t perform that action at this time.
0 commit comments