Skip to content

Commit 4eb27c5

Browse files
committed
Tempo integration for docker
1 parent f5be1f6 commit 4eb27c5

File tree

9 files changed

+76
-31
lines changed

9 files changed

+76
-31
lines changed

.idea/workspace.xml

Lines changed: 18 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker/docker-compose-base.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ services:
44
mem_limit: 512m
55
environment:
66
- SPRING_PROFILES_ACTIVE=docker
7+
- JAVA_TOOL_OPTIONS="-javaagent:/application/BOOT-INF/lib/opentelemetry-javaagent-2.13.3.jar" #maven will place jar in BOOT-INF as per dep mentioned in pom. This will instruct the JVM to run the OpenTelemetry Java agent from the path.
8+
- OTEL_TRACES_EXPORTER=logging
9+
- OTEL_METRICS_EXPORTER=none
10+
- OTEL_LOGS_EXPORTER=none
11+
- OTEL_METRIC_EXPORT_INTERVAL=15000
712
logging:
813
driver: fluentd
914
options:
@@ -19,6 +24,11 @@ services:
1924
mem_limit: 512m
2025
environment:
2126
- SPRING_PROFILES_ACTIVE=docker
27+
- JAVA_TOOL_OPTIONS="-javaagent:/application/BOOT-INF/lib/opentelemetry-javaagent-2.13.3.jar" #maven will place jar in BOOT-INF as per dep mentioned in pom. This will instruct the JVM to run the OpenTelemetry Java agent from the path.
28+
- OTEL_TRACES_EXPORTER=logging
29+
- OTEL_METRICS_EXPORTER=none
30+
- OTEL_LOGS_EXPORTER=none
31+
- OTEL_METRIC_EXPORT_INTERVAL=15000
2232
logging:
2333
driver: fluentd
2434
options:
@@ -36,6 +46,11 @@ services:
3646
- "8080:8080"
3747
environment:
3848
- SPRING_PROFILES_ACTIVE=docker
49+
- JAVA_TOOL_OPTIONS="-javaagent:/application/BOOT-INF/lib/opentelemetry-javaagent-2.13.3.jar" #maven will place jar in BOOT-INF as per dep mentioned in pom. This will instruct the JVM to run the OpenTelemetry Java agent from the path.
50+
- OTEL_TRACES_EXPORTER=logging
51+
- OTEL_METRICS_EXPORTER=none
52+
- OTEL_LOGS_EXPORTER=none
53+
- OTEL_METRIC_EXPORT_INTERVAL=15000
3954
logging:
4055
driver: fluentd
4156
options:
@@ -50,6 +65,11 @@ services:
5065
- "9000:9000"
5166
environment:
5267
- SPRING_PROFILES_ACTIVE=docker
68+
- JAVA_TOOL_OPTIONS="-javaagent:/application/BOOT-INF/lib/opentelemetry-javaagent-2.13.3.jar" #maven will place jar in BOOT-INF as per dep mentioned in pom. This will instruct the JVM to run the OpenTelemetry Java agent from the path.
69+
- OTEL_TRACES_EXPORTER=logging
70+
- OTEL_METRICS_EXPORTER=none
71+
- OTEL_LOGS_EXPORTER=none
72+
- OTEL_METRIC_EXPORT_INTERVAL=15000
5373
logging:
5474
driver: fluentd
5575
options:

docker/docker-compose-observability.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ services:
4848
networks:
4949
- shared-network
5050
tempo:
51-
image: grafana/tempo:1.5.0
51+
image: grafana/tempo:latest
5252
command: -config.file /etc/tempo-config.yml
5353
ports:
54-
- "4317:4317"
54+
- "4317:4317" # OTLP gRPC
55+
- "4318:4318" # OTLP HTTP
5556
volumes:
5657
- ./tempo/tempo.yml:/etc/tempo-config.yml
5758

docker/fluent-bit/parsers.conf

Lines changed: 0 additions & 12 deletions
This file was deleted.

docker/tempo/tempo.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
server:
2+
http_listen_port: 3100
3+
4+
distributor:
5+
receivers:
6+
otlp:
7+
protocols:
8+
grpc:
9+
http:
10+
11+
storage:
12+
trace:
13+
backend: local
14+
local:
15+
path: /tmp/tempo/blocks
16+
17+
usage_report:
18+
reporting_enabled: false

microservices/course-composite-service/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@
7171
<artifactId>logback-classic</artifactId>
7272
</dependency>
7373

74+
<dependency>
75+
<groupId>io.opentelemetry.javaagent</groupId>
76+
<artifactId>opentelemetry-javaagent</artifactId>
77+
<version>2.13.3</version>
78+
</dependency>
79+
7480
<dependency>
7581
<groupId>org.springframework.boot</groupId>
7682
<artifactId>spring-boot-starter-test</artifactId>

microservices/course-composite-service/src/main/java/io/javatab/microservices/composite/course/web/CourseAggregateController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public CourseAggregateController(CourseCompositeIntegration integration) {
2929

3030
@GetMapping("/{id}/with-details")
3131
public Mono<CourseAggregate> getCourses(@PathVariable Long id, @AuthenticationPrincipal Jwt jwt) {
32-
logger.info("Fetching course and review details for course id : {}", id);
32+
logger.info("Fetching course and review details for course id ===> {}", id);
3333
return integration.getCourseDetails(id, jwt);
3434
}
3535
}

microservices/course-service/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
<groupId>io.micrometer</groupId>
8787
<artifactId>micrometer-registry-prometheus</artifactId>
8888
</dependency>
89+
<dependency>
90+
<groupId>io.opentelemetry.javaagent</groupId>
91+
<artifactId>opentelemetry-javaagent</artifactId>
92+
<version>2.13.3</version>
93+
</dependency>
8994
<dependency>
9095
<groupId>org.springframework.boot</groupId>
9196
<artifactId>spring-boot-starter-test</artifactId>

microservices/review-service/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@
7878
<groupId>io.micrometer</groupId>
7979
<artifactId>micrometer-registry-prometheus</artifactId>
8080
</dependency>
81+
<dependency>
82+
<groupId>io.opentelemetry.javaagent</groupId>
83+
<artifactId>opentelemetry-javaagent</artifactId>
84+
<version>2.13.3</version>
85+
</dependency>
8186
<dependency>
8287
<groupId>org.springframework.boot</groupId>
8388
<artifactId>spring-boot-starter-test</artifactId>

0 commit comments

Comments
 (0)