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] introduce Timestamp() converter function #37112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented Jan 9, 2025

Description

Adds a new Timestamp(time, format) converter to convert any time to a human readable string with the specified format

Link to tracking issue

Fixes #36870

@odubajDT odubajDT marked this pull request as ready for review January 9, 2025 14:59
@odubajDT odubajDT requested a review from a team as a code owner January 9, 2025 14:59
}

func NewTimestampFactory[K any]() ottl.Factory[K] {
return ottl.NewFactory("Timestamp", &TimestampArguments[K]{}, createTimestampFunction[K])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use FormatTime instead? The word Timestamp can denote an integer representation of a time.

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.

Consider a Timestamp() or similar Converter in OTTL
3 participants