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

RUM-1520 Single Feature Integration Tests: Trace #1786

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

xgouchet
Copy link
Member

What does this PR do?

Implement the Single-FIT layer of our new Test Pyramid for the trace module.

@xgouchet xgouchet requested review from a team as code owners December 21, 2023 16:25
@xgouchet xgouchet force-pushed the xgouchet/RUM-1520/single-fit-trace branch from fb67c1f to fb7b93a Compare December 21, 2023 17:17
@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2023

Codecov Report

Merging #1786 (988c2f2) into develop (c8a5630) will decrease coverage by 0.04%.
Report is 29 commits behind head on develop.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1786      +/-   ##
===========================================
- Coverage    83.47%   83.43%   -0.04%     
===========================================
  Files          466      466              
  Lines        16364    16363       -1     
  Branches      2452     2452              
===========================================
- Hits         13659    13652       -7     
+ Misses        2039     2037       -2     
- Partials       666      674       +8     
Files Coverage Δ
.../trace/internal/handlers/AndroidSpanLogsHandler.kt 89.58% <0.00%> (-2.08%) ⬇️

... and 25 files with indirect coverage changes

@xgouchet xgouchet force-pushed the xgouchet/RUM-1520/single-fit-trace branch from fb7b93a to e5f4527 Compare December 22, 2023 07:20
@xgouchet xgouchet force-pushed the xgouchet/RUM-1520/single-fit-trace branch from e5f4527 to 8733d29 Compare December 22, 2023 08:08
Copy link
Member

@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 work! I left some questions/suggestions.

@@ -65,7 +65,7 @@ internal class AndroidSpanLogsHandler(
timestampMicroseconds: Long? = null
) {
val logsFeature = sdkCore.getFeature(Feature.LOGS_FEATURE_NAME)
if (logsFeature != null) {
if (logsFeature != null && fields.isNotEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

Why this change is needed?

First, with this change we can have a false positive warning in LogCat about missing Logs features, when it is actually registered.

Second, we can have then a possibility to not send anything.

Copy link
Member Author

Choose a reason for hiding this comment

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

Essentially this is to avoid sending a useless log: if the fields map is empty, then we will send a log with a default message (that just says "span log") with no custom attributes, providing no information whatsoever.
But indeed we might get a false positive logcat message, I'll fix that.

* }
* }
*/
@Suppress("UnsafeThirdPartyFunctionCall")
Copy link
Member

Choose a reason for hiding this comment

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

should we exclude files under reliability from this check?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that makes more sense indeed.

Copy link
Member

@mariusc83 mariusc83 left a comment

Choose a reason for hiding this comment

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

Nice job !!

@xgouchet xgouchet requested a review from 0xnm December 27, 2023 07:39
@xgouchet xgouchet force-pushed the xgouchet/RUM-1520/single-fit-trace branch from fdb40a7 to 988c2f2 Compare January 8, 2024 11:01
@xgouchet xgouchet merged commit 88069eb into develop Jan 9, 2024
5 checks passed
@xgouchet xgouchet deleted the xgouchet/RUM-1520/single-fit-trace branch January 9, 2024 08:55
@xgouchet xgouchet added this to the 2.5.0 milestone Feb 19, 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.

5 participants