-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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/splunkhecreceiver] timestamp overflows when not in seconds #36571
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Looking at https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/FormateventsforHTTPEventCollector, It says
Also, the examples uses seconds for ccing @atoulme as he might have more thoughts on this. |
Splunk will accepts milli, micro, nano and will be aware to parse it to valid epoch time. |
IIRC I asked if you would you please update the docs, which are serving as the spec for HEC. As @VihasMakwana pointed out the time field documentation is:
If this can please be clarified, then we can go for those changes. |
@atoulme @VihasMakwana HEC Documentation has been updated to reflect stated issue https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/FormateventsforHTTPEventCollector#Event_metadata |
Component(s)
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/8e0ea012fe93a272b78e27a94e690084538b0963/receiver/splunkhecreceiver
What happened?
Description
Splunk HEC allows
time
to be nanosecond, microsecond, millisecond and in second. splunk to log/metric converters assumes all time is in seconds:opentelemetry-collector-contrib/receiver/splunkhecreceiver/splunk_to_logdata.go
Line 57 in 8e0ea01
opentelemetry-collector-contrib/receiver/splunkhecreceiver/splunkhec_to_metricdata.go
Line 122 in 8e0ea01
The receiver should not assume all incoming time is in second and cause overflow by trying to convert
time
to nanosecond before confirming the time unit.Steps to Reproduce
Expected Result
1732604863241000000
Tuesday, November 26, 2024 7:07:43.241 UTC
Actual Result
9223372036854774
Friday, April 11, 2262 11:47:16.854 UTC
Collector version
1.0.9
Environment information
Environment
Debian Bookworm
go 1.22
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: