Skip to content

wangpu666/jaeger-clickhouse

 
 

Repository files navigation

Jaeger ClickHouse

This is implementation of Jaeger's storage plugin for ClickHouse. See as well jaegertracing/jaeger/issues/1438 for historical discussion regarding Clickhouse plugin.

Project status

Jaeger ClickHouse is a community-driven project, we would love to hear your feature requests. Pull requests also will be greatly appreciated.

Why use ClickHouse for Jaeger?

ClickHouse is an analytical column-oriented database management system. It is designed to analyze streams of clicks which are kind of resemblant to spans. It's open-source, optimized for performance, and actively developed.

How it works?

Jaeger spans are stored in 2 tables. First one contains whole span encoded either in JSON or Protobuf. Second stores key information about spans for searching. This table is indexed by span duration and tags. Also, info about operations is stored in the materialized view. There are not indexes for archived spans. Storing data in replicated local tables with distributed global tables is natively supported. Spans are bufferized. Span buffers are flushed to DB either by timer or after reaching max batch size. Timer interval and batch size can be set in config file.

Database schema generated by JetBrains DataGrip Picture of tables

How to start using Jaeger over ClickHouse

Documentation

Refer to the config.yaml for all supported configuration options.

Build & Run

Docker database example

docker run --rm -it -p9000:9000 --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server:21
GOOS=linux make build run
make run-hotrod

Open localhost:16686 and localhost:8080.

Custom database

You need to specify connection options in config.yaml file, then you can run

make build
SPAN_STORAGE_TYPE=grpc-plugin {Jaeger binary adress} --query.ui-config=jaeger-ui.json --grpc-storage-plugin.binary=./{name of built binary} --grpc-storage-plugin.configuration-file=config.yaml --grpc-storage-plugin.log-level=debug

Credits

This project is based on https://github.com/bobrik/jaeger/tree/ivan/clickhouse/plugin/storage/clickhouse.

About

Jaeger ClickHouse storage plugin implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.3%
  • Makefile 1.5%
  • Dockerfile 0.2%