Skip to content

Commit 4156609

Browse files
committed
Finally got tempo working..phew
1 parent 4eb27c5 commit 4156609

File tree

7 files changed

+37
-18
lines changed

7 files changed

+37
-18
lines changed

.idea/workspace.xml

+16-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker/docker-compose-base.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ services:
55
environment:
66
- SPRING_PROFILES_ACTIVE=docker
77
- 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
8+
- OTEL_TRACES_EXPORTER=otlp
99
- OTEL_METRICS_EXPORTER=none
1010
- OTEL_LOGS_EXPORTER=none
1111
- OTEL_METRIC_EXPORT_INTERVAL=15000
12+
- OTEL_EXPORTER_OTLP_ENDPOINT=http://tempo:4318
1213
logging:
1314
driver: fluentd
1415
options:
@@ -25,10 +26,11 @@ services:
2526
environment:
2627
- SPRING_PROFILES_ACTIVE=docker
2728
- 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_TRACES_EXPORTER=otlp
2930
- OTEL_METRICS_EXPORTER=none
3031
- OTEL_LOGS_EXPORTER=none
3132
- OTEL_METRIC_EXPORT_INTERVAL=15000
33+
- OTEL_EXPORTER_OTLP_ENDPOINT=http://tempo:4318
3234
logging:
3335
driver: fluentd
3436
options:
@@ -47,10 +49,13 @@ services:
4749
environment:
4850
- SPRING_PROFILES_ACTIVE=docker
4951
- 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
52+
- OTEL_TRACES_EXPORTER=otlp
5153
- OTEL_METRICS_EXPORTER=none
5254
- OTEL_LOGS_EXPORTER=none
5355
- OTEL_METRIC_EXPORT_INTERVAL=15000
56+
- OTEL_INSTRUMENTATION_SPRING_WEB_EXCLUDE_PATTERNS=/actuator/prometheus
57+
- OTEL_EXPORTER_OTLP_ENDPOINT=http://tempo:4318
58+
5459
logging:
5560
driver: fluentd
5661
options:
@@ -66,10 +71,11 @@ services:
6671
environment:
6772
- SPRING_PROFILES_ACTIVE=docker
6873
- 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
74+
- OTEL_TRACES_EXPORTER=otlp
7075
- OTEL_METRICS_EXPORTER=none
7176
- OTEL_LOGS_EXPORTER=none
7277
- OTEL_METRIC_EXPORT_INTERVAL=15000
78+
- OTEL_EXPORTER_OTLP_ENDPOINT=http://tempo:4318
7379
logging:
7480
driver: fluentd
7581
options:

docker/docker-compose-observability.yml

+3
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ services:
5353
ports:
5454
- "4317:4317" # OTLP gRPC
5555
- "4318:4318" # OTLP HTTP
56+
- "3200:3200" # Tempo HTTP server (for querying)
5657
volumes:
5758
- ./tempo/tempo.yml:/etc/tempo-config.yml
59+
networks:
60+
- shared-network
5861

5962
networks:
6063
shared-network:

docker/tempo/tempo.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
server:
2-
http_listen_port: 3100
2+
http_listen_address: 0.0.0.0
3+
http_listen_port: 3200
34

45
distributor:
56
receivers:
67
otlp:
78
protocols:
89
grpc:
10+
endpoint: 0.0.0.0:4317
911
http:
12+
endpoint: 0.0.0.0:4318
1013

1114
storage:
1215
trace:
@@ -15,4 +18,4 @@ storage:
1518
path: /tmp/tempo/blocks
1619

1720
usage_report:
18-
reporting_enabled: false
21+
reporting_enabled: false

microservices/course-composite-service/src/main/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ logging:
1515
root: INFO
1616
io.javatab.microservices.composite.course: DEBUG
1717
pattern:
18-
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId:-N/A}] [%X{spanId:-N/A}] %-5level %logger{36} - %msg%n"
18+
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{trace_id:-N/A}] [%X{span_id:-N/A}] %-5level %logger{36} - %msg%n"
1919

2020

2121
# Security related properties

microservices/course-service/src/main/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ logging:
3232
root: INFO
3333
io.javatab.microservices.core.course: DEBUG
3434
pattern:
35-
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId:-N/A}] [%X{spanId:-N/A}] %-5level %logger{36} - %msg%n"
35+
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{trace_id:-N/A}] [%X{span_id:-N/A}] %-5level %logger{36} - %msg%n"
3636

3737
management:
3838
endpoints:

microservices/review-service/src/main/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ logging:
2525
root: INFO
2626
io.javatab.microservices.composite.review: DEBUG
2727
pattern:
28-
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId:-N/A}] [%X{spanId:-N/A}] %-5level %logger{36} - %msg%n"
28+
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{trace_id:-N/A}] [%X{span_id:-N/A}] %-5level %logger{36} - %msg%n"
2929
management:
3030
endpoints:
3131
web:

0 commit comments

Comments
 (0)