Skip to content

Commit c6d7e17

Browse files
authored
[hotrod] Fix connectivity in docker compose (#5734)
## Which problem is this PR solving? - HotROD demo stopped working. Since v0.105 the OTEL Collector components default hostname to 'localhost. However, that does not work inside a Docker container (at least on MacOS & Docker Desktop). ## Description of the changes - Make OTLP receivers listen on all IPs (0.0.0.0) - Unrelated, but added a mermaid diagram for SPM, as I needed it for the slides for a presentation ## How was this change tested? - Go through HotROD demo workflow --------- Signed-off-by: Yuri Shkuro <[email protected]>
1 parent 7a158cb commit c6d7e17

File tree

3 files changed

+47
-31
lines changed

3 files changed

+47
-31
lines changed
Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,10 @@
11
# storage_cleaner
22

3-
This module implements an extension that allows purging the backend storage by making an HTTP POST request to it.
3+
This module implements an extension that allows purging the backend storage by making an HTTP POST request to it.
44

55
The storage_cleaner extension is intended to be used only in tests, providing a way to clear the storage between test runs. Making a POST request to the exposed endpoint will delete all data in storage.
66

7-
8-
```mermaid
9-
flowchart LR
10-
Receiver --> Processor
11-
Processor --> Exporter
12-
JaegerStorageExension -->|"(1) get storage"| Exporter
13-
Exporter -->|"(2) write trace"| Storage
14-
15-
E2E_test -->|"(1) POST /purge"| HTTP_endpoint
16-
JaegerStorageExension -->|"(2) getStorage()"| HTTP_endpoint
17-
HTTP_endpoint -.->|"(3) storage.(*storage.Purger).Purge()"| Storage
18-
19-
subgraph Jaeger Collector
20-
Receiver
21-
Processor
22-
Exporter
23-
24-
Storage
25-
StorageCleanerExtension
26-
HTTP_endpoint
27-
subgraph JaegerStorageExension
28-
Storage
29-
end
30-
subgraph StorageCleanerExtension
31-
HTTP_endpoint
32-
end
33-
end
34-
```
7+
See [Architecture Diagram](../README.md) in the parent directory.
358

369
# Getting Started
3710

@@ -44,4 +17,3 @@ extensions:
4417
storage_cleaner:
4518
trace_storage: storage_name
4619
```
47-

docker-compose/monitor/README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,45 @@ The following diagram illustrates the relationship between these components:
2424

2525
![SPM diagram](./diagram.png)
2626

27+
```mermaid
28+
flowchart LR
29+
SDK -->|traces| Receiver
30+
Receiver --> MG
31+
Receiver --> Batch
32+
MG --> ExpMetrics
33+
Batch --> ExpTraces
34+
ExpMetrics -->|metrics| Prometheus[(Prometheus)]
35+
ExpTraces -->|traces| Jaeger[Jaeger
36+
Collector]
37+
Prometheus -.-> JaegerUI
38+
Jaeger --> Storage[(Storage)]
39+
Storage -.-> JaegerUI[Jaeger
40+
Query
41+
and UI]
42+
43+
style Prometheus fill:red,color:white
44+
style Jaeger fill:blue,color:white
45+
style JaegerUI fill:blue,color:white
46+
style Storage fill:gray,color:white
47+
48+
subgraph Application
49+
SDK[OTel
50+
SDK]
51+
end
52+
53+
subgraph OTEL[OTel Collector]
54+
Receiver
55+
Batch
56+
MG[Span
57+
Metrics
58+
Connector]
59+
ExpTraces[Traces
60+
Exporter]
61+
ExpMetrics[Metrics
62+
Exporter]
63+
end
64+
```
65+
2766
# Getting Started
2867

2968
## Quickstart
@@ -160,7 +199,7 @@ quantile = 'quantile=' floatValue
160199
- The quantile to compute the latency 'P' value. Valid range (0,1].
161200
- Mandatory for 'latencies' type.
162201
163-
groupByOperation = 'groupByOperation=' boolValue
202+
groupByOperation = 'groupByOperation=' boolValue
164203
boolValue = '1' | 't' | 'T' | 'true' | 'TRUE' | 'True' | 0 | 'f' | 'F' | 'false' | 'FALSE' | 'False'
165204
- A boolean value which will determine if the metrics query will also group by operation.
166205
- Optional with default: false

examples/hotrod/docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ services:
88
image: jaegertracing/all-in-one:${JAEGER_VERSION:-latest}
99
ports:
1010
- "16686:16686"
11+
- "4317:4317"
1112
- "4318:4318"
1213
environment:
1314
- LOG_LEVEL=debug
15+
# Since v0.105 the OTEL Collector components default hostname to 'localhost'.
16+
# However, that does not work inside a Docker container, so we listen on all IPs.
17+
- COLLECTOR_OTLP_GRPC_HOST_PORT=0.0.0.0:4317
18+
- COLLECTOR_OTLP_HTTP_HOST_PORT=0.0.0.0:4318
1419
networks:
1520
- jaeger-example
1621
hotrod:

0 commit comments

Comments
 (0)