-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(processors.timestamp): Introduce timestamp processor #15094
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @powersj! Just a few comments/questions from my side...
@srebhan if you could take another look I would apprecaite it. Not sure about the destination timezone handling and if I could re-use anything we already have? |
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks @powersj!
Summary
The following introduces a new timestamp processor. This allows a user to specify a field which contains a timestamp and convert it from one format to another. Traditionally telegraf assumes data has a single timestamp and uses that as the timestamp for the metric itself. However, if a user's data contains additional timestamps that they also wish to parse into a different format, there was no existing method for that.
The date processor exists today to take a metric's timestamp and add a tag or field with a subset of that timestamp. Trying to adapt that config to do both features made for a complex configuration that was not straightforward and error prone.
Checklist
Related issues
resolves #10524