# OpenTelemetry data model

When you enable OpenTelemetry, Altertable creates the catalog tables for you and exposes OTLP/HTTP endpoints that make ingestion easier. Accepted traces, logs, and metrics are written to normal SQL tables:

| Table                        | Description                                                                          |
| ---------------------------- | ------------------------------------------------------------------------------------ |
| `opentelemetry.main.spans`   | Trace spans with service, timing, status, attributes, events, and links              |
| `opentelemetry.main.metrics` | Metric points joined with metric names, types, services, and series attributes       |
| `opentelemetry.main.logs`    | Log records with severity, body, trace/span IDs, attributes, and resource attributes |

Query `opentelemetry.main.metrics` for metric values with their series attributes. The view joins the underlying `metric_points` and `metric_series` tables. Gauge and sum points expose `value`; histogram and summary points expose fields such as `count` and `sum`.