@@ -103,6 +103,8 @@ export const action: Action = async exec => {
103
103
, "graphql_operation_name" String CODEC(ZSTD(1))
104
104
, "graphql_operation_type" LowCardinality(String) CODEC(ZSTD(1))
105
105
, "graphql_operation_document" String CODEC(ZSTD(1))
106
+ , "graphql_error_count" UInt32 CODEC(T64, ZSTD(1))
107
+ , "graphql_error_codes" Array(LowCardinality(String)) CODEC(ZSTD(1))
106
108
, "subgraph_names" Array(LowCardinality(String)) CODEC(ZSTD(1))
107
109
, INDEX "idx_duration" "duration" TYPE minmax GRANULARITY 1
108
110
, INDEX "idx_http_status_code" "http_status_code" TYPE bloom_filter(0.01) GRANULARITY 1
@@ -114,6 +116,7 @@ export const action: Action = async exec => {
114
116
, INDEX "idx_client_version" "client_version" TYPE bloom_filter(0.01) GRANULARITY 1
115
117
, INDEX "idx_graphql_operation_name" "graphql_operation_name" TYPE bloom_filter(0.01) GRANULARITY 1
116
118
, INDEX "idx_graphql_operation_type" "graphql_operation_type" TYPE bloom_filter(0.01) GRANULARITY 1
119
+ , INDEX "idx_graphql_error_codes" "graphql_error_codes" TYPE bloom_filter(0.01) GRANULARITY 1
117
120
, INDEX "idx_subgraph_names" "subgraph_names" TYPE bloom_filter(0.01) GRANULARITY 1
118
121
)
119
122
ENGINE = MergeTree
@@ -142,6 +145,8 @@ export const action: Action = async exec => {
142
145
, "graphql_operation_name" String
143
146
, "graphql_operation_type" LowCardinality(String)
144
147
, "graphql_operation_document" String
148
+ , "graphql_error_count" UInt32
149
+ , "graphql_error_codes" Array(LowCardinality(String))
145
150
, "subgraph_names" Array(String)
146
151
)
147
152
AS (
@@ -161,6 +166,8 @@ export const action: Action = async exec => {
161
166
, "SpanAttributes"['graphql.operation.name'] AS "graphql_operation_name"
162
167
, toLowCardinality("SpanAttributes"['graphql.operation.type']) AS "graphql_operation_type"
163
168
, "SpanAttributes"['graphql.operation.document'] AS "graphql_operation_document"
169
+ , "SpanAttributes"['graphql.error.count'] AS "graphql_errors_count"
170
+ , arrayMap(x -> toLowCardinality(x), splitByChar(',', "SpanAttributes"['graphql.error.codes'])) AS "graphql_error_codes"
164
171
, arrayMap(x -> toLowCardinality(x), splitByChar(',', "SpanAttributes"['hive.subgraph.names'])) AS "subgraph_names"
165
172
FROM
166
173
"otel_traces"
0 commit comments