Skip to content

Commit c37ec9e

Browse files
authored
Merge pull request #3897 from ClickHouse/Blargian-patch-31
[Feedback] ClickStack: correct exponential histogram schema
2 parents 2c918b4 + 93d92db commit c37ec9e

File tree

1 file changed

+23
-15
lines changed
  • docs/use-cases/observability/clickstack/ingesting-data

1 file changed

+23
-15
lines changed

docs/use-cases/observability/clickstack/ingesting-data/schemas.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,16 @@ CREATE TABLE otel_metrics_histogram
208208
ENGINE = SharedMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}')
209209
PARTITION BY toDate(TimeUnix)
210210
ORDER BY (ServiceName, MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix))
211-
SETTINGS index_granularity = 8192"
212211
```
213212

214213
### Exponential histograms {#exponential-histograms}
215214

215+
:::note
216+
HyperDX does not support fetching/displaying exponential histogram metrics yet. Users may configure them in the metrics source but future support is forthcoming.
217+
:::
218+
216219
```sql
217-
CREATE TABLE otel_metrics_histogram
218-
(
220+
CREATE TABLE otel_metrics_exponentialhistogram (
219221
`ResourceAttributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)),
220222
`ResourceSchemaUrl` String CODEC(ZSTD(1)),
221223
`ScopeName` String CODEC(ZSTD(1)),
@@ -228,18 +230,24 @@ CREATE TABLE otel_metrics_histogram
228230
`MetricDescription` String CODEC(ZSTD(1)),
229231
`MetricUnit` String CODEC(ZSTD(1)),
230232
`Attributes` Map(LowCardinality(String), String) CODEC(ZSTD(1)),
231-
`StartTimeUnix` DateTime64(9) CODEC(Delta(8), ZSTD(1)),
232-
`TimeUnix` DateTime64(9) CODEC(Delta(8), ZSTD(1)),
233-
`Count` UInt64 CODEC(Delta(8), ZSTD(1)),
234-
`Sum` Float64 CODEC(ZSTD(1)),
235-
`BucketCounts` Array(UInt64) CODEC(ZSTD(1)),
236-
`ExplicitBounds` Array(Float64) CODEC(ZSTD(1)),
237-
`Exemplars.FilteredAttributes` Array(Map(LowCardinality(String), String)) CODEC(ZSTD(1)),
238-
`Exemplars.TimeUnix` Array(DateTime64(9)) CODEC(ZSTD(1)),
239-
`Exemplars.Value` Array(Float64) CODEC(ZSTD(1)),
240-
`Exemplars.SpanId` Array(String) CODEC(ZSTD(1)),
241-
`Exemplars.TraceId` Array(String) CODEC(ZSTD(1)),
242-
`Flags` UInt32 CODEC(ZSTD(1)),
233+
`StartTimeUnix` DateTime64(9) CODEC(Delta, ZSTD(1)),
234+
`TimeUnix` DateTime64(9) CODEC(Delta, ZSTD(1)),
235+
`Count UInt64` CODEC(Delta, ZSTD(1)),
236+
`Sum Float64` CODEC(ZSTD(1)),
237+
`Scale Int32` CODEC(ZSTD(1)),
238+
`ZeroCount` UInt64 CODEC(ZSTD(1)),
239+
`PositiveOffset` Int32 CODEC(ZSTD(1)),
240+
`PositiveBucketCounts` Array(UInt64) CODEC(ZSTD(1)),
241+
`NegativeOffset` Int32 CODEC(ZSTD(1)),
242+
`NegativeBucketCounts` Array(UInt64) CODEC(ZSTD(1)),
243+
`Exemplars` Nested (
244+
FilteredAttributes Map(LowCardinality(String), String),
245+
TimeUnix DateTime64(9),
246+
Value Float64,
247+
SpanId String,
248+
TraceId String
249+
) CODEC(ZSTD(1)),
250+
`Flags` UInt32 CODEC(ZSTD(1)),
243251
`Min` Float64 CODEC(ZSTD(1)),
244252
`Max` Float64 CODEC(ZSTD(1)),
245253
`AggregationTemporality` Int32 CODEC(ZSTD(1)),

0 commit comments

Comments
 (0)