Skip to content

Fix message when writer is NoOp#1963

Merged
xgouchet merged 1 commit into
developfrom
xgouchet/no_op_writer_rum_expired
Apr 3, 2024
Merged

Fix message when writer is NoOp#1963
xgouchet merged 1 commit into
developfrom
xgouchet/no_op_writer_rum_expired

Conversation

@xgouchet

@xgouchet xgouchet commented Apr 3, 2024

Copy link
Copy Markdown
Contributor

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

@0xnm 0xnm left a comment

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.

nice catch! I added a suggestion.

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

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.

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

codecov-commenter commented Apr 3, 2024

Copy link
Copy Markdown

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
@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.

3 participants