Skip to content

Reference: Event Fields

Every field on an Aires event, mapped from the Protobuf schema to the ClickHouse column.

Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
ididStringPrimary key"0192b3a4-..."UUID v7, time-ordered
timestamp_nstimestampDateTime64(9, 'UTC')Sort key2024-12-01 15:04:05.123456789Nanosecond event timestamp
observed_timestamp_nsCollector receive time (not stored separately)
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
serviceserviceLowCardinality(String)Sort key (1st)"workforce-api"Service name
environmentenvironmentLowCardinality(String)No"production"Environment
hosthostStringNo"ip-10-0-1-42"Hostname
instanceinstanceStringNo"replica-3"Instance ID
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
severityseverityLowCardinality(String)Sort key (2nd)"error"Stored as string, not enum int
messagemessageStringToken BF"request failed"Searchable log message
display_textdisplay_textStringNo"\x1b[31m✗ request failed\x1b[0m"Formatted display text
bodybodyStringNo"<base64>"Raw binary body
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
trace_idtrace_idStringBloom filter"abc-123-def-456"Distributed trace ID
span_idspan_idStringBloom filter"span-001"Span ID
parent_span_idparent_span_idStringNo"span-000"Parent span ID
subtrace_idsubtrace_idStringNo"sub-789"Sub-trace grouping ID
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
session_idsession_idStringBloom filter"sess-user42-abc"Session ID
user_iduser_idStringNo"user-42"Authenticated user
agent_idagent_idStringNo"planner-v2"AI agent ID
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
source_filesource_fileStringNo"src/handler.ts"File path
source_linesource_lineUInt32No42Line number
source_functionsource_functionStringNo"processTask"Function name
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
categorycategoryLowCardinality(String)No"http"Event category
kindkindLowCardinality(String)No"span"Event kind
tagstagsArray(String)No["api", "v2"]Free-form tags
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
attributesFlattened: known keys extracted, others stored in the row
dataJSON blobs stored in the row (future: dedicated map column)
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
http.methodhttp_methodLowCardinality(String)No"POST"HTTP method
http.urlNot stored (path is stored)
http.pathhttp_pathStringNo"/api/tasks"URL path
http.status_codehttp_status_codeUInt16No201Response status
http.request_sizeNot stored (available via attributes)
http.response_sizeNot stored (available via attributes)
http.duration_mshttp_duration_msInt64No47Duration in ms
http.user_agentNot stored (available via attributes)
http.remote_addrNot stored (available via attributes)
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
metric.namemetric_nameLowCardinality(String)No"http.request.duration_ms"Metric name
metric.valuemetric_valueFloat64No47.2Metric value
metric.unitNot stored (convention in name)
metric.typeNot stored (convention in name)
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
error.typeerror_typeLowCardinality(String)No"DatabaseError"Error class
error.messageerror_messageStringNo"connection refused"Error message
error.stackerror_stackStringNo"Error: ...\n at ..."Stack trace
error.handlederror_handledBoolNotrueCaught or unhandled
Proto FieldClickHouse ColumnCH TypeIndexedExampleDescription
sdk_namesdk_nameLowCardinality(String)No"aires-sdk-ts"SDK name
sdk_versionsdk_versionLowCardinality(String)No"0.1.0"SDK version
sdk_languagesdk_languageLowCardinality(String)No"typescript"SDK language
IndexColumnTypePurpose
Primary key(service, severity, timestamp)Sort orderOptimizes filtering by service + severity + time
idx_trace_idtrace_idbloom_filter(0.01)Fast trace lookups
idx_span_idspan_idbloom_filter(0.01)Fast span lookups
idx_session_idsession_idbloom_filter(0.01)Fast session lookups
idx_messagemessagetokenbf_v1(10240, 3, 0)Full-text search on log messages
-- All three sort key columns
WHERE service = 'my-api' AND severity = 'error' AND timestamp > now() - INTERVAL 1 HOUR

-- First two sort key columns
WHERE service = 'my-api' AND severity = 'error'

-- First sort key column only
WHERE service = 'my-api'
WHERE trace_id = 'abc-123'
WHERE span_id = 'span-001'
WHERE session_id = 'sess-789'
WHERE message LIKE '%timeout%'
WHERE hasToken(message, 'connection')
-- These scan all matching partitions — combine with time range for performance
WHERE category = 'http' AND timestamp > now() - INTERVAL 1 HOUR
WHERE agent_id = 'planner-v2' AND timestamp > now() - INTERVAL 1 HOUR
WHERE error_type = 'DatabaseError' AND timestamp > now() - INTERVAL 1 HOUR