Skip to content

Commit

Permalink
Fixes Jaeger Hotrod demo failure on OpenSearch 2.16.0 (#4921)
Browse files Browse the repository at this point in the history
Signed-off-by: linghengqian <[email protected]>
  • Loading branch information
linghengqian authored Sep 12, 2024
1 parent 400713b commit 4e50f3b
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 18 deletions.
5 changes: 3 additions & 2 deletions examples/jaeger-hotrod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ This demo will use the revered [Jaeger HotROD](https://github.com/jaegertracing/

#### Demo
```
docker-compose up -d --build
docker compose up -d
```

The above command will start the Jaeger HotROD sample, Jaeger Agent, OpenTelemetry Collector, Data Prepper, OpenSearch and OpenSearch Dashboards. Wait for few minutes for all the containers to come up, the DataPrepper container will restart until OpenSearch becomes available.

After the Docker image is running, do the following.

* Open the HotROD app at [http://localhost:8080](http://localhost:8080). Press the buttons in the UI to simulate requests.
* Load the OpenSearch Dashboards trace analytics dashboard at [http://localhost:5601/app/observability-dashboards#/trace_analytics/home](http://localhost:5601/app/observability-dashboards#/trace_analytics/home). If that link does not work, you may still be using On OpenSearch 1.1.0 or below. You will need to use [http://localhost:5601/app/trace-analytics-dashboards#/](http://localhost:5601/app/trace-analytics-dashboards#/) instead. You can view traces and the service map here.
* Log in to the OpenSearch Dashboards Web UI at [http://localhost:5601](http://localhost:5601) using the username `admin` and the password `yourStrongPassword123!`.
* Load the OpenSearch Dashboards trace analytics dashboard at [http://localhost:5601/app/observability-traces#/services](http://localhost:5601/app/observability-traces#/services). If that link does not work, you may still be using On OpenSearch 1.1.0 or below. You will need to use [http://localhost:5601/app/trace-analytics-dashboards#/](http://localhost:5601/app/trace-analytics-dashboards#/) instead. You can view traces and the service map here.

32 changes: 16 additions & 16 deletions examples/jaeger-hotrod/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
version: "3.7"
services:
data-prepper:
restart: unless-stopped
container_name: data-prepper
image: opensearchproject/data-prepper:2
volumes:
- ../trace_analytics_no_ssl_2x.yml:/usr/share/data-prepper/pipelines/pipelines.yaml
- ./pipelines.yaml:/usr/share/data-prepper/pipelines/pipelines.yaml
- ../data-prepper-config.yaml:/usr/share/data-prepper/config/data-prepper-config.yaml
- ../demo/root-ca.pem:/usr/share/data-prepper/root-ca.pem
- opensearch-config:/usr/share/opensearch-test/:ro
ports:
- "21890:21890"
networks:
- my_network
depends_on:
- "opensearch"
- opensearch
otel-collector:
container_name: otel-collector
image: otel/opentelemetry-collector:0.64.1
command: [ "--config=/etc/otel-collector-config.yml" ]
working_dir: "/project"
volumes:
- ${PWD}/:/project
- ./otel-collector-config.yml:/etc/otel-collector-config.yml
- ../demo/demo-data-prepper.crt:/etc/demo-data-prepper.crt
ports:
- "14250:14250"
depends_on:
- data-prepper
networks:
- my_network
jaeger-agent:
container_name: jaeger-agent
image: jaegertracing/jaeger-agent:1.51.0
command: [ "--reporter.grpc.host-port=otel-collector:14250" ]
ports:
Expand All @@ -40,6 +35,8 @@ services:
- "5778:5778/tcp"
networks:
- my_network
depends_on:
- otel-collector
jaeger-hot-rod:
image: jaegertracing/example-hotrod:1.41.0
command: [ "all" ]
Expand All @@ -54,11 +51,14 @@ services:
- my_network
opensearch:
container_name: node-0.example.com
image: opensearchproject/opensearch:2.9.0
image: opensearchproject/opensearch:2.16.0
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=yourStrongPassword123!
volumes:
- opensearch-config:/usr/share/opensearch/config/
ulimits:
memlock:
soft: -1
Expand All @@ -67,22 +67,22 @@ services:
soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
hard: 65536
ports:
- 9200:9200
- 9600:9600 # required for Performance Analyzer
- "9200:9200"
- "9600:9600" # required for Performance Analyzer
networks:
- my_network
dashboards:
image: opensearchproject/opensearch-dashboards:2.9.0
image: opensearchproject/opensearch-dashboards:2.16.0
container_name: opensearch-dashboards
ports:
- 5601:5601
expose:
- "5601"
- "5601:5601"
environment:
OPENSEARCH_HOSTS: '["https://node-0.example.com:9200"]'
depends_on:
- opensearch
networks:
- my_network
networks:
my_network:
my_network:
volumes:
opensearch-config:
37 changes: 37 additions & 0 deletions examples/jaeger-hotrod/pipelines.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
entry-pipeline:
delay: "100"
source:
otel_trace_source:
ssl: false
sink:
- pipeline:
name: "raw-pipeline"
- pipeline:
name: "service-map-pipeline"
raw-pipeline:
source:
pipeline:
name: "entry-pipeline"
processor:
- otel_trace_raw:
sink:
- opensearch:
hosts: [ "https://node-0.example.com:9200" ]
cert: "/usr/share/opensearch-test/root-ca.pem"
username: "admin"
password: "yourStrongPassword123!"
index_type: trace-analytics-raw
service-map-pipeline:
delay: "100"
source:
pipeline:
name: "entry-pipeline"
processor:
- service_map_stateful:
sink:
- opensearch:
hosts: ["https://node-0.example.com:9200"]
cert: "/usr/share/opensearch-test/root-ca.pem"
username: "admin"
password: "yourStrongPassword123!"
index_type: trace-analytics-service-map

0 comments on commit 4e50f3b

Please sign in to comment.