Closed qhanam closed 4 months ago
Question: can the override logic be implemented by swapping these two lines instead? https://github.com/aws-observability/aws-rum-web/pull/508/files#diff-93123c2ab6bd111166aa9a50cf26e70a2ee8db05649d6f23e8a4c819a6c3a56fR208-R209
can the override logic be implemented by swapping these two lines instead?
The only other attributes that could be overridden are pageId
and pageTags
. These are passed as arguments to recordPageView
along with the custom attributes, and so in the original spec we decided that the arguments would take precedence over the attributes.
For every page view, the web client updates the
title
attribute with the value inwindow.document.title
. This means that thetitle
attribute still cannot be overridden (i.e., #430 did not actually solve #493).This change allows the
title
attribute to be overridden whenrecordPageView
is used.Before
After
Discussion
Options for fixing this include the following.
All of these options have problems.
I am recommending option (4), because it has the least risk with respect to backwards compatibility.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.