From da9e8512655d9b9f64178c8fe825942bfe46a1fb Mon Sep 17 00:00:00 2001 From: "Boslet, Cory (cb645j)" Date: Mon, 16 Dec 2024 14:40:52 -0500 Subject: [PATCH] Fix typos and compilation errors --- ...daCallableElementActivityBehaviorInstrumentation.java | 1 + .../behavior/CamundaCommonBehaviorInstrumentation.java | 2 ++ .../v7_0/behavior/CamundaCommonBehaviorModule.java | 2 +- .../camunda/v7_0/common/CamundaCommonRequest.java | 9 +++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCallableElementActivityBehaviorInstrumentation.java b/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCallableElementActivityBehaviorInstrumentation.java index 9b52cdd6a56f..7756fafd796f 100644 --- a/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCallableElementActivityBehaviorInstrumentation.java +++ b/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCallableElementActivityBehaviorInstrumentation.java @@ -71,6 +71,7 @@ public static void addTracingEnter( request.setProcessInstanceId(Optional.ofNullable(execution.getProcessInstanceId())); request.setActivityId(Optional.ofNullable(execution.getCurrentActivityId())); request.setActivityName(Optional.ofNullable(execution.getCurrentActivityName())); + request.setBusinessKey(Optional.ofNullable(execution.getProcessBusinessKey())); if (Java8BytecodeBridge.currentContext() == Java8BytecodeBridge.rootContext()) { // log diff --git a/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCommonBehaviorInstrumentation.java b/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCommonBehaviorInstrumentation.java index fd6967531ed5..1027dea97d3c 100644 --- a/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCommonBehaviorInstrumentation.java +++ b/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCommonBehaviorInstrumentation.java @@ -66,6 +66,7 @@ public static class CamundaCommonBehaviorAdvice { @Advice.OnMethodEnter(suppress = Throwable.class) public static void addTracingEnter( @Advice.Argument(0) ActivityExecution execution, + @Advice.This Object target, @Advice.Local("request") CamundaCommonRequest request, @Advice.Local("otelParentScope") Scope parentScope, @Advice.Local("otelContext") Context context, @@ -79,6 +80,7 @@ public static void addTracingEnter( request.setProcessDefinitionId(Optional.ofNullable(execution.getProcessDefinitionId())); request.setProcessInstanceId(Optional.ofNullable(execution.getProcessInstanceId())); request.setActivityId(Optional.ofNullable(execution.getCurrentActivityId())); + request.setBusinessKey(Optional.ofNullable(execution.getProcessBusinessKey())); name: { diff --git a/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCommonBehaviorModule.java b/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCommonBehaviorModule.java index 0ceca27f850b..aaed45e34f60 100644 --- a/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCommonBehaviorModule.java +++ b/instrumentation/camunda/camunda-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/camunda/v7_0/behavior/CamundaCommonBehaviorModule.java @@ -18,7 +18,7 @@ @AutoService(InstrumentationModule.class) public class CamundaCommonBehaviorModule extends InstrumentationModule { - public CamundaTaskActivityBehaviorModule() { + public CamundaCommonBehaviorModule() { super("camunda", "camunda-behavior", "camunda-behavior-7_18"); } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/common/CamundaCommonRequest.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/common/CamundaCommonRequest.java index 42b345f46e8b..e5265dd672fc 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/common/CamundaCommonRequest.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/common/CamundaCommonRequest.java @@ -12,6 +12,7 @@ public class CamundaCommonRequest { private Optional processDefinitionId = Optional.empty(); private Optional processDefinitionKey = Optional.empty(); private Optional processInstanceId = Optional.empty(); + private Optional businessKey = Optional.empty(); private Optional activityId = Optional.empty(); private Optional activityName = Optional.empty(); private Optional topicName = Optional.empty(); @@ -41,6 +42,14 @@ public void setProcessInstanceId(Optional processInstanceId) { this.processInstanceId = processInstanceId; } + public Optional getBusinessKey() { + return businessKey; + } + + public void setBusinessKey(Optional businessKey) { + this.businessKey = businessKey; + } + public Optional getActivityId() { return activityId; }