Skip to content
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

fix(codecs): Fix gelf deserialization of subsecond timestamps #21613

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jszwedko
Copy link
Member

Fixes: #21610

@jszwedko jszwedko requested a review from a team as a code owner October 24, 2024 19:04
Comment on lines +210 to +211
#[serde_as(as = "Option<TimestampSecondsWithFrac<f64>>")]
timestamp: Option<DateTime<Utc>>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I brought in serde_with for custom deserialization rather than doing floating point arithmetic to preserve the precision of the timestamps.

Signed-off-by: Jesse Szwedko <[email protected]>
@datadog-vectordotdev
Copy link

Datadog Report

Branch report: jszwedko/fix-gelf-timestamp-deserialization
Commit report: 8031fa5
Test service: vector

✅ 0 Failed, 7 Passed, 0 Skipped, 25.52s Total Time

@jszwedko jszwedko added this pull request to the merge queue Oct 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 24, 2024
@jszwedko jszwedko added this pull request to the merge queue Oct 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 25, 2024
@pront pront added this pull request to the merge queue Oct 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GELF decoder lowers timestamp precision to seconds
2 participants