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/ottl] Add new TruncateTime function #26696

Merged
merged 3 commits into from
Sep 20, 2023

Conversation

TylerHelmuth
Copy link
Member

Description:
To facilitate more time manipulation scenarios, this PR adds a new TruncateTime function that exposes Go's time.Truncate function .

Link to tracking Issue:
Related to:

Testing:
Added new unit tests

Documentation:
Updated ottlfunc readme

@fchikwekwe
Copy link
Contributor

LGTM. I was trying to think of other error cases to test, but time and duration do not really have null values. Maybe we can test a time value before the year 2000?

@TylerHelmuth
Copy link
Member Author

/cc @evan-bradley

@TylerHelmuth TylerHelmuth merged commit 8774c14 into open-telemetry:main Sep 20, 2023
90 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 20, 2023
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants