Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/clickhouse] Upgrade trace table #34245

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

SpencerTorres
Copy link
Member

@SpencerTorres SpencerTorres commented Jul 25, 2024

This PR updates the default otel_traces table schema.

There are no breaking changes, this schema is compatible with the previous INSERT statement. This does not affect existing users, only new users that have create_schema enabled in the config.

Notable changes:

  • Optimized ORDER BY to use a 32 bit DateTime without TraceId
  • Reduced DateTime64(9) to DateTime on the trace timestamp table
  • TTLs now use Date instead of DateTime since parts will only be dropped on the partition date

No major column changes for now, but there were some small performance benefits observed with these changes.

As always, it is best to edit these tables to fit your needs and query patterns. I expect further changes in the future as we continue to optimize this table for a generalized use case.

Testing:
Integration tests are disabled, but I enabled them locally to test that this change works as intended.
Unit tests are passing as well.

Documentation:

  • Updated README
  • Example DDL has been updated, and now includes the trace timestamp table and materialized view

@atoulme
Copy link
Contributor

atoulme commented Aug 5, 2024

@Frapschen and @hanjm please review as codeowners

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Aug 21, 2024
@SpencerTorres
Copy link
Member Author

Not stale 👉

Collecting feedback internally/externally, will update soon. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants