Skip to content

Add configuration method to disable action tracking.#1023

Merged
fuzzybinary merged 2 commits into
developfrom
jward/disable-action-tracking
Sep 7, 2022
Merged

Add configuration method to disable action tracking.#1023
fuzzybinary merged 2 commits into
developfrom
jward/disable-action-tracking

Conversation

@fuzzybinary

@fuzzybinary fuzzybinary commented Aug 29, 2022

Copy link
Copy Markdown
Member

What does this PR do?

This allows users to replace the current UserAcitonTrackingStategy with a NoOpUserActionTrackingStrategy.

Motivation

This is mostly for Flutter, since the initialization of the UserActionTrackingStrategy happens after the MainActivity is live, so the initial creation misses hooking into the Activity anyway, and subsequent attempts to listen to the Activity result in logcat spam, as there are no views that the tracking strategy can see.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@fuzzybinary
fuzzybinary marked this pull request as ready for review September 1, 2022 14:02
@fuzzybinary
fuzzybinary requested a review from a team as a code owner September 1, 2022 14:02
@fuzzybinary
fuzzybinary requested a review from 0xnm September 1, 2022 14:02
@codecov-commenter

codecov-commenter commented Sep 1, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.23%. Comparing base (f6e5fd9) to head (703a0c3).
⚠️ Report is 3993 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1023      +/-   ##
===========================================
+ Coverage    83.12%   83.23%   +0.10%     
===========================================
  Files          272      272              
  Lines         9256     9260       +4     
  Branches      1485     1485              
===========================================
+ Hits          7694     7707      +13     
+ Misses        1145     1139       -6     
+ Partials       417      414       -3     
Files with missing lines Coverage Δ
...atadog/android/core/configuration/Configuration.kt 98.70% <100.00%> (+0.02%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

)
}

sendRandomActionEvent(testMethodName)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems we don't have a monitor for this test yet, right? Also I'm curious if we can test disableInteractionTracking at all - sendRandomActionEvent has no connection to this method it seems, because it will send a manual action, which is not guarded by the disableInteractionTracking.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was going to add the monitor after this is in, since creating it early would just cause some trigger noise.

Good call on the sendRandomAction. This is why I wanted you to re-review.

Do we have a method that does a non-manual action?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good question. We can launch some activity and then use Espresso to make a tap on some element. And then if interactions tracking is disabled we shouldn't see it in RUM.

But maybe it is too much for such small method. I'm ok with removing E2E test as well. WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If we're not too concerned about it, I'll remove the e2e.

@fuzzybinary
fuzzybinary force-pushed the jward/disable-action-tracking branch from 1903c57 to 703a0c3 Compare September 6, 2022 19:10
@fuzzybinary

Copy link
Copy Markdown
Member Author

One more time for anyone who's interested. I've pulled out the e2e and marked the API as not testable. If I can get someone to just give a 👍 we'll merge this in.

@fuzzybinary
fuzzybinary merged commit 8c4cf3a into develop Sep 7, 2022
@fuzzybinary
fuzzybinary deleted the jward/disable-action-tracking branch September 7, 2022 12:19
@xgouchet xgouchet added this to the 1.15.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants