Skip to content
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/stanza] Move core time parsing capabilities to coreinternal #23232

Merged

Conversation

TylerHelmuth
Copy link
Member

@TylerHelmuth TylerHelmuth commented Jun 8, 2023

Description:
Moves strptime and native Go format parsing from stanza's TimeParser struct to coreinternal so it can be used by OTTL.

To keep the PR as small as possible and to reduce risk only the strptime and go parsing capabilities are shared. Maybe more can be moved in the future, but these are currently the only pieces OTTL needs. The implementation in timeutils also tries to be as similar to the original implementation as possible.

The TimeParser API is unchanged so this should not be a breaking change.

Issue
Unblocks #22811, which needs this functionality to parse time the same way as stanza.

@TylerHelmuth TylerHelmuth added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jun 8, 2023
@TylerHelmuth TylerHelmuth force-pushed the move-timeparser-to-internal branch 2 times, most recently from f9a0196 to 83bbbe7 Compare June 8, 2023 14:22
@TylerHelmuth TylerHelmuth marked this pull request as ready for review June 8, 2023 14:24
@TylerHelmuth TylerHelmuth requested review from a team June 8, 2023 14:24
@TylerHelmuth TylerHelmuth force-pushed the move-timeparser-to-internal branch from 3a06d91 to de266b6 Compare June 8, 2023 20:46
@TylerHelmuth TylerHelmuth merged commit c67489a into open-telemetry:main Jun 9, 2023
@TylerHelmuth TylerHelmuth deleted the move-timeparser-to-internal branch June 9, 2023 17:43
@github-actions github-actions bot added this to the next release milestone Jun 9, 2023
Caleb-Hurshman pushed a commit to observIQ/opentelemetry-collector-contrib that referenced this pull request Jul 6, 2023
…n-telemetry#23232)

* Move core time parsing capabilities to coreinternal

* Add clarifying comment

* Apply suggestions from code review

Co-authored-by: Curtis Robert <[email protected]>

* Replace StrptimeToGo with ParseStrptime

* remove changelog

---------

Co-authored-by: Faith Chikwekwe <[email protected]>
Co-authored-by: Curtis Robert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants