Skip to content

Commit

Permalink
otel: fix fetch_limit calculation
Browse files Browse the repository at this point in the history
Signed-off-by: László Várady <[email protected]>
  • Loading branch information
MrAnno committed Sep 25, 2024
1 parent 87f77fa commit e9d7f43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/grpc/otel/otel-source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ syslogng::grpc::otel::SourceDriver::init()
msg_info("OpenTelemetry server accepting connections", evt_tag_int("port", port));

if (fetch_limit == -1)
fetch_limit = super->super.worker_options.super.init_window_size;
{
if (super->super.worker_options.super.init_window_size != -1)
fetch_limit = super->super.worker_options.super.init_window_size / super->super.num_workers;
else
fetch_limit = 100;
}

/*
* syslog-ng-otlp(): the original HOST is always kept
Expand Down

0 comments on commit e9d7f43

Please sign in to comment.