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

Configuration to support pushing logs to multiple databases/tables using a single CH exporter config. #34904

Closed
tmal94 opened this issue Aug 28, 2024 · 4 comments

Comments

@tmal94
Copy link

tmal94 commented Aug 28, 2024

Component(s)

exporter/clickhouse

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

We are using CH exporter to route/push logs to different databases/tables based on certain conditions/filter. Below is an example config.

    clickhouse/test1:
      create_schema: false
      database: xxxx
      endpoint: http://host?dial_timeout=10s&compress=lz4&async_insert=1
      logs_table_name: logs1
      retry_on_failure:
        enabled: true
        initial_interval: 5s
        max_elapsed_time: 300s
        max_interval: 30s
      sending_queue:
        queue_size: 10
      timeout: 60s
      ttl: 168h
    clickhouse/test2:
      create_schema: false
      database: xxxx
      endpoint: http://host?dial_timeout=10s&compress=lz4&async_insert=1
      logs_table_name: logs2
      retry_on_failure:
        enabled: true
        initial_interval: 5s
        max_elapsed_time: 300s
        max_interval: 30s
      sending_queue:
        queue_size: 10
      timeout: 60s
      ttl: 168h

Describe the solution you'd like

Since every time we add a new table or database in the config we end up copying the same set of exporter configuration which makes the resultant config bulky and error prone. So as a part of solution we would want to define the CH exporter config once and define multiple tables based on labels/markers.

Describe alternatives you've considered

No response

Additional context

No response

@tmal94 tmal94 added enhancement New feature or request needs triage New item requiring triage labels Aug 28, 2024
Copy link
Contributor

Pinging code owners:

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

@SpencerTorres
Copy link
Member

Have you tried YAML anchors or similar syntax for reusing parts of the config? (I'm not sure if the parser handles this syntax)

You could also do multiple materialized views that receive logs in a single table and then forwards them into multiple tables, but this may slightly affect the overall architecture that you're going for

@Frapschen Frapschen added question Further information is requested and removed needs triage New item requiring triage enhancement New feature or request labels Aug 30, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Oct 29, 2024
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@SpencerTorres @Frapschen @tmal94 and others