-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Consider a Timestamp()
or similar Converter in OTTL
#36870
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
We likely need a |
I would like to take this issue if possible |
Just to clarify: The the first parameter in input should be an int64/string (Potentially Thanks. |
A time. |
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
Consider a use-case where we want to normalize too-old timestamps on incoming telemetry. For debugging purposes, we might want to keep a copy of the original timestamp. Since the original timestamp data is in nanoseconds since the epoch, the raw value can be hard for humans to interpret.
Describe the solution you'd like
We could consider adding a Converter to translate the nanosecond epoch back to a human-readable timestamp.
Timestamp()
, for example.Usage could be something like
where
target
is something liketime_unix_nano
andformat
is a string templating the timestamp. A syntax similar to that ofTime()
would be preferable.Describe alternatives you've considered
I attempted to use existing functions with the Transform processor, but the experience was...messy and would be difficult to debug:
Additional context
See CNCF Slack discussion here.
The text was updated successfully, but these errors were encountered: