-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
126 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
--- | ||
title: Tracing with Jaeger | ||
sidebar_position: 1 | ||
--- | ||
|
||
In this quick start guide, we will set up a Quickwit instance and analyze its own traces into Jaeger using Docker Compose. | ||
|
||
You only need a minute to get Jaeger working with Quickwit storage backend! | ||
|
||
![Quickwit UI Logs](../../assets/images/screenshot-quickwit-ui-docker-compose-logs.png) | ||
|
||
|
||
## Start the OTEL collector and a Quickwit instance | ||
|
||
Let's use `docker compose` with the following configuration: | ||
|
||
```yaml title="docker-compose.yaml" | ||
version: "3" | ||
|
||
services: | ||
quickwit: | ||
image: quickwit/quickwit:${QW_VERSION:-0.6.5} | ||
volumes: | ||
- ./qwdata:/quickwit/qwdata | ||
ports: | ||
- 7280:7280 | ||
command: ["run"] | ||
|
||
jaeger: | ||
user: "0" # Needed to access the directory /var/lib/docker/containers/ | ||
image: otel/opentelemetry-collector-contrib:${OTEL_VERSION:-0.87.0} | ||
volumes: | ||
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml | ||
- /var/lib/docker/containers:/var/lib/docker/containers:ro | ||
command: ["--config=/etc/otel-collector-config.yaml"] | ||
``` | ||
## Execute search queries | ||
Let's start with a query on the field `title`: `title:search AND engine`: | ||
```bash | ||
curl "http://127.0.0.1:7280/api/v1/stackoverflow/search?query=title:search+AND+engine" | ||
``` | ||
|
||
The same request can be expressed as a JSON query: | ||
```bash | ||
curl -XPOST "http://localhost:7280/api/v1/stackoverflow/search" -H 'Content-Type: application/json' -d '{ | ||
"query": "title:search AND engine" | ||
}' | ||
``` | ||
|
||
This format is more verbose but it allows you to use more advanced features such as aggregations. The following query finds most popular tags used on the questions in this dataset: | ||
```bash | ||
curl -XPOST "http://localhost:7280/api/v1/stackoverflow/search" -H 'Content-Type: application/json' -d '{ | ||
"query": "type:question", | ||
"max_hits": 0, | ||
"aggs": { | ||
"foo": { | ||
"terms":{ | ||
"field":"tags", | ||
"size": 10 | ||
} | ||
} | ||
} | ||
}' | ||
``` | ||
|
||
As you are experimenting with different queries check out the server logs to see what's happening. | ||
|
||
:::note | ||
|
||
Don't forget to encode correctly the query params to avoid bad request (status 400). | ||
|
||
::: | ||
|
||
|
||
|
||
## Clean | ||
|
||
Let's do some cleanup by deleting the index: | ||
|
||
<Tabs> | ||
|
||
<TabItem value="cli" label="CLI"> | ||
|
||
```bash | ||
./quickwit index delete --index stackoverflow | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="rest" label="REST"> | ||
|
||
```bash | ||
curl -XDELETE http://127.0.0.1:7280/api/v1/indexes/stackoverflow | ||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
Congrats! You can level up with the following tutorials to discover all Quickwit features. | ||
|
||
|
||
## TLDR | ||
|
||
Run the following command from within Quickwit's installation directory. | ||
|
||
```bash | ||
curl -o stackoverflow-index-config.yaml https://raw.githubusercontent.com/quickwit-oss/quickwit/main/config/tutorials/stackoverflow/index-config.yaml | ||
./quickwit index create --index-config ./stackoverflow-index-config.yaml | ||
curl -O https://quickwit-datasets-public.s3.amazonaws.com/stackoverflow.posts.transformed-10000.json | ||
./quickwit index ingest --index stackoverflow --input-path ./stackoverflow.posts.transformed-10000.json --force | ||
./quickwit index search --index stackoverflow --query "search AND engine" | ||
./quickwit index delete --index stackoverflow | ||
``` | ||
|
||
|
||
## Next tutorials | ||
|
||
- [Search on logs with timestamp pruning](/docs/get-started/tutorials/tutorial-hdfs-logs) | ||
- [Setup a distributed search on AWS S3](/docs/get-started/tutorials/tutorial-hdfs-logs-distributed-search-aws-s3) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters