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/add timestamp to track #165

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

Conversation

nhausman1
Copy link

Python SDK

What did you accomplish?

Currently the timestamp for an event is hardcoded as the current time in the track function. This means that you cannot backdate events if, for example, you wanted to run a script every 24 hours that gathers/calculates relevant events and push them to Split. This backdating feature is however supported in Split's JSON Rest API so it will be great to have similar access through the simplified Python API.

Note that this change is non-breaking as I've implemented the logic such that when timestamp isn't specified the logic falls back to time.time().

How do we test the changes introduced in this PR?

Standard build script/test suite. I've added tests for both positive and negative cases.

@mredolatti
Copy link
Contributor

Hi @nhausman1 ,
Thank you very much for reaching out with this proposal, I will check with our product side to validate whether they're ok with accepting this functionality, and come back to you.

Regards,
Martin.

@mredolatti
Copy link
Contributor

Hi @nhausman1

While this is something that might be supported on future releases, currently it's still being discussed. I've talked with the SDK PM and we created feature request for this, which would help the product team prioritize it properly.
Unfortunately, we cannot just include your pull request until we figure out how the API will change, and what the exact functionality will be, since this will affect all SDKs and we need to maintain a certain level of consistency between them.

We're truly sorry for any inconveniences this may cause. If all you need to do is to send previously captured events in batches, we can work with you on a small wrapper for our API.

We'll keep your request in mind and probably reach out to you looking for feedback when we start working on the final design for this feature.

Thank you very much for understanding.
Regards,
Martin.

@chillaq
Copy link
Contributor

chillaq commented Dec 13, 2022

Hi @nhausman1, Just want to let you know that our Admin API do support posting bulk events allowing specifying the event timestamp.
Checkout this article for more info: https://help.split.io/hc/en-us/articles/9143779240845-Sending-event-data-using-the-Admin-API

Thanks
Bilal

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.

3 participants