Skip to content

Commit 840d2fb

Browse files
committed
force observability with DIGMA_OBSERVABILITY
1 parent 249447b commit 840d2fb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/execution/constants.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ to force a different instrumentation flavor add INSTRUMENTATION_FLAVOR environme
2424
org.digma.intellij.plugin.idea.execution.flavor.InstrumentationFlavorType.
2525
examples:
2626
if running a task called myTask that we don't support:
27-
DIGMA_OBSERVABILITY or DIGMA_OBSERVABILITY=app -> will be treated as regula application with the default flavor
28-
DIGMA_OBSERVABILITY=test -> will be treated as a test execution.
27+
DIGMA_OBSERVABILITY or DIGMA_OBSERVABILITY=app -> will be treated as regular application with the default flavor.
28+
DIGMA_OBSERVABILITY=test -> will be treated as a test execution with the default flavor.
2929
3030
together with
3131
DIGMA_OBSERVABILITY=test
3232
INSTRUMENTATION_FLAVOR=Quarkus
3333
will be treated as Quarkus flavor and a test execution.
34+
35+
don't add DIGMA_OBSERVABILITY if it's not necessary, it may confuse the instrumentation flavor.
36+
3437
*/
3538
const val DIGMA_OBSERVABILITY = "DIGMA_OBSERVABILITY"
3639

jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/execution/services/BaseJvmRunConfigurationInstrumentationService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ abstract class BaseJvmRunConfigurationInstrumentationService : RunConfigurationI
6767
?: return null
6868

6969
//if DIGMA_OBSERVABILITY exists force observability with InstrumentationFlavorType.Default.
70-
//no need to check if INSTRUMENTATION_FLAVOR exists, if it did InstrumentationFlavor.get would return something.
70+
//no need to check if INSTRUMENTATION_FLAVOR exists, if it existed InstrumentationFlavor.get would return something.
7171
//InstrumentationFlavor.getByType must return something, or we have a bug. it will throw an exception
7272
// if not. the exception will be caught and reported.
7373
instrumentationFlavor = InstrumentationFlavor.getByType(InstrumentationFlavorType.Default)

0 commit comments

Comments
 (0)