Skip to content

Deprecate DatadogPlugin class and its usage#1100

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/deprecate-datadog-plugin-class
Oct 31, 2022
Merged

Deprecate DatadogPlugin class and its usage#1100
0xnm merged 1 commit into
developfrom
nogorodnikov/deprecate-datadog-plugin-class

Conversation

@0xnm

@0xnm 0xnm commented Oct 24, 2022

Copy link
Copy Markdown
Member

What does this PR do?

This was done already in SDK v2 branch, just doing the same in the develop, so that it can be in the 1.x releases.

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)

@0xnm
0xnm requested a review from a team as a code owner October 24, 2022 08:39
@0xnm
0xnm force-pushed the nogorodnikov/deprecate-datadog-plugin-class branch from a332cbc to cb69cb8 Compare October 24, 2022 09:08

@xgouchet xgouchet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It'd be nice to also call the warnDeprecated(…) method. The deprecated annotation won't necessarily be seen and this will also write a warning in Logcat.

Comment on lines +347 to +348
"Datadog Plugins won't work in SDK v2, you'll need to write" +
" your own Feature"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Datadog Plugins won't work in SDK v2, you'll need to write" +
" your own Feature"
"Datadog Plugins will be removed in SDK v2.0.0." +
"You will then need to write your own Feature (check our own code for guidance)."

@0xnm 0xnm Oct 25, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The problem is that there is no code to check for the guidance, it will be available (with all the public API changes) in version 2.0.0, so that it means we cannot remove things related to the DatadogPlugin in 2.0.0 and should do it later at some point. WDYT? In theory it is not a problem to keep DatadogPlugin a bit longer. Or we don't add the statement about checking the code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well we will (do) have some features implementation in the SDK v2 branch. Saying that "you'll need to write your own feature" without giving a doc on how to do it is going to be frustrating to customers when they see this warning.

* @see [Feature.TRACE]
* @see [Feature.RUM]
*/
@Deprecated("Datadog Plugins won't work in SDK v2, you'll need to write your own Feature")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Deprecated("Datadog Plugins won't work in SDK v2, you'll need to write your own Feature")
"Datadog Plugins will be removed in SDK v2.0.0." +
"You will then need to write your own Feature (check our own code for guidance)."

}
}

@Deprecated("Plugins won't work that way in SDK v2")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
@Deprecated("Plugins won't work that way in SDK v2")
"Datadog Plugins will be removed in SDK v2.0.0." +
"You will then need to write your own Feature (check our own code for guidance)."

@codecov-commenter

codecov-commenter commented Oct 25, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1100 (92161fb) into develop (ffd9a96) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #1100      +/-   ##
===========================================
+ Coverage    83.29%   83.29%   +0.01%     
===========================================
  Files          273      273              
  Lines         9363     9367       +4     
  Branches      1503     1503              
===========================================
+ Hits          7798     7802       +4     
- Misses        1147     1149       +2     
+ Partials       418      416       -2     
Impacted Files Coverage Δ
...n/com/datadog/android/ndk/NdkCrashReportsPlugin.kt 62.86% <ø> (ø)
...in/com/datadog/android/core/internal/SdkFeature.kt 94.20% <ø> (ø)
...c/main/kotlin/com/datadog/android/rum/GlobalRum.kt 69.44% <ø> (ø)
...atadog/android/core/configuration/Configuration.kt 97.50% <100.00%> (+0.04%) ⬆️
...ndroid/core/internal/persistence/file/EventMeta.kt 80.00% <0.00%> (-10.00%) ⬇️
...android/rum/internal/ndk/DatadogNdkCrashHandler.kt 88.11% <0.00%> (-0.54%) ⬇️
...rc/main/java/com/datadog/opentracing/DDTracer.java 55.65% <0.00%> (-0.42%) ⬇️
...ain/java/com/datadog/opentracing/PendingTrace.java 58.62% <0.00%> (+0.86%) ⬆️
...droid/rum/tracking/FragmentViewTrackingStrategy.kt 86.96% <0.00%> (+4.35%) ⬆️
...m/datadog/android/core/internal/utils/ViewUtils.kt 81.82% <0.00%> (+9.09%) ⬆️

@0xnm
0xnm force-pushed the nogorodnikov/deprecate-datadog-plugin-class branch from cb69cb8 to 92161fb Compare October 27, 2022 14:43
@0xnm
0xnm requested a review from xgouchet October 27, 2022 14:44
@0xnm
0xnm merged commit 13ac27f into develop Oct 31, 2022
@0xnm
0xnm deleted the nogorodnikov/deprecate-datadog-plugin-class branch October 31, 2022 09:12
@xgouchet xgouchet added this to the 1.15.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants