# How to stream OpenTelemetry data to Iceberg and DuckLake with just DuckDB

> Streaming metrics, logs, and traces directly into a DuckLake or Iceberg catalog with the duckdb-otlp extension.

By Clay Smith, published 2026-06-02. Original: https://clay.fyi/blog/duckdb-is-all-you-need-for-opentelemetry-data/

#### Is duckdb all you need for storing and querying OTel?

In a [previous post](https://clay.fyi/blog/cheap-opentelemetry-lakehouses-parquet-duckdb-iceberg/) about OpenTelemetry, parquet, and data lakehouses, I mentioned difficulties when you want to push lots of metrics, logs, or traces to object storage with an Iceberg catalog like Amazon S3 Tables. A couple people messaged me, shared expletives, and said the same.

Some good news: there has been progress around this in the DuckDB ecosystem with the new [DuckLake 1.0](https://ducklake.select/2026/04/13/ducklake-10/) standard, [Iceberg extension features](https://duckdb.org/2026/05/29/new-iceberg-features), and the [Quack Protocol](https://github.com/smithclay/canardstack). To explore some of these ideas in action, I updated the [DuckDB OpenTelemetry extension](https://github.com/smithclay/duckdb-otlp) to write metrics, logs and traces via the OpenTelemetry Protocol (OTLP/HTTP) directly to duckdb. This makes it easy to store observability data in anything with existing duckdb support: lakehouses, normal and [not-normal](https://duckdb.org/community_extensions/extensions/gsheets) filesystems, or [object storage](https://duckdb.org/docs/current/core_extensions/aws). Everything runs in a single process: no extra dependencies or orchestration needed.

DuckDB is evolving into very capable data glue, even for streaming data. Below is some discussion of storing ~gigabytes to low terabytes of metrics, logs and traces streamed into a DuckLake using the new extension. Early benchmarks (see below) suggest if you're working with a modest amount of OpenTelemetry data, it's promising.

### Streaming observability data into DuckLake and other catalogs

The idea was to do the following with a couple lines of SQL statements typed into duckdb on a mac:

* Accept OpenTelemetry data streamed over HTTP (metrics, logs, traces)
* Write compressed OTel data to object storage (Amazon S3, Cloudflare R2, etc)
* Keep track of what data you write in a metadata catalog (DuckLake, Iceberg, etc)
* Query the data in SQL with duckdb remotely (Quack Protocol)
* Align to open standards/open source/vendor-neutral

The main reason to do all of this is to get reasonable performance when you want to do SQL queries like "show errors last Monday for the checkout service." If not: [just throw parquet files in a bucket](https://smithclay.github.io/duckdb-otlp/guides/exporting-to-parquet/), which is [what the last post partly explored](https://clay.fyi/blog/cheap-opentelemetry-lakehouses-parquet-duckdb-iceberg/).

For #1-5, all you do is [type a couple SQL commands](https://smithclay.github.io/duckdb-otlp/quickstart/serve/) into the duckdb shell to load and configure a handful of extensions. That gets repetitive so I packaged it up in a docker image with duckdb embedded and pre-configured inside:

```bash
docker run --rm --name duckdb-otlp \
  -p 4318:4318 \
  -v "$(pwd):/data" \
  ghcr.io/smithclay/duckdb-otlp:latest
```

POST some OTel data to :4318, it gets added to local DuckLake, then you can query it with SQL (`SELECT * FROM otel_logs`).

The trouble is what happens when you have hundreds of thousands of log lines arriving, which without optimizations means many small files being written to object storage. It kills query performance and costs more due to the intricacies of cloud object storage billing:

<figure>
  <a href="https://clay.fyi/images/ducklake-small-files-problem.png">
    <img src="https://clay.fyi/images/ducklake-small-files-problem.png" alt="Diagram of the duckdb-otlp pipeline showing the small-file problem">
  </a>
  <figcaption>The duckdb-otlp pipeline, and its catch.</figcaption>
</figure>

Every telemetry pipeline that writes to object storage has ways to mitigate this by batching data to reduce the number of writes. This involves a tradeoff that varies widely depending on what you’re doing: how fresh do you need the data to be? You end up with configuration knobs that might dial the bill way down, but fresh data might not be queryable for a while.

DuckLake is building in automatic-ish maintenance features and making it easy to use [via a single command](https://ducklake.select/docs/stable/duckdb/maintenance/checkpoint) that can merge small files together (compaction) or reduce metadata. Iceberg catalogs like S3 Tables or R2 Data Catalog have had variations of this as well. If tuned correctly you might get reasonable query performance and a cheap object storage bill.

Until then, after some basic synthetic log ingest benchmarks and the official [duckdb benchmarks](https://duckdb.org/docs/current/guides/performance/benchmarks): it seems promising. The duckdb-otlp extension was able to write ~100k log rows per second to remote cloud catalogs, which comes out to ~2.5 TB/day of data *for a single duckdb process*.

| Catalog | Durable rows/s | Accepted MiB/s | Drain Time |
| --- | --- | --- | --- |
| [Local DuckLake](https://smithclay.github.io/duckdb-otlp/guides/stream-to-local-ducklake/) | 97,545 | 29.9 | 0.21s |
| Local DuckLake, R2 Storage | 96,911 | 30.2 | 0.62s |
| [Neon DuckLake, R2 Storage](https://smithclay.github.io/duckdb-otlp/guides/stream-to-remote-ducklake/) | 90,850 | 30.1 | 0.56s |
| [S3 Tables Catalog (Iceberg)](https://smithclay.github.io/duckdb-otlp/guides/stream-to-s3-tables/) | 90,390 | 29.5 | 2.82s |
| [R2 Data Catalog (Iceberg)](https://smithclay.github.io/duckdb-otlp/guides/stream-to-r2-data-catalog/) | 88,128 | 30.0 | 4.80s |

Yes, more benchmarking is needed. That's a future post.

### Grafana goes swimming in a DuckLake

Performance aside, there's a major UX problem: open-source observability tools use their own special-purpose databases and query languages (PromQL, etc)... not SQL. Visualization tools like Grafana can be [extended to support SQL](https://grafana.com/grafana/plugins/mssql/) via plugins, but it's not out of the box.

There are other people working on this, recently learned about [Gigapipe](https://gigapipe.com/) and vibe-weekend-coded a basic prototype [here](https://github.com/smithclay/canardstack). For simple queries in PromQL/Loki/Tempo, you can get reasonable-looking dashboards in Grafana, powered by SQL queries in a duckdb instance fronted by compatibility APIs:

<figure>
  <a href="https://clay.fyi/images/grafana-ducklake-dashboard.png">
    <img src="https://clay.fyi/images/grafana-ducklake-dashboard.png" alt="Grafana dashboard rendering logs, traces, and service metrics from a DuckLake">
  </a>
  <figcaption>A weekend-prototype Grafana dashboard, activity totals, service memory, recent logs, and frontend traces, rendered entirely from SQL queries against a DuckLake behind PromQL/Loki/Tempo-compatible APIs.</figcaption>
</figure>

There's also the parallel universe of visualization and analytics tools in the analytics world that work well with duckdb. Perspective is doing really cool things inside of browsers with wasm, [for example](https://perspective-dev.github.io/block.html?example=duckdb).

Quack is also opening up new integration pathways. As a standard, it's just an official and fast way for duckdbs to talk to each other over HTTP (credit to extensions like [Airport](https://duckdb.org/community_extensions/extensions/airport) that have been exploring the idea for a while). [Currently in the duckdb-otlp extension, it's an easy way to connect to a remote DuckLake and query it](https://smithclay.github.io/duckdb-otlp/guides/query-with-quack/):

```sql
ATTACH 'quack:localhost:9494' AS otel_writer (TYPE quack);
FROM otel_writer.query(
  $$
  SELECT * FROM lake.main.otlp_logs
  WHERE service_name = 'quack-local-ducklake-demo'
  ORDER BY time_unix_nano DESC
  LIMIT 5
  $$
);
```

What people start building with Quack and how that changes duckdb architecture will be interesting to watch. For example, there's a [new extension that runs Tailscale directly in duckdb](https://github.com/Query-farm/quackscale), making it easy to transfer data and queries across networks and firewalls. The tip of the iceberg (pun intended).

### It's promising but early, more data needed

I think people are excited in the analytics space right now because there seems to be momentum in the direction of a vendor-neutral and cheap way to store and structured data, even if there's a lot of it.

In many ways, if you consider [ClickHouse](https://clickhouse.com/docs/use-cases/observability/clickstack), [Quickwit](https://quickwit.io/), [turbopuffer](https://turbopuffer.com/), or [LangChain's new tracing database](https://www.langchain.com/blog/introducing-smithdb) it technically already exists already minus the vendor-neutral and open standard part. The promise of Iceberg, DuckLake, or Delta Lake getting traction is that almost any major closed-source or open-source analytics tool or AI agent can query and read the data with SQL, even if it doesn't know what an OpenTelemetry trace is.

DuckLake and the new quack protocol have some emerging capabilities that could be compelling for ops teams stuck between running their own complex observability infrastructure (Kafka-esque) and paying huge monthly bills to vendors (canine-esque). More data and better benchmarks to validate that and understand how far you can scale up.

I hope this post gets people excited about working on open-source at the intersection of observability and analytics, which has the vibe right now of "something is happening". If you aggree, say hi on [duckdb discord](https://x.com/duckdb/status/1471806748814106624?lang=en) or [OpenTelemetry Slack](https://opentelemetry.io/community/end-user/#slack) or the other channels. 

PRs, feedback and benchmark ideas for [duckdb-otlp](https://github.com/smithclay/duckdb-otlp) are welcome.

Thanks for reading about my duck-pilled open-source project.
