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

chore: Support use of an alias field #600

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

Conversation

ps863
Copy link
Member

@ps863 ps863 commented Feb 17, 2025

This PR adds support for the use of alias field to send with PutRumEvents request. Docs will follow in another PR


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ps863 ps863 requested review from williazz and limhjgrace February 18, 2025 00:21
@@ -224,6 +224,15 @@ export class Dispatch {
}

private createRequest(): PutRumEventsRequest {
if (this.config.alias) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Issue(small): we need to be mindful about the number of lines we add to this package. Pretty sure we can just go ahead and add Alias like this. If it's undefined, then it won't be included.

Suggested change
if (this.config.alias) {
private createRequest(): PutRumEventsRequest {
return {
BatchId: v4(),
AppMonitorDetails: this.eventCache.getAppMonitorDetails(),
UserDetails: this.eventCache.getUserDetails(),
RumEvents: this.eventCache.getEventBatch(),
Alias: this.config.alias
};
}

Copy link
Member Author

Choose a reason for hiding this comment

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

good callout. updated

@williazz
Copy link
Contributor

Oh this should be a feature by the way, not a chore

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