https://github.com/metrico/opentelemetry-trace-sampling-demo
Trace Sampling demo + qryn + ClickHouse
https://github.com/metrico/opentelemetry-trace-sampling-demo
clickhouse cloki grafana uptrace
Last synced: 8 months ago
JSON representation
Trace Sampling demo + qryn + ClickHouse
- Host: GitHub
- URL: https://github.com/metrico/opentelemetry-trace-sampling-demo
- Owner: metrico
- Created: 2022-05-12T10:15:11.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-14T18:04:52.000Z (over 3 years ago)
- Last Synced: 2025-04-12T18:45:14.571Z (about 1 year ago)
- Topics: clickhouse, cloki, grafana, uptrace
- Language: JavaScript
- Homepage: https://qryn.dev
- Size: 66.4 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grafana + qryn = correlated logs, traces, metrics
This repository hosts a [ClickHouse](https://clickhouse.com) centric alternative for the Grafana [blog post](https://grafana.com/blog/2022/05/11/an-introduction-to-trace-sampling-with-grafana-tempo-and-grafana-agent/?mdm=social&utm_source=li&utm_medium=social) on tail sampling functionality
💡 _qryn APIs are transparently compatible with Grafana Loki and Tempo APIs - no plugins!_
📦 The repository features a Docker Compose file that includes:
- [Grafana](https://grafana.com/) _(visualizes data)_
- [Grafana Agent](https://grafana.com/docs/agent/latest/configuration/?src=li&mdm=social) _(processes trace data)_
- [qryn](https://cloki.org) _(inserts and queries logs, metrics, telemetry)_
- [ClickHouse](https://clickhouse.com) _(data backend)_
- [Demo App](https://github.com/metrico/opentelemetry-trace-sampling-demo/tree/main/src) _(generate Zipkin traces and LogQL logs)_

## Running
Ensure you have both Docker and Docker Compose installed, and then in a terminal simply run:
```bash
docker-compose up -d
```
This will stand up all the required components
- Access qryn LogQL and Tempo APIs through Grafana at [http://localhost:3000/](http://localhost:3000/)
- Access qryn directly at [http://localhost:3100/](http://localhost:14318/)
## Usage
Follow the Grafana [blog post](https://grafana.com/blog/2022/05/11/an-introduction-to-trace-sampling-with-grafana-tempo-and-grafana-agent/?mdm=social&utm_source=li&utm_medium=social)
Two data sources have been pre-provisioned: Tempo and Loki. Loki contains log output from the demo app — including trace IDs — and Tempo is storing the traces. At the start, all of the traces being emitted from the demo app are being stored. We can quickly verify that by going to the Explore page in Grafana and looking at all of the logs.

Let’s look at some traces by expanding some of the loglines:

Use the `Tempo` derived field link to access the traces:

------------
### Disclaimer
- All rights belong to their respective owners
- Grafana®, Loki™ and Tempo® are a Trademark of Raintank, Grafana Labs.
- ClickHouse® is a Trademark of ClickHouse Inc.
