-
Notifications
You must be signed in to change notification settings - Fork 480
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
fix(tracker): metadata being overwritten #1792
base: main
Are you sure you want to change the base?
Conversation
* refactor(chalice): moved db_request_handler to utils package * refactor(chalice): moved db_request_handler to utils package fix(chalice): supported usability tests in EE
* refactor(chalice): moved db_request_handler to utils package * refactor(chalice): moved db_request_handler to utils package fix(chalice): supported usability tests in EE * refactor(crons): changed assist_events_aggregates_cron to have only 1 execution every hour refactor(crons): optimized assist_events_aggregates_cron to use only 1 DB cursor for successive queries
…nd performance filters at the same time (openreplay#1777)
* fix(ui): xray check for data load * fix(ui): api client catch errors
When calling multiple time metadata in a row for different metadata, I noticed that _sometime_ only the last metadata get registered. Sending all metadata on update fixes it. There might be another way 😄
WalkthroughThe update in the codebase involves a refinement to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files selected for processing (1)
- tracker/tracker/src/main/app/session.ts (1 hunks)
Additional comments: 1
tracker/tracker/src/main/app/session.ts (1)
- 78-80: The change to pass the entire
metadata
object tohandleUpdate
is consistent with the PR's objective to address the issue of metadata updates not being registered correctly. This should ensure that all metadata changes are captured, even when they occur in quick succession.
https://docs.openreplay.com/en/sdk/set-metadata/ There is an API limitation regarding that, |
I don't understand how that is related to my issue, my current problem is that when you call: setMetadata('a', 1);
setMetadata('b', 1);
setMetadata('c', 1);
setMetadata('d', 1); It will call handleUpdate with handleUpdate({ metadata : { a: 1 } });
handleUpdate({ metadata : { b: 1 } });
handleUpdate({ metadata : { c: 1 } });
handleUpdate({ metadata : { d: 1 } }); And I end up with only My "fix" isn't clean but sends this instead handleUpdate({ metadata : { a: 1 } });
handleUpdate({ metadata : { a:1, b: 1 } });
handleUpdate({ metadata : { a:1, b: 1, c: 1 } });
handleUpdate({ metadata : { a:1, b: 1, c: 1, d: 1 } }); And now all the metadata are set properly... |
Yes indeed this would help @Titozzz if we were sending everything at once, but metadata is sent as single k-v pair message, so in reality this will only cause tracker to send previously sent pairs every time you add a new one, so in the end it will not change the end result, but will cause message duplication (which then leads to added processing time and costs - even if its small, its visible on large scale) This message is then being sent to /ingest point, parsed along side with other messages and (iirc) appended into metadata column in db afterwards. So if you happen to see missing metadata in sessions, there could be another issue involved in that, which I will be happy to investigate with you |
Happy to debug further then. I'm also available on Slack if that helps, feel free to DM |
When calling multiple time metadata in a row for different metadata, I noticed that sometime only the last metadata get registered. Sending all metadata on update fixes it. There might be another way 😄
Summary by CodeRabbit