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

[splunkhecreceiver] hec receiver handle raw should return JSON ok response #29745

Closed
splunkericl opened this issue Dec 11, 2023 · 4 comments
Closed
Labels
bug Something isn't working receiver/splunkhec

Comments

@splunkericl
Copy link
Contributor

Describe the bug
splunkhecreceiver has an endpoint /services/collector/raw. When ingest data successfully, it writes 200 http response wihtout http response body. This is inconsistent with the splunk enterprise/cloud behavior.

its sibling endpoint /services/collector/ returns http json response as well so it is also inconsistent.

Steps to reproduce
ingest an event log with /services/collector/raw endpoint:

curl --location 'localhost:8088/services/collector/raw?sourcetype=eric_test&index=main&source=postman' \
--header 'Content-Type: application/json' \
--data 'event1
event3'

What did you expect to see?
http json response with 200 status:

{
    "text": "Success",
    "code": 0
}

What did you see instead?
empty http response with 200 status

What version did you use?
Version: latest

What config did you use?
Config: any configs that spawn a hecreceiver

Additional context
essentially handleRawReq needs to write success response body here: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/splunkhecreceiver/receiver.go#L295

@splunkericl splunkericl added the bug Something isn't working label Dec 11, 2023
@atoulme atoulme transferred this issue from open-telemetry/opentelemetry-collector Dec 11, 2023
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@atoulme
Copy link
Contributor

atoulme commented Dec 11, 2023

Do you want to offer a patch @splunkericl ?

@splunkericl
Copy link
Contributor Author

@atoulme yeah our team can help out with this change some time this week.

dmitryax pushed a commit that referenced this issue Dec 15, 2023
**Description:**
Adds enhancement for splunk hec receiver raw path
- previously it returns no response in http body: it nows returns json
response

**Link to tracking Issue:**

#29745
@splunkericl
Copy link
Contributor Author

closing as the change has been merged in

cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this issue Jan 10, 2024
**Description:**
Adds enhancement for splunk hec receiver raw path
- previously it returns no response in http body: it nows returns json
response

**Link to tracking Issue:**

open-telemetry#29745
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/splunkhec
Projects
None yet
Development

No branches or pull requests

2 participants