Skip to content

Feature Request: Make logging to DDNoopRUMMonitor louder #978

Description

@dfed

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.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions