-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Splunk HEC Exporter Transmission to HEC Endpoint Fails With Missing Body #29693
Comments
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Looks like #29551 was fixed in 0.89.0. I'm still on 0.88.0. I'll update first and report back. |
Sorry I misread that. I'm guessing it will be in the next release. Will try when it's available. |
I tried v0.91.0 and no longer receive an error but I can't find the log in Splunk. The log is still only transmitted and found in Splunk if I manually supply the body field in the log. I reverted to v0.88.0 to capture the error message below.
|
"I can't find the log in Splunk" - how are you looking for it? Can you elaborate? Please open a support case with Splunk to follow up. |
My Otel Collector sends logs to a Splunk Heavy Forwarder which then sends them to Splunk Cloud. I'm searching for the logs in Splunk Cloud. The logs with the missing body field cannot be found in the specified index and sourcetype on v0.91.0. If I manually edit the json to add the body field and then retransmit the log to my Otel Collector then I find that log in Splunk Cloud. I also checked the splunkd internal logs to see if I could find the reason but didn't find anything. I'll open a support case with Splunk. |
To be precise, there is no such thing as a "body" field. You are referring to the content of the value associated with the "event" key in the JSON object sent as a HEC event. Please let me know if I'm missing something in this clarification. |
Makes sense. I'm referring to the name of the field in Otel log data model. I believe the log is transformed to a HEC event by the Splunk HEC Exporter. |
This is resolved with #29551. Closing. |
Component(s)
exporter/splunkhec
What happened?
Description
Splunk HEC Exporter transmission to HEC endpoint fails when there is a missing
body
field. The otel logs data model lists body as an optional field. I'm using Faro Web SDK which has a log type (measurement) that does not contain abody
field.Steps to Reproduce
Transmit a log without a
body
field.Expected Result
OTLP logs received and exported with a missing body field should not fail transmission to a HEC endpoint. Perhaps a default value should be set. Alternative is that the HEC endpoint (ie Splunk Forwarder, Splunk Enterprise, Splunk Cloud, etc) should accept a missing body field. I have encountered this behavior with a Splunk Forwarder.
Actual Result
400 response code is returned stating bad data format.
Collector version
opentelemetry-collector-contrib:0.88.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: