Background
Today, accidentally logging user actions or errors to the DDNoopRUMMonitor does not alert developers of API misuse – developers are only warned when startView events are propagated to it.
When an engineer accidentally retains an instance of Global.rum prior to running Global.rum = RUMMonitor.initialize(), they capture a DDNoopRUMMonitor instance. If an engineer then logs a user action or error to this rum instance, no warnings appear in the console, and of course no logs appear in DataDog dashboards either.
The baseline request
Update DDNoopRUMMonitor to alert a developer that they are misusing the DataDog SDK when any event (and not just startView) is sent to the DDNoopRUMMonitor. I'd be happy to put up a PR to accomplish this if the proposal is well received by maintainers.
The stretch request
Given that console logs might get lost in apps that log a lot to the console, and that errors routed to a Global.rum instance are explicitly high-priority events, ideally DDNoopRUMMonitor's addError implementation would trigger an assertionFailure(...). Again, I'd be happy to put up a PR to accomplish this if the proposal is well received by maintainers.
Background
Today, accidentally logging user actions or errors to the DDNoopRUMMonitor does not alert developers of API misuse – developers are only warned when
startViewevents are propagated to it.When an engineer accidentally retains an instance of
Global.rumprior to runningGlobal.rum = RUMMonitor.initialize(), they capture aDDNoopRUMMonitorinstance. If an engineer then logs a user action or error to thisruminstance, no warnings appear in the console, and of course no logs appear in DataDog dashboards either.The baseline request
Update
DDNoopRUMMonitorto alert a developer that they are misusing the DataDog SDK when any event (and not juststartView) is sent to theDDNoopRUMMonitor. I'd be happy to put up a PR to accomplish this if the proposal is well received by maintainers.The stretch request
Given that console logs might get lost in apps that log a lot to the console, and that errors routed to a
Global.ruminstance are explicitly high-priority events, ideallyDDNoopRUMMonitor'saddErrorimplementation would trigger anassertionFailure(...). Again, I'd be happy to put up a PR to accomplish this if the proposal is well received by maintainers.