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

[receiver/splunkhec] Splunk HEC HTTP server returns plain text instead of JSON #18097

Closed
hvaghani221 opened this issue Jan 30, 2023 · 3 comments

Comments

@hvaghani221
Copy link
Member

Component(s)

receiver/splunkhec

What happened?

Description

splunkhec receiver's HTTP server sends response as plain text but it sets the Content-Type as application/json.

For example, if the request is successful, an actual Splunk HEC returns {"text":"Success","code":0}, but the splunkhec receiver returns OK.

We should jsonify following response message with respect to an actual Splunk HEC response:

responseOK = "OK"
responseInvalidMethod = `Only "POST" method is supported`
responseInvalidEncoding = `"Content-Encoding" must be "gzip" or empty`
responseErrGzipReader = "Error on gzip body"
responseErrUnmarshalBody = "Failed to unmarshal message body"
responseErrInternalServerError = "Internal Server Error"
responseErrUnsupportedMetricEvent = "Unsupported metric event"
responseErrUnsupportedLogEvent = "Unsupported log event"

Collector version

v0.70.0

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@hvaghani221 hvaghani221 added bug Something isn't working needs triage New item requiring triage labels Jan 30, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label May 12, 2023
@github-actions
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants