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

[Feature Request] Add unix timestamp in milliseconds in websocket event data #755

Open
oakoudad opened this issue Jan 23, 2025 · 5 comments
Labels
engine:ALL Related to all engines or basic mechanisms enhancement New feature or request patron:PLUS

Comments

@oakoudad
Copy link

oakoudad commented Jan 23, 2025

There is any way to get unix timestamp in milliseconds in websocket event data, like webhooks i can get it from request headers (X-Webhook-Timestamp)

Because sometimes a second event may enter before the first.

patron:PLUS

@oakoudad oakoudad added the question Further information is requested label Jan 23, 2025
@devlikepro
Copy link
Contributor

devlikepro commented Jan 24, 2025

Hi! yes, it's possible. What events you're interested in?
We'll add timestampMs in those (we'll check all, but may be you have in mind the list of frequirently used events)

patron:PRO

@devlikepro devlikepro added enhancement New feature or request engine:ALL Related to all engines or basic mechanisms and removed question Further information is requested labels Jan 24, 2025
@oakoudad
Copy link
Author

I think all events are fine, but for now, I need this feature in a session state.

@devlikepro
Copy link
Contributor

devlikepro commented Jan 24, 2025

got it!
could you open a feature request for that (you can just reopen this issue, that's fine). Otherwise we'll forget it :D

patron:PRO

@oakoudad oakoudad changed the title [Question] There is any way to get unix timestamp in milliseconds with websocket event data [Feature Request] Add unix timestamp in milliseconds in websocket event data Jan 25, 2025
@oakoudad oakoudad reopened this Jan 25, 2025
@oakoudad
Copy link
Author

oakoudad commented Jan 25, 2025

Thank you so much for this support

patron:PLUS

@devlikepro
Copy link
Contributor

devlikepro commented Mar 6, 2025

Hi! We'll add event.timestamp in webhooks + websocket data in the next release.

Right now you can use event.id as identifier for that, because it uses lower-cased ulid under the hood - Lexicographically Sortable Identifier
https://github.com/ulid/spec

It means that you can just compare with > and < two event.id (as strings) and it'll show you which one's issued early or later.

patron:PRO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine:ALL Related to all engines or basic mechanisms enhancement New feature or request patron:PLUS
Projects
None yet
Development

No branches or pull requests

2 participants