Log & Trace Fields
The columns available for filtering, grouping, and selecting in logs and traces queries — with their storage names, display labels, types, and values.
Every logs and traces query — whether a filter, an SPL pipeline, or a required_fields selection — refers to fields by their column name. This page lists all standard columns for both signals so you can build queries without guessing.
note: Column name vs. display label. The API and SPL use the underlying column name (e.g. return_code, protocol_type, pod_name). The Explorer UI shows a friendlier label for some of them (status_code, protocol, instance). When you write a query, use the Column value from the tables below. Where a label differs, it's shown so you can translate what you see in the UI.
Beyond these standard columns, both signals carry dynamic attributes — arbitrary key/value fields emitted by your instrumentation. See Attributes below.
Using fields in requests
The same column name works across all query surfaces:
{ "field": "level", "operation": "IN", "values": ["ERROR", "WARN"], "type": "string" }fields @timestamp, workload, level, body | filter level = "ERROR" | limit 50{ "required_fields": ["workload", "namespace", "level", "body"] }typein a filter isstringfor text columns andfloatfor numeric ones (see the tables).- Discover the live values for any field by calling
POST /api/logs/filtersorPOST /api/traces/filter— the same facets the Explorer sidebar shows.
Log columns
| Column | UI label | Type | Values / notes |
|---|---|---|---|
timestamp | timestamp | string | Log timestamp. Time range is set via the query string, not as a filter. |
workload | workload | string | Kubernetes workload (Deployment/StatefulSet/…) name |
namespace | namespace | string | Kubernetes namespace |
cluster | cluster | string | Cluster name |
pod_name | instance | string | Pod name |
container_name | container | string | Container name |
host | node | string | Node / host name |
level | type | string | ERROR, WARN, INFO, DEBUG, TRACE, FATAL, PANIC |
format | format | string | json, klog, nginx |
source | source | string | Collection source |
region | region | string | Cloud region |
app_version | app_version | string | Application version |
env_type | env_type | string | Environment type (e.g. production, staging) |
body | body | string | The raw log line. Use for substring/token search — see Searching the log body. |
body_length | body_length | float | Length of the log line in bytes |
pattern_id | pattern_id | string | Auto-clustered log-pattern id |
Searching the log body
body holds the full log message. Beyond exact match, these operators target it (they leverage the body text index — much faster than a bare wildcard):
| Operation | Meaning | Example value |
|---|---|---|
HAS_TOKEN | Whole-word token match | timeout |
HAS_ANY_TOKENS | Any of the listed whole words | ["timeout", "refused"] |
HAS_ALL_TOKENS | All of the listed whole words | ["connection", "reset"] |
MULTI_SEARCH_ANY | Substring match (matches inside larger words) | ["oom", "sigkill"] |
ILIKE / SUBSTR_ILIKE | Case-insensitive wildcard / substring | %deadline exceeded% |
note: Token operators match whole words split on non-alphanumerics: HAS_ALL_TOKENS of node-agent matches a line containing node and agent (in any position), not the literal adjacent string. For an exact substring use MULTI_SEARCH_ANY or SUBSTR_ILIKE.
Parsed (structured) log fields
For structured logs, fields parsed out of the message are addressed with the log_processed. prefix in SPL — e.g. fields log_processed.http.status_code, log_processed.duration_ms. See the SPL guide.
Trace columns
Identity & topology
| Column | UI label | Type | Values / notes |
|---|---|---|---|
workload | workload | string | Workload name. Group "by service" on workload — it's populated on every span, unlike app_service. |
app_service | service | string | OTel service.name. Populated only for SDK-instrumented services; may be sparse. |
namespace | namespace | string | Kubernetes namespace |
pod_name | instance | string | Pod name |
container_name | container | string | Container name |
node_name | node_name | string | Node / host name |
cluster | cluster | string | Cluster name |
region | region | string | Cloud region |
app_version | app_version | string | Application version |
env_type | env_type | string | Environment type |
clustered_resource | resource | string | Normalized resource / endpoint path (e.g. GET /api/v1/users/{id}) |
operation_name | operation_name | string | Span operation name |
server | server | string | Server side of the call |
client | client | string | Client side of the call |
server_namespace | server_namespace | string | Namespace of the server side |
client_namespace | client_namespace | string | Namespace of the client side |
partner_cluster | partner_cluster | string | Peer cluster in cross-cluster calls |
customer_identifier | domain | string | Tenant / customer identifier |
Protocol, status & method
| Column | UI label | Type | Values / notes |
|---|---|---|---|
protocol_type | protocol | string | HTTP, gRPC, TCP, MongoDB, Redis, MySQL, PostgreSQL |
status | status | string | error, ok |
return_code | status_code | string | HTTP/RPC status — 200, 400, 401, 403, 404, 500, 502, 503, 504, … |
subtype | method | string | GET, POST, PUT, DELETE, PATCH |
kind | role | string | server, client |
is_external | request_type | boolean | Whether the call crosses the cluster boundary |
source | source | string | eBPF, OTel |
issue_reason | reason | string | Detected issue category (freeform) |
Timing & identifiers
| Column | UI label | Type | Values / notes |
|---|---|---|---|
duration | duration | float | Span duration in nanoseconds. See the note below. |
start_timestamp | timestamp | string | Span start time (time range is set via the query string) |
trace_id | trace_id | string | Trace id (freeform match) |
span_id | span_id | string | Span id (freeform match) |
warning: Trace duration is in nanoseconds. When filtering or thresholding on latency, convert: 500ms → 500000000, 250ms → 250000000, 1s → 1000000000.
note: For a status-code class rather than a list — all 5xx, all 4xx — use an advanced-query filter with a LIKE pattern (return_code LIKE "5__") instead of enumerating every code.
Attributes
Both logs and traces carry dynamic attributes — key/value fields your instrumentation emits (e.g. http.route, db.system, user.id, payload.tenant) that aren't standard columns. Reference them with an @ prefix:
{ "field": "@http.route", "operation": "IN", "values": ["/checkout"], "type": "string" }fields @timestamp, workload, @http.route | filter @http.route = "/checkout"Attributes are stored separately from the standard columns, so a query that filters, groups, or aggregates on one reads a wider (raw) data path than a pure-column query. Discover the attribute keys and values present in your data with POST /api/logs/filters / POST /api/traces/filter, or the attribute-search field endpoints.
Where these fields apply
The same column names are used consistently across KubeSense:
- Logs & Traces API —
common_filter/adv_filtersfield,required_fields, and SPL. - Alert rules — filter and Group By fields (grouping by
workload,namespace, etc. produces per-series alerts). Alerts persist and evaluate using these column names, so an imported rule should referencereturn_code/protocol_type, not the UI labels. - Dashboards — logs/traces panel filters, group-by, and template variables.