Skip to content

Conversation

@mheffner
Copy link
Contributor

@mheffner mheffner commented Dec 29, 2025

This PR primarily expands the Clickhouse exporter to support nested OTEL attributes. Prior to this, the exporter would simply convert Kvlist and Array attribute types to their JSON string representation. Now we expand these types into their native forms, flattening keys as needed. The JSON encoding was expanded to support JSON arrays. This work was mostly done to support upcoming Lamba forward support for Clickhouse logs.

Summary of changes:

  • Recursively flatten Kvlist attribute types, using JSON dot notation to represent flattened keys.
  • Support arrays when using the JSON column type and all the array values are of "simple" types. Add the detected rowbinary encoding format for JSON arrays. (We don't currently support Kvlist or Array types as array elements, they are encoded to JSON string format)
  • Remove the conversion to the ConvertedAttribute type when exporting in CH, go directly from Otel attributes to column type.
  • Add support for JSON bool to represent bool Otel attributes
  • Remove the json-underscore option, it was a poor attempt at reducing the JSON flattening server side and complicates implementation here.

Local performance tests show that CPU is not impacted before/after this change.

This also includes a config option that allows an external crate to disable the default OTLP receiver. This is only leveraged when the only receiver is the provided input logs rx channel.

@mheffner mheffner requested a review from rjenkins December 29, 2025 23:32
@mheffner mheffner merged commit 36eed59 into main Jan 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants