diff --git a/instrumentation/camunda/camunda-7.0/library/build.gradle.kts b/instrumentation/camunda/camunda-7.0/library/build.gradle.kts index 2494f932a4f9..0b2c676dc081 100644 --- a/instrumentation/camunda/camunda-7.0/library/build.gradle.kts +++ b/instrumentation/camunda/camunda-7.0/library/build.gradle.kts @@ -3,11 +3,11 @@ plugins { } dependencies { - implementation("org.camunda.bpm:camunda-engine:7.18.0") - implementation("org.camunda.bpm:camunda-external-task-client:7.18.0") + implementation("org.camunda.bpm:camunda-engine:7.18.0") + implementation("org.camunda.bpm:camunda-external-task-client:7.18.0") - api("com.google.auto.value:auto-value-annotations:1.6") - annotationProcessor("com.google.auto.value:auto-value:1.6") + api("com.google.auto.value:auto-value-annotations:1.6") + annotationProcessor("com.google.auto.value:auto-value:1.6") } tasks.withType().configureEach { diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionGetter.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionGetter.java index 6a67a8e04e95..07215e0ec122 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionGetter.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionGetter.java @@ -1,20 +1,23 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.behavior; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; +package io.opentelemetry.instrumentation.camunda.v7_0.behavior; import io.opentelemetry.context.propagation.TextMapGetter; +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; public class CamundaActivityExecutionGetter implements TextMapGetter { - @Override - public Iterable keys(ActivityExecution carrier) { - return carrier.getVariableNames(); - } - - @Override - public String get(ActivityExecution carrier, String key) { - Object variable = carrier.getVariables().get(key); - return variable == null ? null : variable.toString(); - } + @Override + public Iterable keys(ActivityExecution carrier) { + return carrier.getVariableNames(); + } + @Override + public String get(ActivityExecution carrier, String key) { + Object variable = carrier.getVariables().get(key); + return variable == null ? null : variable.toString(); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionLocalSetter.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionLocalSetter.java index 8dd4148aa4bf..5b220abce7e4 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionLocalSetter.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionLocalSetter.java @@ -1,14 +1,17 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.behavior; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; +package io.opentelemetry.instrumentation.camunda.v7_0.behavior; import io.opentelemetry.context.propagation.TextMapSetter; +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; public class CamundaActivityExecutionLocalSetter implements TextMapSetter { - @Override - public void set(ActivityExecution carrier, String key, String value) { - carrier.setVariableLocal(key, value); - } - + @Override + public void set(ActivityExecution carrier, String key, String value) { + carrier.setVariableLocal(key, value); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionSetter.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionSetter.java index 6784d3711df2..075a7c7c991f 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionSetter.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaActivityExecutionSetter.java @@ -1,14 +1,17 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.behavior; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; +package io.opentelemetry.instrumentation.camunda.v7_0.behavior; import io.opentelemetry.context.propagation.TextMapSetter; +import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; public class CamundaActivityExecutionSetter implements TextMapSetter { - @Override - public void set(ActivityExecution carrier, String key, String value) { - carrier.setVariable(key, value); - } - + @Override + public void set(ActivityExecution carrier, String key, String value) { + carrier.setVariable(key, value); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaBehaviorSpanNameExtractor.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaBehaviorSpanNameExtractor.java index d01e2d4c236c..00a5beb8f5e7 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaBehaviorSpanNameExtractor.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaBehaviorSpanNameExtractor.java @@ -1,24 +1,24 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.behavior; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import java.util.Arrays; +package io.opentelemetry.instrumentation.camunda.v7_0.behavior; import io.opentelemetry.camunda.v7_0.common.CamundaCommonRequest; - import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor; +import java.util.Arrays; public class CamundaBehaviorSpanNameExtractor implements SpanNameExtractor { - @Override - public String extract(CamundaCommonRequest request) { - String[] eventTypes = { "Start", "End" }; - String type = "Task"; - if (request.getActivityName().isPresent() - && Arrays.stream(eventTypes).anyMatch(request.getActivityName().get()::equals)) { - type = "Event"; - - } - return String.format("%s %s", request.getActivityName().orElse("Plugin"), type); - - } - + @Override + public String extract(CamundaCommonRequest request) { + String[] eventTypes = {"Start", "End"}; + String type = "Task"; + if (request.getActivityName().isPresent() + && Arrays.stream(eventTypes).anyMatch(request.getActivityName().get()::equals)) { + type = "Event"; + } + return String.format("%s %s", request.getActivityName().orElse("Plugin"), type); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaVariableMapSetter.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaVariableMapSetter.java index 87fc1472baa3..838dcf9f13f3 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaVariableMapSetter.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/behavior/CamundaVariableMapSetter.java @@ -1,14 +1,17 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.behavior; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import org.camunda.bpm.engine.variable.VariableMap; +package io.opentelemetry.instrumentation.camunda.v7_0.behavior; import io.opentelemetry.context.propagation.TextMapSetter; +import org.camunda.bpm.engine.variable.VariableMap; public class CamundaVariableMapSetter implements TextMapSetter { - @Override - public void set(VariableMap carrier, String key, String value) { - carrier.put(key, value); - } - + @Override + public void set(VariableMap carrier, String key, String value) { + carrier.put(key, value); + } } 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 154de1c49343..42b345f46e8b 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 @@ -1,72 +1,75 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + package io.opentelemetry.instrumentation.camunda.v7_0.common; import java.util.Optional; public class CamundaCommonRequest { - private Optional processDefinitionId = Optional.empty(); - private Optional processDefinitionKey = Optional.empty(); - private Optional processInstanceId = Optional.empty(); - private Optional activityId = Optional.empty(); - private Optional activityName = Optional.empty(); - private Optional topicName = Optional.empty(); - private Optional topicWorkerId = Optional.empty(); - - public Optional getProcessDefinitionId() { - return processDefinitionId; - } - - public void setProcessDefinitionId(Optional processDefinitionId) { - this.processDefinitionId = processDefinitionId; - } - - public Optional getProcessDefinitionKey() { - return processDefinitionKey; - } - - public void setProcessDefinitionKey(Optional processDefinitionKey) { - this.processDefinitionKey = processDefinitionKey; - } - - public Optional getProcessInstanceId() { - return processInstanceId; - } - - - public void setProcessInstanceId(Optional processInstanceId) { - this.processInstanceId = processInstanceId; - } - - public Optional getActivityId() { - return activityId; - } - - public void setActivityId(Optional activityId) { - this.activityId = activityId; - } - - public Optional getActivityName() { - return activityName; - } - - public void setActivityName(Optional activityName) { - this.activityName = activityName; - } - - public Optional getTopicName() { - return topicName; - } - - public void setTopicName(Optional topicName) { - this.topicName = topicName; - } - - public Optional getTopicWorkerId() { - return topicWorkerId; - } - - public void setTopicWorkerId(Optional topicWorkerId) { - this.topicWorkerId = topicWorkerId; - } - + private Optional processDefinitionId = Optional.empty(); + private Optional processDefinitionKey = Optional.empty(); + private Optional processInstanceId = Optional.empty(); + private Optional activityId = Optional.empty(); + private Optional activityName = Optional.empty(); + private Optional topicName = Optional.empty(); + private Optional topicWorkerId = Optional.empty(); + + public Optional getProcessDefinitionId() { + return processDefinitionId; + } + + public void setProcessDefinitionId(Optional processDefinitionId) { + this.processDefinitionId = processDefinitionId; + } + + public Optional getProcessDefinitionKey() { + return processDefinitionKey; + } + + public void setProcessDefinitionKey(Optional processDefinitionKey) { + this.processDefinitionKey = processDefinitionKey; + } + + public Optional getProcessInstanceId() { + return processInstanceId; + } + + public void setProcessInstanceId(Optional processInstanceId) { + this.processInstanceId = processInstanceId; + } + + public Optional getActivityId() { + return activityId; + } + + public void setActivityId(Optional activityId) { + this.activityId = activityId; + } + + public Optional getActivityName() { + return activityName; + } + + public void setActivityName(Optional activityName) { + this.activityName = activityName; + } + + public Optional getTopicName() { + return topicName; + } + + public void setTopicName(Optional topicName) { + this.topicName = topicName; + } + + public Optional getTopicWorkerId() { + return topicWorkerId; + } + + public void setTopicWorkerId(Optional topicWorkerId) { + this.topicWorkerId = topicWorkerId; + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/common/CamundaVariableAttributeExtractor.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/common/CamundaVariableAttributeExtractor.java index e8b30d79e933..441489999084 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/common/CamundaVariableAttributeExtractor.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/common/CamundaVariableAttributeExtractor.java @@ -1,28 +1,44 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + package io.opentelemetry.instrumentation.camunda.v7_0.common; import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.context.Context; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; -public class CamundaVariableAttributeExtractor implements AttributesExtractor { - - @Override - public void onStart(AttributesBuilder attributes, Context parentContext, CamundaCommonRequest request) { +public class CamundaVariableAttributeExtractor + implements AttributesExtractor { - request.getProcessDefinitionKey().ifPresent(pdk -> attributes.put("camunda.processdefinitionkey", pdk)); - request.getProcessDefinitionId().ifPresent(pdi -> attributes.put("camunda.processdefinitionid", pdi)); - request.getProcessInstanceId().ifPresent(pid -> attributes.put("camunda.processinstanceid", pid)); - request.getActivityId().ifPresent(aid -> attributes.put("camunda.activityid", aid)); - request.getActivityName().ifPresent(an -> attributes.put("camunda.activityname", an)); - request.getTopicName().ifPresent(tn -> attributes.put("camunda.topicname", tn)); - request.getTopicWorkerId().ifPresent(twi -> attributes.put("camunda.topicworkerid", twi)); - } + @Override + public void onStart( + AttributesBuilder attributes, Context parentContext, CamundaCommonRequest request) { - @Override - public void onEnd(AttributesBuilder attributes, Context context, CamundaCommonRequest request, String response, - Throwable error) { - // TODO Auto-generated method stub + request + .getProcessDefinitionKey() + .ifPresent(pdk -> attributes.put("camunda.processdefinitionkey", pdk)); + request + .getProcessDefinitionId() + .ifPresent(pdi -> attributes.put("camunda.processdefinitionid", pdi)); + request + .getProcessInstanceId() + .ifPresent(pid -> attributes.put("camunda.processinstanceid", pid)); + request.getActivityId().ifPresent(aid -> attributes.put("camunda.activityid", aid)); + request.getActivityName().ifPresent(an -> attributes.put("camunda.activityname", an)); + request.getTopicName().ifPresent(tn -> attributes.put("camunda.topicname", tn)); + request.getTopicWorkerId().ifPresent(twi -> attributes.put("camunda.topicworkerid", twi)); + } - } + @Override + public void onEnd( + AttributesBuilder attributes, + Context context, + CamundaCommonRequest request, + String response, + Throwable error) { + // TODO Auto-generated method stub + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/jobs/CamundaExecutionEntityGetter.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/jobs/CamundaExecutionEntityGetter.java index d58cd3f689bc..38ee5fe76d4d 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/jobs/CamundaExecutionEntityGetter.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/jobs/CamundaExecutionEntityGetter.java @@ -1,20 +1,23 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.jobs; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; +package io.opentelemetry.instrumentation.camunda.v7_0.jobs; import io.opentelemetry.context.propagation.TextMapGetter; +import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; public class CamundaExecutionEntityGetter implements TextMapGetter { - @Override - public Iterable keys(ExecutionEntity carrier) { - return carrier.getVariableNames(); - } - - @Override - public String get(ExecutionEntity carrier, String key) { - Object variable = carrier.getVariables().get(key); - return variable == null ? null : variable.toString(); - } + @Override + public Iterable keys(ExecutionEntity carrier) { + return carrier.getVariableNames(); + } + @Override + public String get(ExecutionEntity carrier, String key) { + Object variable = carrier.getVariables().get(key); + return variable == null ? null : variable.toString(); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/jobs/CamundaJobSpanNameExtractor.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/jobs/CamundaJobSpanNameExtractor.java index 82568028c635..52ac6055cb0f 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/jobs/CamundaJobSpanNameExtractor.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/jobs/CamundaJobSpanNameExtractor.java @@ -1,14 +1,17 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.jobs; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import io.opentelemetry.instrumentation.camunda.v7_0.common.CamundaCommonRequest; +package io.opentelemetry.instrumentation.camunda.v7_0.jobs; import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor; +import io.opentelemetry.instrumentation.camunda.v7_0.common.CamundaCommonRequest; public class CamundaJobSpanNameExtractor implements SpanNameExtractor { - @Override - public String extract(CamundaCommonRequest request) { - return String.format("%s AsyncContinuation", request.getActivityName().get()); - } - + @Override + public String extract(CamundaCommonRequest request) { + return String.format("%s AsyncContinuation", request.getActivityName().get()); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaActivityInstantiationBuilderSetter.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaActivityInstantiationBuilderSetter.java index 6c276718cc1a..9999eaca0c7a 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaActivityInstantiationBuilderSetter.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaActivityInstantiationBuilderSetter.java @@ -1,16 +1,19 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.processes; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import org.camunda.bpm.engine.runtime.ActivityInstantiationBuilder; +package io.opentelemetry.instrumentation.camunda.v7_0.processes; import io.opentelemetry.context.propagation.TextMapSetter; +import org.camunda.bpm.engine.runtime.ActivityInstantiationBuilder; -//TODO Bound it to ProcessInstanceModificationBuilder ?? -public class CamundaActivityInstantiationBuilderSetter implements TextMapSetter> { - - @Override - public void set(ActivityInstantiationBuilder carrier, String key, String value) { - carrier.setVariable(key, value); - - } +// TODO Bound it to ProcessInstanceModificationBuilder ?? +public class CamundaActivityInstantiationBuilderSetter + implements TextMapSetter> { + @Override + public void set(ActivityInstantiationBuilder carrier, String key, String value) { + carrier.setVariable(key, value); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaProcessInstanceModificationBuilderImpSetter.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaProcessInstanceModificationBuilderImpSetter.java index 34df4f6bbae2..5f0834858ffc 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaProcessInstanceModificationBuilderImpSetter.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaProcessInstanceModificationBuilderImpSetter.java @@ -1,17 +1,19 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.processes; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import org.camunda.bpm.engine.impl.ProcessInstanceModificationBuilderImpl; +package io.opentelemetry.instrumentation.camunda.v7_0.processes; import io.opentelemetry.context.propagation.TextMapSetter; +import org.camunda.bpm.engine.impl.ProcessInstanceModificationBuilderImpl; -//TODO use this or activityinstanctiationbuildersetter ?? +// TODO use this or activityinstanctiationbuildersetter ?? public class CamundaProcessInstanceModificationBuilderImpSetter - implements TextMapSetter { - - @Override - public void set(ProcessInstanceModificationBuilderImpl carrier, String key, String value) { - carrier.setVariable(key, value); - - } + implements TextMapSetter { + @Override + public void set(ProcessInstanceModificationBuilderImpl carrier, String key, String value) { + carrier.setVariable(key, value); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaProcessSpanNameExtractor.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaProcessSpanNameExtractor.java index e47ae93cf1a6..9fea08620cc3 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaProcessSpanNameExtractor.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/processes/CamundaProcessSpanNameExtractor.java @@ -1,14 +1,17 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.processes; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import io.opentelemetry.instrumentation.camunda.v7_0.common.CamundaCommonRequest; +package io.opentelemetry.instrumentation.camunda.v7_0.processes; import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor; +import io.opentelemetry.instrumentation.camunda.v7_0.common.CamundaCommonRequest; public class CamundaProcessSpanNameExtractor implements SpanNameExtractor { - @Override - public String extract(CamundaCommonRequest request) { - return request.getProcessDefinitionKey().get(); - } - + @Override + public String extract(CamundaCommonRequest request) { + return request.getProcessDefinitionKey().get(); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/task/CamundaExternalTaskGetter.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/task/CamundaExternalTaskGetter.java index 478503c212e6..b3030d6cae41 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/task/CamundaExternalTaskGetter.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/task/CamundaExternalTaskGetter.java @@ -1,20 +1,23 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.task; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import org.camunda.bpm.client.task.ExternalTask; +package io.opentelemetry.instrumentation.camunda.v7_0.task; import io.opentelemetry.context.propagation.TextMapGetter; +import org.camunda.bpm.client.task.ExternalTask; public class CamundaExternalTaskGetter implements TextMapGetter { - @Override - public Iterable keys(ExternalTask carrier) { - return carrier.getAllVariables().keySet(); - } - - @Override - public String get(ExternalTask carrier, String key) { - Object variable = carrier.getAllVariables().get(key); - return variable == null ? null : variable.toString(); - } + @Override + public Iterable keys(ExternalTask carrier) { + return carrier.getAllVariables().keySet(); + } + @Override + public String get(ExternalTask carrier, String key) { + Object variable = carrier.getAllVariables().get(key); + return variable == null ? null : variable.toString(); + } } diff --git a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/task/CamundaTaskSpanNameExtractor.java b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/task/CamundaTaskSpanNameExtractor.java index d34299ff057a..4f9e53eefeb2 100644 --- a/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/task/CamundaTaskSpanNameExtractor.java +++ b/instrumentation/camunda/camunda-7.0/library/src/main/java/io/opentelemetry/instrumentation/camunda/v7_0/task/CamundaTaskSpanNameExtractor.java @@ -1,14 +1,17 @@ -package io.opentelemetry.instrumentation.camunda.v7_0.task; +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ -import io.opentelemetry.instrumentation.camunda.v7_0.common.CamundaCommonRequest; +package io.opentelemetry.instrumentation.camunda.v7_0.task; import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor; +import io.opentelemetry.instrumentation.camunda.v7_0.common.CamundaCommonRequest; public class CamundaTaskSpanNameExtractor implements SpanNameExtractor { - @Override - public String extract(CamundaCommonRequest request) { - return String.format("%s Topic", request.getTopicName().get()); - } - + @Override + public String extract(CamundaCommonRequest request) { + return String.format("%s Topic", request.getTopicName().get()); + } }