[receiver/splunkhecreceiver] Updates Splunk receiver http status codes in order to be compliant with SplunkCloud #14469
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
TL;DR
This Pull Request makes Splunk receiver returns the same HTTP Status code as Splunk Cloud service
Problem:
SplunkCloud returns
200 OK
when you send requests to/{raw/events}
HTTP routes.Splunk receiver in the other hand returns
202 Accepted
. Based on that, consider a scenariowhere you are migrating from sending logs to SplunkCloud directly and starting to add one
Open Telemetry Splunk Receiver in between in order to modify data before proceeding towards SplunkCloud.
The observed side effects were that all clients stopped working because the response Status Code
was different from SplunkCloud itself. Thus, such migration wouldn't be transparent.
Link to tracking Issue: N/A
Testing:
No new tests were added. Although, all previous tests were updated to use
StatusOK
on its assertions.Documentation:
I didn't find any documentation regarding returning statuses codes for this particular receiver.
Examples
Event sent to Splunk Cloud directly
Same event sent to Splunk Receiver