Page MenuHomePhabricator

Promise returned from LogEvent should resolve when logging is complete
Closed, DeclinedPublic1 Estimated Story Points

Description

LogEvent returns a promise, but right now it's always already resolved or rejected. It would be nice if it resolved after we knew the event had been logged. Can still resolve immediately when not tracking or using sendBeacon, but we should resolve when the image loads if using the fallback <img> tag method.

https://gerrit.wikimedia.org/r/238623

Event Timeline

Ejegg raised the priority of this task from to Needs Triage.
Ejegg updated the task description. (Show Details)
Ejegg subscribed.

Change 238623 had a related patch set uploaded (by Ejegg):
Resolve beacon promise async

https://gerrit.wikimedia.org/r/238623

Ejegg triaged this task as Medium priority.
Ejegg set Security to None.
Ejegg edited a custom field.

Change 238629 had a related patch set uploaded (by Ejegg):
Break out sendBeacon implementations

https://gerrit.wikimedia.org/r/238629

@awight, did you move this by mistake? I'm getting -1ed by nuria on the basis that 'LogEvent is supposed to be fire-and-forget', arguing to remove the promise entirely

Sorry, it looks like I never CR+1'd even, yeah still review or doing, then!

@Ejegg Thank you for your changes , sorry I could not get to review them sooner.

Seems to be a no-go in EventLogging, we'll just directly create the img in CentralNotice for non-beacon browsers.

Change 238623 abandoned by Ejegg:
Resolve beacon promise async

Reason:
Will implement this in CN instead

https://gerrit.wikimedia.org/r/238623

Change 238629 abandoned by Ejegg:
Break out sendBeacon implementations

https://gerrit.wikimedia.org/r/238629