PostHog · Schema

_LogEntry

A/B TestingAnalyticsFeature FlagsOpen SourceProduct AnalyticsSession Recording

Properties

Name Type Description
uuid string
timestamp string ISO 8601 timestamp of the original log event.
observed_timestamp string ISO 8601 timestamp the log pipeline observed the event (may differ from `timestamp`).
body string
severity_text string Log severity as a string (e.g. "info", "error"). Preferred over severity_number.
severity_number integer Log severity as a numeric code. Redundant with severity_text; kept for OpenTelemetry compatibility.
level string ClickHouse alias for severity_text. Redundant; prefer severity_text.
trace_id string Trace ID. Returns "00000000000000000000000000000000" when not set (padding, not null).
span_id string Span ID. Returns "0000000000000000" when not set (padding, not null).
trace_flags integer OpenTelemetry trace flags.
attributes object Log-level attributes as a string-keyed map. Values are strings (numeric/datetime attributes are also accessible via materialized columns).
resource_attributes object Resource-level attributes (service.name, k8s.*, host.hostname, etc.) as a string-keyed map. Repeats across all logs from the same pod/host.
event_name string OpenTelemetry event name, if set.
View JSON Schema on GitHub

JSON Schema

posthog-logentry-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/_LogEntry",
  "title": "_LogEntry",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string"
    },
    "timestamp": {
      "type": "string",
      "description": "ISO 8601 timestamp of the original log event."
    },
    "observed_timestamp": {
      "type": "string",
      "description": "ISO 8601 timestamp the log pipeline observed the event (may differ from `timestamp`)."
    },
    "body": {
      "type": "string"
    },
    "severity_text": {
      "type": "string",
      "description": "Log severity as a string (e.g. \"info\", \"error\"). Preferred over severity_number."
    },
    "severity_number": {
      "type": "integer",
      "description": "Log severity as a numeric code. Redundant with severity_text; kept for OpenTelemetry compatibility."
    },
    "level": {
      "type": "string",
      "description": "ClickHouse alias for severity_text. Redundant; prefer severity_text."
    },
    "trace_id": {
      "type": "string",
      "description": "Trace ID. Returns \"00000000000000000000000000000000\" when not set (padding, not null)."
    },
    "span_id": {
      "type": "string",
      "description": "Span ID. Returns \"0000000000000000\" when not set (padding, not null)."
    },
    "trace_flags": {
      "type": "integer",
      "description": "OpenTelemetry trace flags."
    },
    "attributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Log-level attributes as a string-keyed map. Values are strings (numeric/datetime attributes are also accessible via materialized columns)."
    },
    "resource_attributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Resource-level attributes (service.name, k8s.*, host.hostname, etc.) as a string-keyed map. Repeats across all logs from the same pod/host."
    },
    "event_name": {
      "type": "string",
      "description": "OpenTelemetry event name, if set."
    }
  },
  "required": [
    "attributes",
    "body",
    "level",
    "observed_timestamp",
    "resource_attributes",
    "severity_number",
    "severity_text",
    "span_id",
    "timestamp",
    "trace_id",
    "uuid"
  ]
}