-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat][storage]: add write path for ClickHouse based on Jaeger V2
Signed-off-by: zzzk1 <[email protected]>
- Loading branch information
Showing
24 changed files
with
1,214 additions
and
3 deletions.
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
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,49 @@ | ||
name: CIT ClickHouse | ||
|
||
on: | ||
workflow_call: | ||
|
||
concurrency: | ||
group: cit-kafka-${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions | ||
permissions: # added using https://github.com/step-security/secure-workflows | ||
contents: read | ||
|
||
jobs: | ||
clickhouse: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
jaeger-version: [v2] | ||
clickhouse-version: ["25.x"] | ||
name: clickhouse ${{matrix.clickhouse-version }} ${{ matrix.jaeger-version }} | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | ||
with: | ||
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | ||
|
||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
|
||
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 | ||
with: | ||
go-version: 1.24.x | ||
|
||
- name: Run clickhouse integration tests | ||
id: test-execution | ||
run: bash scripts/e2e/clickhouse.sh | ||
|
||
- uses: ./.github/actions/verify-metrics-snapshot | ||
if: matrix.jaeger-version == 'v2' | ||
with: | ||
snapshot: metrics_snapshot_clickhouse | ||
artifact_key: metrics_snapshot_clickhouse_${{ matrix.jaeger-version }} | ||
|
||
- name: Upload coverage to codecov | ||
uses: ./.github/actions/upload-codecov | ||
with: | ||
files: cover.out | ||
flags: clickhouse-${{ matrix.clickhouse-version }}-${{ matrix.jaeger-version }} |
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
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,11 @@ | ||
services: | ||
clickhouse: | ||
container_name: clickhouse | ||
image: bitnami/clickhouse:25.1.3 | ||
environment: | ||
CLICKHOUSE_USER: "default" | ||
CLICKHOUSE_PASSWORD: "default" | ||
ports: | ||
- 9000:9000 | ||
volumes: | ||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql |
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,48 @@ | ||
CREATE DATABASE IF NOT EXISTS jaeger; | ||
|
||
CREATE TABLE IF NOT EXISTS jaeger.otel_traces ( | ||
Timestamp DateTime64(9) CODEC(Delta, ZSTD(1)), | ||
TraceId String CODEC(ZSTD(1)), | ||
SpanId String CODEC(ZSTD(1)), | ||
ParentSpanId String CODEC(ZSTD(1)), | ||
TraceState String CODEC(ZSTD(1)), | ||
SpanName LowCardinality(String) CODEC(ZSTD(1)), | ||
SpanKind LowCardinality(String) CODEC(ZSTD(1)), | ||
ServiceName LowCardinality(String) CODEC(ZSTD(1)), | ||
ResourceAttributes Nested | ||
( | ||
keys LowCardinality(String), | ||
values String | ||
) CODEC (ZSTD(1)), | ||
ScopeName String CODEC(ZSTD(1)), | ||
ScopeVersion String CODEC(ZSTD(1)), | ||
SpanAttributes Nested | ||
( | ||
keys LowCardinality(String), | ||
values String | ||
) CODEC (ZSTD(1)), | ||
Duration UInt64 CODEC(ZSTD(1)), | ||
StatusCode LowCardinality(String) CODEC(ZSTD(1)), | ||
StatusMessage String CODEC(ZSTD(1)), | ||
Events Nested ( | ||
Timestamp DateTime64(9), | ||
Name LowCardinality(String), | ||
Attributes Map(LowCardinality(String), String) | ||
) CODEC(ZSTD(1)), | ||
Links Nested ( | ||
TraceId String, | ||
SpanId String, | ||
TraceState String, | ||
Attributes Map(LowCardinality(String), String) | ||
) CODEC(ZSTD(1)), | ||
INDEX idx_trace_id TraceId TYPE bloom_filter(0.001) GRANULARITY 1, | ||
INDEX idx_res_attr_key ResourceAttributes.keys TYPE bloom_filter(0.01) GRANULARITY 1, | ||
INDEX idx_res_attr_value ResourceAttributes.values TYPE bloom_filter(0.01) GRANULARITY 1, | ||
INDEX idx_span_attr_key SpanAttributes.keys TYPE bloom_filter(0.01) GRANULARITY 1, | ||
INDEX idx_span_attr_value SpanAttributes.values TYPE bloom_filter(0.01) GRANULARITY 1, | ||
INDEX idx_duration Duration TYPE minmax GRANULARITY 1 | ||
) ENGINE MergeTree() | ||
|
||
PARTITION BY toDate(Timestamp) | ||
ORDER BY (ServiceName, SpanName, toUnixTimestamp(Timestamp), SpanAttributes.keys, SpanAttributes.values, Duration, TraceId) | ||
SETTINGS index_granularity=8192, ttl_only_drop_parts = 1; |
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
Oops, something went wrong.