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

EventsSDK: create AnalyticsEventService #50

Closed
wants to merge 22 commits into from
Closed

Conversation

swong1213
Copy link
Contributor

Create AnalyticsEventService interface that will be implemented by AnalyticsEventReporter

J=FUS-5868
TEST=auto

@AjayBenno AjayBenno assigned swong1213 and unassigned swong1213 Aug 21, 2023
@@ -0,0 +1,23 @@
import {AnalyticsConfig} from "./AnalyticsConfig";
import {EventAPIResponse, EventPayload} from "./models";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you might need to rebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm rebasing adds all my previous commits to the list but I think I have to in order for the checks to pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'm just gonna start over with a new PR...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing this PR.

* @param payload - desired values to be applied. The new payload will
* override any overlapping values.
*/
report(payload: object): Promise<EventAPIResponse>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might misremembered this from sprint planning: Do we want EventAPIResponse with or without Promise? @mtian725

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alinayh you brought up a good point that I completely overlooked. Beacon doesnt return a promise. It just returns a boolean value but that boolean is whether or not the user agent is added to the request information successfully. It will still throw an error if the request fails, but we have no way to get the response body.

I discussed this with Ajay last night and we discuss how we might want to go about this because fetch with the keepalive flag is functionally equivalent, but firefox does not support this feature.

@swong1213 swong1213 closed this Aug 22, 2023
@swong1213 swong1213 deleted the service branch August 22, 2023 19:08
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.

None yet

4 participants