Skip to content
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

Warn when DDNoopRUMMonitor is sent any DDRUMMonitor methods #1007

Merged
merged 2 commits into from
Sep 21, 2022
Merged

Warn when DDNoopRUMMonitor is sent any DDRUMMonitor methods #1007

merged 2 commits into from
Sep 21, 2022

Conversation

dfed
Copy link
Contributor

@dfed dfed commented Sep 20, 2022

What and why?

This PR resolves the baseline request in #978 by calling warn() when any method vended by DDRUMMonitor is called on an instance of DDNoopRUMMonitor.

This change will make it more obvious when a DDNoopRUMMonitor has been captured and is being utilized accidentally.

How?

I copied over all methods from DDRUMMonitor into DDNoopRUMMonitor, replaced public with override, and called warn() within each method body.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes – N/A

Custom CI job configuration (optional)

  • Run unit tests
  • Run integration tests
  • Run smoke tests

@dfed dfed marked this pull request as ready for review September 20, 2022 15:04
@dfed dfed requested a review from a team as a code owner September 20, 2022 15:04
@dfed
Copy link
Contributor Author

dfed commented Sep 20, 2022

I could use help understanding what about the Bitrise job failed – I don't have permissions to view the failure message, and the unit test I updated succeeds on my machine.

Copy link
Member

@maxep maxep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dfed ! Thank you so much for this contribution 👍

Indeed, our CI requires a manual trigger before running external PRs. It looks great, only the linter is failing because of that extra line break. After that, it would be good for merging.
Thanks again!

Sources/Datadog/RUM/RUMMonitor/DDNoopRUMMonitor.swift Outdated Show resolved Hide resolved
@maxep maxep merged commit 77fc236 into DataDog:develop Sep 21, 2022
@maxep maxep mentioned this pull request Nov 8, 2022
6 tasks
@dfed dfed deleted the dfed--DDNoop-loud-978 branch November 8, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants