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/splunk_hec] Add a new option to limit bytes sent per HTTP connection #33586

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Jun 16, 2024

Description:
Add a new configuration option max_per_conn.
This new option enforces that each HTTP connection is rotated after sending a number of bytes.
By default, this limit is not set.

Testing:
Unit tests

Documentation:
Added to README.md

@atoulme atoulme requested review from dmitryax and a team as code owners June 16, 2024 14:27
@atoulme atoulme force-pushed the hec_limitcontent branch 5 times, most recently from 42d7da0 to 94b2516 Compare June 18, 2024 05:14
}

if hec.contentLimit != nil {
newSent := hec.eventBytesSent.Add(int64(payloadSize))
Copy link
Member

@dmitryax dmitryax Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We count bytes by hec client, not by connection. So, it can drain any random connection the client obtains. Let me know if I'm missing something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the connection is reused by the HTTP client though. Can we not assume the HTTP client is using the same HTTP connection over multiple HEC worker uses?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think can, it must be a pool of connections

Copy link
Contributor

github-actions bot commented Jul 3, 2024

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 Jul 3, 2024
@atoulme atoulme removed the Stale label Jul 13, 2024
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.

None yet

3 participants