Skip to content
New issue

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

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

Already on GitHub? # to your account

[exporter/clickhouse] Add support for short data TTL #28675

Closed
Hazuwall opened this issue Oct 27, 2023 · 5 comments
Closed

[exporter/clickhouse] Add support for short data TTL #28675

Hazuwall opened this issue Oct 27, 2023 · 5 comments
Labels
enhancement New feature or request exporter/clickhouse good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Hazuwall
Copy link

Component(s)

exporter/clickhouse

Is your feature request related to a problem? Please describe.

I want to save disk space by reducing retention to several hours, which is more than enough for me. I cannot achieve this without manual schema migration or complex workarounds.

Describe the solution you'd like

It would be great to have the possibility to configure TTL by using a ttl_hours parameter instead of ttl_days if the duration is less than a day.

Describe alternatives you've considered

I have considered more general alternative approaches:

  • Allow the user to use a custom script for table creation. This seems like overkill and is not very convenient for both users and developers.
  • Add the TTL expression to the parameters. As I understand, this is not enough because the partition expression also needs to be changed. Additionally, I cannot imagine a use case for TTL other than days/hours.

Additional context

No response

@Hazuwall Hazuwall added enhancement New feature or request needs triage New item requiring triage labels Oct 27, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@dmitryax
Copy link
Member

This makes sense. I think TTL should be time.Duration field, not the days count. @Hazuwall do you have a chance to apply this change yourself? We would need to deprecate ttl_days (don't delete it for now) in favor of the new ttl option.

@Hazuwall
Copy link
Author

I will give it a try in my spare time. To be honest, I have limited experience in contributing to open-source projects and working with Golang, so it may take some time.

@dmitryax
Copy link
Member

dmitryax commented Oct 30, 2023

Timeline is not a problem. I don't think anyone else is interested in this. I can still put a help wanted label, maybe someone else can pick it up. Once you have time, please take a look at https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md before starting to work on it.

@dmitryax dmitryax added help wanted Extra attention is needed good first issue Good for newcomers and removed needs triage New item requiring triage labels Oct 30, 2023
@leartbeqiraj1
Copy link
Contributor

I will make this change within this week, or next week at the latest.

dmitryax pushed a commit that referenced this issue Nov 15, 2023
…trol (#29095)

**Description:**
Added support for more control over TTL configuration. Currently, it
supports timelines only in days, and now also in hours, minutes and
seconds.

**Link to tracking Issue:**
[28675](#28675)
RoryCrispin pushed a commit to ClickHouse/opentelemetry-collector-contrib that referenced this issue Nov 24, 2023
…trol (open-telemetry#29095)

**Description:**
Added support for more control over TTL configuration. Currently, it
supports timelines only in days, and now also in hours, minutes and
seconds.

**Link to tracking Issue:**
[28675](open-telemetry#28675)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request exporter/clickhouse good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants