Use consistent API schema between @datadog/mobile-react-navigation
and @datadog/browser-rum
#552
Labels
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Currently there is a significant amount of divergence between the config schema + method names in
@datadog/mobile-react-navigation
and@datadog/browser-rum
— and this creates extra implementation / maintenance overhead for users who are working on cross-platform expo apps (Web, iOS, Android).For example: every time there's an update to any of the datadog RUM packages, where config has changed, we need to review the configuration and figure out which entries are still valid between the different RUM client packages.
Describe the solution you'd like
It would be great if the configuration schema + method names were the same between the RUM clients — and where they are not the same, it would be great if the differentiation were clearer.
I've outlined the differences here:
API Mismatch Summary
Native- vs web-specific config
nativeCrashReportEnabled
version
(recently added!)Overlapping config
service
vsserviceName
firstPartyHosts
vsallowedTracingOrigins
orsiteParameter
vssite
trackErrors
vsforwardErrorsToLogs
Misc Other Issues
@datadog/browser-logs
@datadog/mobile-react-navigation
In particular, it'd be cool to align the schema for these properties
service
vsserviceName
firstPartyHosts
vsallowedTracingUrls
Describe alternatives you've considered
Initially I tried to create a single abstraction for RUM client config, but I realized that the properties changed too much and weren't safe to assume as equivalent.
So now I have a subset of core properties that are shared:
env
service
applicationId
clientToken
version
And for everything else I have platform-specific config objects, so my abstraction looks approximately like this:
Thanks!
The text was updated successfully, but these errors were encountered: