Skip to content

Conversation

JonasKunz
Copy link
Contributor

@JonasKunz JonasKunz commented Apr 23, 2025

What does this PR do?

Removes the 1000 character limit for capturing http client bodies via the capture_http_client_request_body_size.
This required the sending to switch from using a label to a new IntakeV2 field added in apm-server 8.18.

For backwards compatibility, a new capture_http_client_request_body_as_label option was added.

Checklist

  • This is an enhancement of existing features, or a new feature in existing plugins
    • I have updated CHANGELOG.next-release.md
    • I have added tests that prove my fix is effective or that my feature works
    • Added an API method or config option? Document in which version this will be introduced
    • I have made corresponding changes to the documentation
@github-actions github-actions bot added agent-java community Issues and PRs created by the community triage labels Apr 23, 2025

<!--DEPRECATIONS-END-->

# Breaking Changes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this needs either #4039 to be fixed before the next release or we'll have to update the docs manually on release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #4060

@JonasKunz JonasKunz removed community Issues and PRs created by the community triage labels Apr 23, 2025
@JonasKunz
Copy link
Contributor Author

Manually tested on an 8.18 cluster in addition to the unit tests.

With the capture_http_client_request_body_as_label flag on default (disabled):
image

With the flag enabled:
image

@JonasKunz JonasKunz marked this pull request as ready for review April 24, 2025 08:19
@JonasKunz JonasKunz requested a review from a team April 24, 2025 09:00
Comment on lines +315 to +316
Iterator<ByteBuffer> it = input.iterator();
while (it.hasNext()) {
Copy link
Member

Choose a reason for hiding this comment

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

[nit] I think we tend to rely more on traditional for loop to avoid allocating an iterator.

@SylvainJuge SylvainJuge merged commit af1aade into elastic:main Apr 29, 2025
27 checks passed
@JonasKunz JonasKunz deleted the large-request-bodies branch May 2, 2025 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants