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

Merged
merged 6 commits into from
Sep 25, 2024

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!

@SpencerTorres
Copy link
Member Author

@Frapschen @dmitryax Looking to get this and #35186 merged before next release, let me know if this looks good. They're pretty small changes

@dmitryax dmitryax requested a review from a team as a code owner September 25, 2024 00:17
@dmitryax dmitryax merged commit 1620fc6 into open-telemetry:main Sep 25, 2024
156 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 25, 2024
@SpencerTorres SpencerTorres deleted the update-trace-table branch September 25, 2024 23:27
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this pull request Oct 4, 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

---------

Co-authored-by: Dmitrii Anoshin <[email protected]>
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.

6 participants