You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Timestamp(target, format)
where target is something like time_unix_nano and format is a string templating the timestamp. A syntax similar to that of Time() 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:
We likely need a FormatTime function that uses https://pkg.go.dev/time#Time.Format, but instead of Go's time format string uses that same formatting as our Time function.
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: