-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[pkg/ottl] Adapt time parsing error messages to include the ctime directives #38425
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
[pkg/ottl] Adapt time parsing error messages to include the ctime directives #38425
Conversation
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…rmat Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Moving to draft while you address the conflict and review, please mark ready for review once addressed. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…ssages' into feat/35176/time-parse-error-messages
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, just left some final suggestions.
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
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.
Thank you for working on that, LGTM!
…ectives (open-telemetry#38425) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adapts the `Time` function to check for `time.ParseError` errors. If such an error is received by the function, it wraps it into a custom error type in order to include the provided ctime layout string instead of the go-native layout string. <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#35176 <!--Describe what testing was performed and which tests were added.--> #### Testing Adapted the unit tests of the `Time()` function --------- Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Description
This PR adapts the
Time
function to check fortime.ParseError
errors. If such an error is received by the function, it wraps it into a custom error type in order to include the provided ctime layout string instead of the go-native layout string.Link to tracking issue
Fixes #35176
Testing
Adapted the unit tests of the
Time()
function