Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Jaeger trace data for analytics documentation #2374

Merged
merged 35 commits into from
Jan 17, 2023
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d5c71a5
for new page how to analyze Jaeger trace data
alicejw1 Jan 11, 2023
9c5be21
remove old image
alicejw1 Jan 11, 2023
660c5e3
for new information and doc writer checklist
alicejw1 Jan 11, 2023
86cf05e
for new information and doc writer checklist
alicejw1 Jan 11, 2023
4bfa459
small rewrite
alicejw1 Jan 11, 2023
01e30ff
new clean images from Dashboards URL directly
alicejw1 Jan 11, 2023
cdd04d6
for additional information
alicejw1 Jan 11, 2023
c320d66
remove blank lines
alicejw1 Jan 11, 2023
b1c1551
for tech review feedback updates
alicejw1 Jan 11, 2023
87241b7
add requirements section
alicejw1 Jan 11, 2023
35f3784
for new procedure
alicejw1 Jan 11, 2023
3c4b4d7
for tech review feedback updates
alicejw1 Jan 11, 2023
1fd987b
continued updates
alicejw1 Jan 12, 2023
0bac730
for docker compose file instructions
alicejw1 Jan 12, 2023
d1b5c5a
for docker usage instruction
alicejw1 Jan 12, 2023
2af0f4e
for step 2 view dashboards
alicejw1 Jan 12, 2023
3cbbc61
for additional link provided in tech review
alicejw1 Jan 12, 2023
1d34e2d
for link to index page to introduce the feature
alicejw1 Jan 12, 2023
7ed601b
final checklist
alicejw1 Jan 12, 2023
ae75639
add warning not to use sample file in prod env
alicejw1 Jan 12, 2023
5220a61
updated docker file that is safe for prod env, remove warning note fo…
alicejw1 Jan 12, 2023
8042c96
for small update to parent page
alicejw1 Jan 12, 2023
0bd55fb
for tech review
alicejw1 Jan 12, 2023
f6a9757
typo fix for font
alicejw1 Jan 12, 2023
6fb5d02
for doc review #1 feedback updates
alicejw1 Jan 12, 2023
7e14e4d
for doc review feedback #2 updates
alicejw1 Jan 12, 2023
2b18d99
for a couple minor changes
alicejw1 Jan 12, 2023
fa8efe1
spell out dashboard URI directly to trace analytics for accessibility…
alicejw1 Jan 12, 2023
cfd0152
need to add additional step from eng to generate sample data
alicejw1 Jan 12, 2023
9bd9903
for additional step image of sample app
alicejw1 Jan 12, 2023
85cae77
rename step numbers
alicejw1 Jan 12, 2023
36e2b98
minor fix heading levels
alicejw1 Jan 12, 2023
360eba6
updates recommended by the editorial reviewer
alicejw1 Jan 17, 2023
7763331
clarify Spans window function
alicejw1 Jan 17, 2023
cc6f1fa
clarified individual trace details section
alicejw1 Jan 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
for docker compose file instructions
Signed-off-by: alicejw <alicejw@amazon.com>
alicejw1 committed Jan 12, 2023
commit 0bac7301d177c1ca9c75dd4d9c7ae4eab1db3625
151 changes: 146 additions & 5 deletions _observability-plugin/trace/trace-analytics-jaeger.md
Original file line number Diff line number Diff line change
@@ -44,6 +44,148 @@ Jaeger and OTEL indexes have different field names. Therefore when you run trace
{:.note}
-->

## How to set up OpenSearch to use Jaeger data
alicejw1 marked this conversation as resolved.
Show resolved Hide resolved

To use trace analytics with Jaeger data, you need to configure error capability. You can use a Docker compose file with required configurations to make sure that.

### Step 1: Run the Docker compose file
alicejw1 marked this conversation as resolved.
Show resolved Hide resolved

Use the following Docker compose file to enable Jaeger data for trace analytics.

Copy the following Docker compose file contents and save it as `docker-compose.yml`.
alicejw1 marked this conversation as resolved.
Show resolved Hide resolved

```
version: '3'
services:
opensearch-node1: # This is also the hostname of the container within the Docker network (i.e. https://opensearch-node1/)
image: opensearchproject/opensearch:latest # Specifying the latest available image - modify if you want a specific version
container_name: opensearch-node1
environment:
- cluster.name=opensearch-cluster # Name the cluster
- node.name=opensearch-node1 # Name the node that will run in this container
- discovery.seed_hosts=opensearch-node1,opensearch-node2 # Nodes to look for when discovering the cluster
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 # Nodes eligibile to serve as cluster manager
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
- "DISABLE_SECURITY_PLUGIN=true"
ulimits:
memlock:
soft: -1 # Set memlock to unlimited (no soft or hard limit)
hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
ports:
- "9200:9200"
- "9600:9600"
networks:
- opensearch-net # All of the containers will join the same Docker bridge network
opensearch-node2:
image: opensearchproject/opensearch:latest # This should be the same image used for opensearch-node1 to avoid issues
container_name: opensearch-node2
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node2
- discovery.seed_hosts=opensearch-node1,opensearch-node2
- cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "DISABLE_SECURITY_PLUGIN=true"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data2:/usr/share/opensearch/data
networks:
- opensearch-net
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:latest # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
container_name: opensearch-dashboards
ports:
- 5601:5601 # Map host port 5601 to container port 5601
expose:
- "5601" # Expose port 5601 for web access to OpenSearch Dashboards
environment:
OPENSEARCH_HOSTS: '["http://opensearch-node1:9200","http://opensearch-node2:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query
DISABLE_SECURITY_DASHBOARDS_PLUGIN: true
networks:
- opensearch-net
jaeger-collector:
image: jaegertracing/jaeger-collector:latest
ports:
- "14269:14269"
- "14268:14268"
- "14267:14267"
- "14250:14250"
- "9411:9411"
networks:
- opensearch-net
restart: on-failure
environment:
- SPAN_STORAGE_TYPE=opensearch
- ES_TAGS_AS_FIELDS_ALL=true
command: [
"--es.server-urls=http://opensearch-node1:9200",
]
depends_on:
- opensearch-node1

jaeger-agent:
image: jaegertracing/jaeger-agent:latest
hostname: jaeger-agent
command: ["--reporter.grpc.host-port=jaeger-collector:14250"]
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
networks:
- opensearch-net
restart: on-failure
environment:
- SPAN_STORAGE_TYPE=opensearch
depends_on:
- jaeger-collector

hotrod:
image: jaegertracing/example-hotrod:latest
ports:
- "8080:8080"
command: ["all"]
environment:
- JAEGER_AGENT_HOST=jaeger-agent
- JAEGER_AGENT_PORT=6831
networks:
- opensearch-net
depends_on:
- jaeger-agent

volumes:
opensearch-data1:
opensearch-data2:

networks:
opensearch-net:
```
In a command-line interface, run the following command:

```
docker compose up
```

You can now navigate to http://localhost:8080 to generate your Jaeger data.

## Step 2: View trace data in OpenSearch Dashboards

Now you can go to OpenSearch Dashboards to view your trace data on http://localhost:5601

<!-- saving these instructions. using entire docker compose file instead of individual commands.
### Step 1: Set up OpenSearch and OpenSearch Dashboards

You need to set up a local instance with Docker.
@@ -59,8 +201,7 @@ Run the following command to set up OpenSearch Dashboards with Docker:
```
Need info here
```
<!-- from the step 1 - need the opensearch-dashboards version of the kibana 6.8.0 command here -->

from the step 1 - need the opensearch-dashboards version of the kibana 6.8.0 command here

### Step 2: Set up Jaeger

@@ -81,8 +222,8 @@ Run the following command to deploy Jaeger.
docker run --rm -it --link=opensearch --name=jaeger -e SPAN_STORAGE_TYPE=elasticsearch -e ES_SERVER_URLS=http://172.17.0.2:9200 -e ES_TAGS_AS_FIELDS_ALL=true -e ES_VERSION=7 -p 16686:16686 jaegertracing/all-in-one:1.38
```

Upon success, you should be able to get to the Jaeger from http://localhost:16686.
<!--ES_SERVER_URLS=http://172.17.0.2:9200 - need to replace this with correct entry for OpenSearch -->
Upon success, you should be able to get to the Jaeger UI from http://localhost:16686.


### Step 3: Simulate trace data

@@ -93,7 +234,7 @@ To verify trace storage with OpenSearch, run the following command.
```
docker run --rm --link jaeger -e JAEGER_AGENT_HOST=jaeger -e JAEGER_AGENT_PORT=6831 -p 8080-8083:8080-8083 jaegertracing/example-hotrod:latest all
```

-->
## Use trace analytics in OpenSearch Dashboards
alicejw1 marked this conversation as resolved.
Show resolved Hide resolved

To analyze your Jaeger trace data in the Dashboards, you need to set up Trace Analytics first. To get started, see [Get started with Trace Analytics]({{site.url}}{{site.baseurl}}/observability-plugin/trace/get-started/).
alicejw1 marked this conversation as resolved.
Show resolved Hide resolved
alicejw1 marked this conversation as resolved.
Show resolved Hide resolved