-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Delay journey finish #140383
Delay journey finish #140383
Conversation
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-operations (Team:Operations) |
Apologies for the delay in my response, just confirming that the browser side does buffer all the events for 1 second: kibana/packages/analytics/shippers/elastic_v3/browser/src/browser_shipper.ts Lines 106 to 107 in 9f0a9e7
There is a tear-down logic that should attempt to send all pending events. This is called in the |
@afharo any chance we could get a global method we could call to flush the buffer, that returns a promise which resolves when the items in the buffer have been sent? It's probably not critical, but if we could call such a method from playwright then we could be very confident all telemetry produced during the test was sent without needing to worry about non-deterministic timers. |
I'm not familiar with playwright and the scope it runs (which methods it can see and call). But happy to explore the option. We could also expose an emitter from the client or log something whenever we are done shipping all the events in the queue. Can you create an issue so we can discuss our options? |
Issue: #140521 |
This PR aims to add delay to journeys which are closing before ongoing requests to telemetry clusters finishes.
Note: We are not sure if browser buffers the event requests to server, if that is the case we have to check if buffer cleaned up. Looking for more information how analytics client sending these requests, @afharo can provide more context around that.
Fixes: #140253