dd-sdk-flutter icon indicating copy to clipboard operation
dd-sdk-flutter copied to clipboard

[RUM][Mobile + Web] Custom attribute's value is being updated

Open toussam opened this issue 1 year ago • 9 comments

Hi 👋

Describe what happened We are tracking views and providing additional information using custom attributes. Among them, we have attributes provided for specific views and others who are "general" custom attributes being applied on all views' tracking using the rum's addAttribute method.

We noticed that if we set up or update a "general" custom attribute after tracking a view then the said custom attribute's value linked to this last event will be updated.

Steps to reproduce the issue:

  • set up a custom attribute using the addAttribute method (we used a string type for the attribute's value)
  • track a view using the startView method
  • update the custom attribute with a different value
  • notice that the custom attribute displayed into the rum's view event is set with the updated value

Describe what you expected: The tracked view event's should contain the custom attribute with the initial value and not the updated one.

Additional context

  • Dart/Flutter version: 3.2.6 / 3.16.9
  • Android/iOS OS version: any? - currently handling iOS 13.0+ and Android 6.0+ (and noticed on Web too)
  • Device Model: any
  • Datadog SDK version: 2.2.0
  • Versions of any other relevant dependencies: N/A

Thanks in advance for your investigation and future response. 🙏

Best regards,

toussam avatar Feb 21 '24 13:02 toussam