Add Dangerbot rule to check additional properties being passed twice
The following discussion from !208043 (merged) should be addressed:
-
@nbelokolodov started a discussion: I see usability problem here, will create a follow up issue to address situations when developers mix old and new syntax to avoid confusion
Problem
With the new syntax where additional_properties
are extracted from args
its possible to developers to pass properties in the both parameters, for example
track_event('event',
user: user,
label: label, # new syntax
additional_properties: {
name: name # old syntax
}
)
in this situation label
will be lost since additional_properties
is provided
Desired Outcome
Design and implement a foolproof
solution for both tracking code syntaxes (old and new syntax) to coexists for some time before the old code will be migrated (potentially years)
Potential Solution
Solution 1:
We could merge explicit and implicit additional properties silently to avoid any tracking data loss. It solve the problem with developers using wrong syntax but the tracking code will be incorrect and potentially confusing.
Solution 2
Add Dangerbot rule to verify additional_properties
are not used with new syntax
Documentation Update Needed
-
Yes -
No