-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[receiver/splunkhecreceiver] timestamp accepts nano, micro, milli, and seconds #38637
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but can you update PR description?
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a bugfix changelog entry.
As the other commenter noted, this should also be fixed in the splunkhec_to_metricdata.go
file, otherwise this appears to be a valuable fix, thanks for the contribution.
func convertTimestamp(sec float64) pcommon.Timestamp { | ||
return pcommon.Timestamp(sec * 1e9) | ||
/* | ||
Splunk HEC timestamps can be in nanoseconds, microseconds, milliseconds, and seconds epoch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you happen to have a documentation link for this statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previous doc update missed milliseconds and that is being added. https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/FormateventsforHTTPEventCollector#Event_metadata
it uses the |
This comment was marked as resolved.
This comment was marked as resolved.
Please add a changelog entry, start by executing |
My bad. done |
…d seconds (open-telemetry#38637) …d seconds <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Splunk HEC accepts nano, micro, milli, and sec. It will now guess the time before converting it to nanoseconds. to prevent overflow. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes [36571](open-telemetry#36571) <!--Describe what testing was performed and which tests were added.--> #### Testing unit test <!--Describe the documentation added.--> #### Documentation https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/FormateventsforHTTPEventCollector#Event_metadata <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Antoine Toulme <[email protected]>
…d seconds (open-telemetry#38637) …d seconds <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Splunk HEC accepts nano, micro, milli, and sec. It will now guess the time before converting it to nanoseconds. to prevent overflow. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes [36571](open-telemetry#36571) <!--Describe what testing was performed and which tests were added.--> #### Testing unit test <!--Describe the documentation added.--> #### Documentation https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/FormateventsforHTTPEventCollector#Event_metadata <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Antoine Toulme <[email protected]>
…d seconds
Description
Splunk HEC accepts nano, micro, milli, and sec. It will now guess the time before converting it to nanoseconds. to prevent overflow.
Link to tracking issue
Fixes 36571
Testing
unit test
Documentation
https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/FormateventsforHTTPEventCollector#Event_metadata