Skip to content

Commit be9de14

Browse files
committed
add log drains
1 parent 454d292 commit be9de14

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
TOKEN "append" APPEND
2+
3+
# Refer to https://vercel.com/docs/observability/log-drains/log-drains-reference for the logs schema
4+
5+
TAGS "vercel"
6+
7+
SCHEMA >
8+
`id` String `json:$.id`,
9+
`message` String `json:$.message`,
10+
`date` DateTime64(3) `json:$.timestamp` DEFAULT now(),
11+
`type` LowCardinality(String) `json:$.type`,
12+
`request_id` Nullable(String) `json:$.requestId`,
13+
`status_code` Nullable(UInt16) `json:$.statusCode`,
14+
`project_id` String `json:$.projectId` DEFAULT '',
15+
`project_name` Nullable(String) `json:$.projectName`,
16+
`deployment_id` Nullable(String) `json:$.deploymentId`,
17+
`source` LowCardinality(String) `json:$.source` DEFAULT '',
18+
`host` Nullable(String) `json:$.host`,
19+
`path` Nullable(String) `json:$.path`,
20+
`proxy` JSON `json:$.proxy` DEFAULT '{}',
21+
`level` LowCardinality(String) `json:$.level` DEFAULT '',
22+
`execution_region` Nullable(String) `json:$.executionRegion`,
23+
`environment` Nullable(String) `json:$.environment`,
24+
`branch` Nullable(String) `json:$.branch`,
25+
`build_id` Nullable(String) `json:$.buildId`,
26+
`entrypoint` Nullable(String) `json:$.entrypoint`
27+
28+
ENGINE "MergeTree"
29+
ENGINE_PARTITION_KEY "toYYYYMM(date)"
30+
ENGINE_SORTING_KEY "project_id, date"

0 commit comments

Comments
 (0)