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

Fix message when writer is NoOp #1963

Merged
merged 1 commit into from Apr 3, 2024
Merged

Conversation

xgouchet
Copy link
Collaborator

@xgouchet xgouchet commented Apr 3, 2024

What does this PR do?

This avoids misleading logs when a RUM session is expired and the writer becomes no op (it returns false on write).

Motivation

Avoid noise and misleading noise in logcat for customer, and provide a more relevant explanation

@xgouchet xgouchet requested review from a team as code owners April 3, 2024 08:18
Copy link
Contributor

@0xnm 0xnm left a comment

Choose a reason for hiding this comment

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

nice catch! I added a suggestion.

level = InternalLogger.Level.INFO,
target = InternalLogger.Target.USER,
messageBuilder = { WRITE_OPERATION_IGNORED }
)
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: we probably should also call onSuccess/onError here (don't know which one makes more sense), because at least for the RumViewScope until sum(pending) == 0 it won't be marked as complete and thus garbage collected. We may have the case when there is NoOpDataWriter here and RUM pipeline working if session is not tracked, I believe.

@xgouchet xgouchet force-pushed the xgouchet/no_op_writer_rum_expired branch from acf1e06 to 133f4eb Compare April 3, 2024 12:00
@xgouchet xgouchet requested a review from 0xnm April 3, 2024 12:00
@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

Merging #1963 (133f4eb) into develop (a107d7c) will increase coverage by 0.04%.
Report is 6 commits behind head on develop.
The diff coverage is 86.67%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1963      +/-   ##
===========================================
+ Coverage    83.24%   83.29%   +0.04%     
===========================================
  Files          489      489              
  Lines        17857    17837      -20     
  Branches      2661     2664       +3     
===========================================
- Hits         14865    14856       -9     
+ Misses        2264     2245      -19     
- Partials       728      736       +8     
Files Coverage Δ
...kotlin/com/datadog/android/rum/utils/SdkCoreExt.kt 95.56% <86.67%> (-1.88%) ⬇️

... and 36 files with indirect coverage changes

@xgouchet xgouchet merged commit fb5a1de into develop Apr 3, 2024
23 checks passed
@xgouchet xgouchet deleted the xgouchet/no_op_writer_rum_expired branch April 3, 2024 12:41
@xgouchet xgouchet added this to the 2.8.x milestone Apr 5, 2024
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.

None yet

3 participants