Skip to content

Commit

Permalink
added WithSpan annotation for maximal disability of java delegate tra…
Browse files Browse the repository at this point in the history
…cing
  • Loading branch information
lwluc committed Apr 5, 2024
1 parent 08c7c33 commit 7e6c80b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions camunda-platform-engine/pom.xml
Expand Up @@ -12,6 +12,7 @@

<properties>
<camunda.version>7.15.0</camunda.version>
<opentelemetry.instrumentation.annotations.verion>2.2.0</opentelemetry.instrumentation.annotations.verion>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -49,6 +50,11 @@
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-instrumentation-annotations</artifactId>
<version>${opentelemetry.instrumentation.annotations.verion}</version>
</dependency>
</dependencies>

<build>
Expand Down
Expand Up @@ -2,6 +2,7 @@

import de.lw.camunda.engine.customer.Customer;
import de.lw.camunda.engine.customer.CustomerService;
import io.opentelemetry.instrumentation.annotations.WithSpan;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.slf4j.Logger;
Expand All @@ -19,6 +20,7 @@ public FetchData(CustomerService fetchDataService) {
this.fetchDataService = fetchDataService;
}

@WithSpan
@Override
public void execute(DelegateExecution delegateExecution) throws Exception {
log.info("Fetching Data from Service");
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Expand Up @@ -10,7 +10,7 @@ services:
environment:
- JAVA_AGENT_ENABLED=true
- OTEL_SERVICE_NAME=camunda
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
entrypoint: ["sh", "-c","
./dockerize -wait=tcp://external-service:7788 -timeout=360s -- &&
sh /usr/app/entrypoint.sh"]
Expand Down
1 change: 1 addition & 0 deletions monitoring/otel-collector-config.yaml
@@ -1,6 +1,7 @@
receivers:
otlp:
protocols:
http:
grpc:

exporters:
Expand Down

0 comments on commit 7e6c80b

Please sign in to comment.