You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using segment-analytics-python 2.2.3 in my FastAPI project.
When doing two successive track calls, only the first one is saved to my sources on app.segment.com
To reproduce run something like
importsegment.analyticsassegment_analyticsfromfastapiimportFastAPIfrompydanticimportBaseModelapp=FastAPI()
segment_analytics.write_key="YOURKEY"@app.post("/index")asyncdefindex(payload: BaseModel, uid):
segment_analytics.track(uid, "Opened index")
segment_analytics.track("anonymous", "Data for opened index", payload.dict())
Side note: My goal is to associate user actions with users and also track payloads (not associated to users).
Hack that does not suffice:
The second call is only tracked if I do something in between calls, e.g.
this works perfectly fine:
importtimesegment_analytics.track(uid, "Opened index")
time.sleep(2)
segment_analytics.track("anonymous", "Data for opened index", payload.dict())
Things I have tried (didn't work):
Waiting for the next batch to arrive in my dashboard
Flushing the queue of the client
Create two clients (one for each call)
The text was updated successfully, but these errors were encountered:
I am using segment-analytics-python 2.2.3 in my FastAPI project.
When doing two successive track calls, only the first one is saved to my sources on app.segment.com
To reproduce run something like
Side note: My goal is to associate user actions with users and also track payloads (not associated to users).
Hack that does not suffice:
The second call is only tracked if I do something in between calls, e.g.
this works perfectly fine:
Things I have tried (didn't work):
The text was updated successfully, but these errors were encountered: