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(events): Ensure Event timestamp is sent as epoch milliseconds #201

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

felipecsl
Copy link
Member

Description

Event timestamp field should be sent as epoch milliseconds numeric value instead of datetime string.

Testing

Wrote a test

FF-3962

Copy link

changeset-bot bot commented Feb 6, 2025

🦋 Changeset detected

Latest commit: 1db3792

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
eppo_core Patch
ruby-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@felipecsl felipecsl requested a review from petzel February 6, 2025 03:10
@felipecsl felipecsl requested a review from rasendubi February 6, 2025 03:16
eppo_core/src/event_ingestion/event.rs Outdated Show resolved Hide resolved
eppo_core/src/lib.rs Outdated Show resolved Hide resolved
eppo_core/src/event_ingestion/event.rs Outdated Show resolved Hide resolved
@rasendubi
Copy link
Collaborator

@felipecsl @petzel Is there any reason we do numeric timestamps for event ingestion instead of strings as the rest of APIs?

@felipecsl
Copy link
Member Author

@felipecsl @petzel Is there any reason we do numeric timestamps for event ingestion instead of strings as the rest of APIs?

I can't recall any particular reason other than the fact that this navigates through multiple layers in the backend and having an epoch milliseconds number is easier to parse across multiple languages and frameworks I suppose.

@felipecsl felipecsl merged commit 1d310c7 into main Feb 6, 2025
34 checks passed
@felipecsl felipecsl deleted the ff-3962--timestamp branch February 6, 2025 21:12

#[serde_as]
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't need serde_as if we don't use serde_as attribute below (we're using serde(with))

Suggested change
#[serde_as]

pub payload: serde_json::Value,
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: please keep newlines at the end of files. Otherwise, git is detecting the last line as changes if we add new code after it (which results in dirty git history, which may hurt some git archeology in the future)

Copy link
Member Author

Choose a reason for hiding this comment

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

was unintentional 👍🏽

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.

2 participants