Skip to content

feat: Support use of an alias field#600

Merged
ps863 merged 2 commits intoaws-observability:mainfrom
ps863:aliasusage
Mar 4, 2025
Merged

feat: Support use of an alias field#600
ps863 merged 2 commits intoaws-observability:mainfrom
ps863:aliasusage

Conversation

@ps863
Copy link
Copy Markdown
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 limhjgrace and williazz February 18, 2025 00:21
}

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

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
Copy Markdown
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
Copy Markdown
Collaborator

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

@ps863 ps863 changed the title chore: Support use of an alias field feat: Support use of an alias field Mar 3, 2025
@ps863 ps863 changed the base branch from main to release/1.20.x March 3, 2025 18:11
@ps863 ps863 changed the base branch from release/1.20.x to main March 3, 2025 18:11
@ps863 ps863 changed the base branch from main to release/1.20.x March 3, 2025 19:17
@ps863 ps863 changed the base branch from release/1.20.x to main March 3, 2025 19:22
@ps863 ps863 merged commit ff5fda4 into aws-observability:main Mar 4, 2025
3 checks passed
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