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

Add flag for limiting OTLP request size #6333

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

SungJin1212
Copy link
Contributor

@SungJin1212 SungJin1212 commented Nov 12, 2024

This PR adds -distributor.otlp-max-recv-msg-size flag to limit OTLP request size in bytes like the Prometheus remote write push.

Also, it adds otlp body decompression logic tests.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@SungJin1212 SungJin1212 changed the title Add OTLP message limit Add flag to limit OTLP request size Nov 12, 2024
@SungJin1212 SungJin1212 changed the title Add flag to limit OTLP request size Add flag for limiting OTLP request size Nov 12, 2024
@SungJin1212
Copy link
Contributor Author

@friedrichg
Could you please take a look?

Copy link
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

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

Love the tests!. One nit regarding readAll

pkg/util/push/otlp.go Outdated Show resolved Hide resolved
pkg/util/push/otlp.go Outdated Show resolved Hide resolved
@SungJin1212 SungJin1212 force-pushed the Add-OTLP-message-limit branch from 222c82d to ae08736 Compare November 14, 2024 02:53
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Thanks a lot!
I will leave to @friedrichg to merge it.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 14, 2024
Copy link
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

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

Thanks for accepting and implementing my suggestion!

@friedrichg friedrichg merged commit b8156a0 into cortexproject:master Nov 15, 2024
16 checks passed
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

Sorry I think I misunderstood this PR. Should we use the same max_recv_msg_size config for different formats?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/distributor lgtm This PR has been approved by a maintainer size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants