-
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
[pkg/ottl] Add ottlfuncs to support time.Second and time.Nanosecond #37042
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hi @r0mdau, would #36870 solve this issue? It seems the goal is the same, supporting time formatting similar to https://pkg.go.dev/time#Time.Format. |
Hi @edmocosta yes that would do the trick for my use case. In the other hand, why not implementing those 2 missing converters ? ps: I have them working in an internal fork Second converter Nanosecond converter |
I agree with you, I think those converters might be useful. Let's wait for the code owners thoughts. |
We definitely need to do #36870, but since we already have Minute, Day, Month, and Year we can also add Second and Nanosecond. |
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
Be able to add the current time generated by function
Now()
as a string in an attribute in a log context.Example configuration:
Describe the solution you'd like
Create 2 new OTTL functions:
Describe alternatives you've considered
As an alternative, I am using the following configuration
But it does not help to have a custom string format like needed by some systems I work with.
Additional context
If this change is accepted, I would like to contribute.
The text was updated successfully, but these errors were encountered: