[exporter/clickhouse] Upgrade Logs Table (optimizations + full text search)#47720
Open
SpencerTorres wants to merge 6 commits intoopen-telemetry:mainfrom
Open
[exporter/clickhouse] Upgrade Logs Table (optimizations + full text search)#47720SpencerTorres wants to merge 6 commits intoopen-telemetry:mainfrom
SpencerTorres wants to merge 6 commits intoopen-telemetry:mainfrom
Conversation
…tor-contrib into upgrade_logs_table
…tor-contrib into upgrade_logs_table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Upgrades the default logs table schema for performance enhancements without breaking backwards compatability.
TYPE text(tokenizer = ...)full text search indexes; older versions fall back tobloom_filter/tokenbf_v1.TimestampTime, adds 8 materialized__otel_materialized_*columns for common k8s/deployment resource attributes, and changesORDER BYto(toStartOfFiveMinutes(Timestamp), ServiceName, Timestamp)to optimize time-bucketed range scans for Grafana/HyperDX workloads.fmt.Sprintfto Gotext/templatewith named fields and an{{ident}}helper for backtick identifier quoting.Existing tables are not modified, and the INSERTs are backwards compatible. The JSON pipeline gets the template changes but keeps its existing indexes since they don't apply to map types.
Technically this isn't a breaking change, but we can mark it as one so people are more aware of the changes. This should not affect existing deployments, these changes only apply to new deployments.
Testing
Added unit tests covering both index-rendering paths. Integration matrix updated to run against
26.2-alpine(full text search) and25.8-alpine(bloom_filter fallback).Documentation
Updated README to match new query recommendations, old queries are still functional.