Skip to content

Conversation

@kikoveiga
Copy link
Contributor

@kikoveiga kikoveiga commented Nov 14, 2025

What does this PR do?

  • Refactors trace integration tests to eliminate circular dependency to generate expected values.
  • Improves the tests.

Motivation

resolveMeta and resolveMetrics methods used production code to generate expected values, then compared those values against the actual output.

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)

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Nov 14, 2025

🎯 Code Coverage
Patch Coverage: 94.78%
Total Coverage: 71.33% (+0.00%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d312ed9 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.22%. Comparing base (5cec742) to head (d312ed9).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3005      +/-   ##
===========================================
+ Coverage    71.17%   71.22%   +0.05%     
===========================================
  Files          859      859              
  Lines        31429    31429              
  Branches      5298     5298              
===========================================
+ Hits         22367    22384      +17     
+ Misses        7555     7550       -5     
+ Partials      1507     1495      -12     
Files with missing lines Coverage Δ
...al/domain/event/CoreTracerSpanToSpanEventMapper.kt 90.22% <ø> (-2.17%) ⬇️

... and 32 files with indirect coverage changes

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

@kikoveiga kikoveiga self-assigned this Nov 17, 2025
@kikoveiga kikoveiga marked this pull request as ready for review November 17, 2025 17:34
@kikoveiga kikoveiga requested review from a team as code owners November 17, 2025 17:34
0xnm
0xnm previously approved these changes Nov 17, 2025
.hasField(TRACER_KEY) {
hasField(TRACER_VERSION_KEY, context.sdkVersion)
}
.hasField(USR_KEY) {}
Copy link
Member

Choose a reason for hiding this comment

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

I believe there should be something here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the fields of SpanEvent.Usr are nullable and they are not used or set for these tests.

Copy link
Member

Choose a reason for hiding this comment

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

Then this is something we shouldn't have. We should either set User object for the test or not add empty UserInfo object (like we do in RUM) to the trace event (or both), because sending object with empty property doesn't really make any sense.

Also I see that UserInfo.anonymousId is not set for the Span event, it is worth checking if it is on purpose or it is a miss.

@kikoveiga kikoveiga requested a review from 0xnm November 18, 2025 11:43
@kikoveiga kikoveiga merged commit c633626 into develop Nov 20, 2025
26 checks passed
@kikoveiga kikoveiga deleted the kikoveiga/RUM-10805/fix-resolve-methods branch November 20, 2025 11:32
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.

4 participants