-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[question] how to control the "maximum number of batches stored to disk" independently of in-memory queue size while using persistent queue in "exporterhelper" (ClickHouseExporter) #29006
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
/label -bug |
Hello @ceevaaa, just a clarification first: Your config has two exporters, but no receivers. This is just a simplification since you're running multiple collectors, right? I did some reading any I believe I may have an answer. First of all, to enable the persistent queue for the ClickHouse exporter, you simply set the Once you've enabled the persistent queue for a component (the ClickHouse exporter in this example), there's no in-memory queue. This was made clear to me from the code here. The persistent queue works by adding everything it receives to persistent storage, and then when it's time to send data it will load a single batch directly from the persistent queue. This means you only have a single batch in memory at a given time, and all data goes to the persistent queue before actually being exported. (My logic here for in-memory batches is for a single consumer, but you may have more in-memory batches if multiple consumers are de-queueing from the persistent queue at the same time). One more thing, the ClickHouse exporter's README also explicitly states to use the batch processor. You can use the Does that all generally make sense? Feel free to let us know if you have any other questions. I'm not very familiar with these components, so someone else may correct me here or add more information as well. |
Apologies from my side for not mentioning the other details. The actual configs are too big, but nonetheless, I should have stated these things clearly. So,
So in conclusion, if you enable the persistent queue option, all the telemetry data is written to the persistent storage first and then is picked by the exporter (consumers - can be more than 1), sent to in-memory (in single batch per consumer) and exported. Regards, |
Yes, I believe your conclusion is correct. Let us know if you have any other questions, otherwise feel free to close the issue! |
Thanks for the help. |
**Description:** Minor clarifications in the README. 1. The [batch processor's option](https://github.com/open-telemetry/opentelemetry-collector/blob/8bea0d372c9965a99dd88d1f5c4c4b7acee9db40/processor/batchprocessor/config.go#L24) is named `send_batch_size`, not `batch_send_size`. 2. It may be obvious but I didn't instantly realize the sending queue is one or the other (in-memory or persistent). This adds a comment to make it clear. For reference, I'm adding this as a result of investigation for this issue: open-telemetry/opentelemetry-collector-contrib#29006
Component(s)
exporter/clickhouse, extension/storage, extension/storage/filestorage
What happened?
Design
At a macro level I am sending the telemetry data like this.
local Otel collector (otlp exporter) -> central Otel collector (clickhouse exporter) -> ClickHouse DB
Description
AIM - To control the number of batches of telemetry data that can be stored in
"independently" as and when there is an error in exportation due to various reasons.
Eg- I would want to have very less amount of data in-memory (say 1_000 batches) but I am okay with having 100_000 batches written to my persistent storage.
I am confused which exact parameter does that, as in the docs it says,
The maximum number of batches stored to disk can be controlled using sending_queue.queue_size parameter (which, similarly as for in-memory buffering, defaults to 1000 batches).
But I can only see one param in exporter helper that can change this (which I think will only change the in-memory queue size)
So my two questions are -
Regards,
Shiva Pundir
Collector version
v0.88.0
Environment information
No response
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: