-
Notifications
You must be signed in to change notification settings - Fork 6
Implementation of timestamps. #11
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
Conversation
|
Thanks for the contribution! I agree that the cfg compilation check was an oversight and should be added. Please separate out that from the timestamp addition into different PRs. I'm not yet convinced timestamps are worth adding and need time to consider your implementation. |
|
Thank you for your feedback! Should I close this PR and open two new ones? |
whichever way is easier for you, I dont have a preference. As long as its one topic per PR |
|
Closes #10 |
ew function in LineProtocol.
|
what happens when you have more than one timestamp struct attr? Ex., struct Foo {
a: String,
#[telegraf(timestamp)]
t1: u32,
#[telegraf(timestamp)]
t2: u32,
}obviously thats not intended to be used that way, but curious what it does and what unintended behavior there might be. |
Only the last one specified will be used. |
Co-authored-by: maxmindlin <35264981+maxmindlin@users.noreply.github.com>
| #[allow(unused_mut)] | ||
| let mut timestamp: Option<u64> = None; | ||
| $( | ||
| timestamp = timestamp.or(Some($ts)); | ||
| )? | ||
|
|
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.
I think this could be done differently, but honestly I'm so rusty at macros that I cant remember how. We should be able to just use $ts but the macro thinks its repeating, which it should not be (there should be only 1 timestamp).
|
I think we are about there. Could you resolve the conflicts to allow for the CI to run? Thanks |
|
Looks good! Thanks for the contribution |
No description provided.