You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
run otel with splunkhecreceiver
curl -X POST http://localhost:8088/services/collector -d '{"time":1732604863241,"event":"data","source":"test","sourcetype":"test","host":"test","index":"main"}'
timestamp for the event is now 9223372036854774
Expected Result
1732604863241000000
Tuesday, November 26, 2024 7:07:43.241 UTC
Actual Result
9223372036854774
Friday, April 11, 2262 11:47:16.854 UTC
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: