-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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/azureeventhub] support parsing more time format #36762
Conversation
receiver/azureeventhubreceiver/azureresourcemetrics_unmarshaler.go
Outdated
Show resolved
Hide resolved
Please consider breaking this in 2 and having offset offered in a separate PR. |
Thanks @atoulme for the careful review! I've removed |
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.
looks good now. Some nits, but not necessary. Approved.
Hi @cparkins , could you help to take a look? thanks! |
…etry#36762) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Support parsing more time format by configuration instead of only iso8601. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#36650 <!--Describe what testing was performed and which tests were added.--> #### Testing - Added unit test for time parsing function - Validated locally to send data with time format in the issue and received successfully <!--Describe the documentation added.--> #### Documentation Add some new configurations, including `time_format` and `time_offset`. ```yaml receivers azureeventhub: connection: "xxxxx" format: "azure" # optional time_format: # All supported time format. Default is empty string array, which means using the current iso8601 parser. The format is based on https://pkg.go.dev/time#Layout. If no time-zone info, will use UTC time. logs: ["01/02/2006 15:04:05","2006-01-02 15:04:05","2006-01-02T15:04:05Z07:00"] metrics: [""] traces: [""] # optional time_offset: # The offset hours to parsed time. Mainly for cases when there's no time-zone info in time string. default is 0. logs: -8 metrics: +8 traces: -8 ``` <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Antoine Toulme <[email protected]>
…etry#36762) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Support parsing more time format by configuration instead of only iso8601. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#36650 <!--Describe what testing was performed and which tests were added.--> #### Testing - Added unit test for time parsing function - Validated locally to send data with time format in the issue and received successfully <!--Describe the documentation added.--> #### Documentation Add some new configurations, including `time_format` and `time_offset`. ```yaml receivers azureeventhub: connection: "xxxxx" format: "azure" # optional time_format: # All supported time format. Default is empty string array, which means using the current iso8601 parser. The format is based on https://pkg.go.dev/time#Layout. If no time-zone info, will use UTC time. logs: ["01/02/2006 15:04:05","2006-01-02 15:04:05","2006-01-02T15:04:05Z07:00"] metrics: [""] traces: [""] # optional time_offset: # The offset hours to parsed time. Mainly for cases when there's no time-zone info in time string. default is 0. logs: -8 metrics: +8 traces: -8 ``` <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Antoine Toulme <[email protected]>
Description
Support parsing more time format by configuration instead of only iso8601.
Link to tracking issue
Fixes #36650
Testing
Documentation
Add some new configurations, including
time_format
andtime_offset
.