Skip to content

[RUM-5566] Added setSyntheticsAttribute in RumInternalProxy#2133

Merged
marco-saia-datadog merged 1 commit into
developfrom
marcosaia/RUM-5566/set-synthetics-attribute-api
Aug 1, 2024
Merged

[RUM-5566] Added setSyntheticsAttribute in RumInternalProxy#2133
marco-saia-datadog merged 1 commit into
developfrom
marcosaia/RUM-5566/set-synthetics-attribute-api

Conversation

@marco-saia-datadog

@marco-saia-datadog marco-saia-datadog commented Jul 23, 2024

Copy link
Copy Markdown
Member

What does this PR do?

Adds setSyntheticsAttribute in _RumInternalProxy for internal usage in cross-platform frameworks.

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)

@marco-saia-datadog
marco-saia-datadog force-pushed the marcosaia/RUM-5566/set-synthetics-attribute-api branch 3 times, most recently from ef32fea to 6ef3f99 Compare July 23, 2024 15:00
@marco-saia-datadog
marco-saia-datadog marked this pull request as ready for review July 23, 2024 15:00
@marco-saia-datadog
marco-saia-datadog requested review from a team as code owners July 23, 2024 15:00
@marco-saia-datadog
marco-saia-datadog force-pushed the marcosaia/RUM-5566/set-synthetics-attribute-api branch from 6ef3f99 to 5de46e9 Compare July 24, 2024 12:42
@marco-saia-datadog marco-saia-datadog changed the title [RUM-5566] Added handleSyntheticsAttribute in RumInternalProxy [RUM-5566] Added setSyntheticsAttribute in RumInternalProxy Jul 26, 2024
@marco-saia-datadog
marco-saia-datadog force-pushed the marcosaia/RUM-5566/set-synthetics-attribute-api branch from 5de46e9 to e33b3f2 Compare July 29, 2024 09:39
@marco-saia-datadog

Copy link
Copy Markdown
Member Author

I have added a check to verify that the lateinit variable sdkCore has been initialized in the ActivityLifecycleTrackingStrategy:

if (::sdkCore.isInitialized) {
/// ...
}

A test was failing because of this missing check, as the previous implementation would only use the sdkCore if the activity contained the synthetics attributes intent extras, that are not passed for that particular test.

@mariusc83 @xgouchet let me know if you prefer to modify the test instead, or if you think this approach is safer.

@codecov-commenter

codecov-commenter commented Jul 29, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 69.97%. Comparing base (b9848cc) to head (13008c3).

Files Patch % Lines
...otlin/com/datadog/android/rum/_RumInternalProxy.kt 75.00% 0 Missing and 2 partials ⚠️
.../rum/tracking/ActivityLifecycleTrackingStrategy.kt 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2133      +/-   ##
===========================================
- Coverage    69.99%   69.97%   -0.02%     
===========================================
  Files          726      726              
  Lines        26984    26995      +11     
  Branches      4520     4524       +4     
===========================================
+ Hits         18887    18889       +2     
- Misses        6827     6828       +1     
- Partials      1270     1278       +8     
Files Coverage Δ
.../rum/tracking/ActivityLifecycleTrackingStrategy.kt 90.00% <75.00%> (+2.73%) ⬆️
...otlin/com/datadog/android/rum/_RumInternalProxy.kt 78.57% <75.00%> (-4.76%) ⬇️

... and 29 files with indirect coverage changes

@marco-saia-datadog
marco-saia-datadog force-pushed the marcosaia/RUM-5566/set-synthetics-attribute-api branch 2 times, most recently from 7020aae to 169ddb0 Compare July 29, 2024 14:00
@marco-saia-datadog
marco-saia-datadog force-pushed the marcosaia/RUM-5566/set-synthetics-attribute-api branch from 169ddb0 to 13008c3 Compare August 1, 2024 09:42
@marco-saia-datadog
marco-saia-datadog merged commit 323ebdb into develop Aug 1, 2024
@marco-saia-datadog
marco-saia-datadog deleted the marcosaia/RUM-5566/set-synthetics-attribute-api branch August 1, 2024 12:29
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