fix: add processor_type to stats_1m_processor_detail MV
The table and materialized view were missing the processor_type column, causing the RouteMetricsController query to fail and the dashboard processor metrics table to render empty. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -137,6 +137,7 @@ CREATE TABLE IF NOT EXISTS stats_1m_processor_detail (
|
|||||||
application_id LowCardinality(String),
|
application_id LowCardinality(String),
|
||||||
route_id LowCardinality(String),
|
route_id LowCardinality(String),
|
||||||
processor_id String,
|
processor_id String,
|
||||||
|
processor_type LowCardinality(String),
|
||||||
bucket DateTime,
|
bucket DateTime,
|
||||||
total_count AggregateFunction(count),
|
total_count AggregateFunction(count),
|
||||||
failed_count AggregateFunction(countIf, UInt8),
|
failed_count AggregateFunction(countIf, UInt8),
|
||||||
@@ -146,7 +147,7 @@ CREATE TABLE IF NOT EXISTS stats_1m_processor_detail (
|
|||||||
)
|
)
|
||||||
ENGINE = AggregatingMergeTree()
|
ENGINE = AggregatingMergeTree()
|
||||||
PARTITION BY (tenant_id, toYYYYMM(bucket))
|
PARTITION BY (tenant_id, toYYYYMM(bucket))
|
||||||
ORDER BY (tenant_id, application_id, route_id, processor_id, bucket)
|
ORDER BY (tenant_id, application_id, route_id, processor_id, processor_type, bucket)
|
||||||
TTL bucket + INTERVAL 365 DAY DELETE;
|
TTL bucket + INTERVAL 365 DAY DELETE;
|
||||||
|
|
||||||
CREATE MATERIALIZED VIEW IF NOT EXISTS stats_1m_processor_detail_mv TO stats_1m_processor_detail AS
|
CREATE MATERIALIZED VIEW IF NOT EXISTS stats_1m_processor_detail_mv TO stats_1m_processor_detail AS
|
||||||
@@ -155,6 +156,7 @@ SELECT
|
|||||||
application_id,
|
application_id,
|
||||||
route_id,
|
route_id,
|
||||||
processor_id,
|
processor_id,
|
||||||
|
processor_type,
|
||||||
toStartOfMinute(start_time) AS bucket,
|
toStartOfMinute(start_time) AS bucket,
|
||||||
countState() AS total_count,
|
countState() AS total_count,
|
||||||
countIfState(status = 'FAILED') AS failed_count,
|
countIfState(status = 'FAILED') AS failed_count,
|
||||||
@@ -162,4 +164,4 @@ SELECT
|
|||||||
maxState(duration_ms) AS duration_max,
|
maxState(duration_ms) AS duration_max,
|
||||||
quantileState(0.99)(duration_ms) AS p99_duration
|
quantileState(0.99)(duration_ms) AS p99_duration
|
||||||
FROM processor_executions
|
FROM processor_executions
|
||||||
GROUP BY tenant_id, application_id, route_id, processor_id, bucket;
|
GROUP BY tenant_id, application_id, route_id, processor_id, processor_type, bucket;
|
||||||
|
|||||||
Reference in New Issue
Block a user