Skip to content

Commit 4d365a3

Browse files
authored
Merge pull request #1556 from DataDog/nogorodnikov/prepare-beta3-release
Prepare release of `2.0.0-beta3`
2 parents 5fe313c + b6336b0 commit 4d365a3

File tree

123 files changed

+986
-3682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+986
-3682
lines changed

.gitlab-ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ publish:release-glide:
242242
- export OSSRH_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_password --with-decryption --query "Parameter.Value" --out text)
243243
- ./gradlew :integrations:dd-sdk-android-glide:publishToSonatype --stacktrace --no-daemon
244244

245-
publish:release-ktx:
245+
publish:release-trace-coroutines:
246246
tags: [ "runner:main" ]
247247
only:
248248
- tags
@@ -256,7 +256,23 @@ publish:release-ktx:
256256
- export GPG_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.gpg_passphrase --with-decryption --query "Parameter.Value" --out text)
257257
- export OSSRH_USERNAME=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_username --with-decryption --query "Parameter.Value" --out text)
258258
- export OSSRH_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_password --with-decryption --query "Parameter.Value" --out text)
259-
- ./gradlew :integrations:dd-sdk-android-ktx:publishToSonatype --stacktrace --no-daemon
259+
- ./gradlew :integrations:dd-sdk-android-trace-coroutines:publishToSonatype --stacktrace --no-daemon
260+
261+
publish:release-rum-coroutines:
262+
tags: [ "runner:main" ]
263+
only:
264+
- tags
265+
- develop
266+
image: $CI_IMAGE_DOCKER
267+
stage: publish
268+
timeout: 30m
269+
script:
270+
- aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.gradle-properties --with-decryption --query "Parameter.Value" --out text >> ./gradle.properties
271+
- export GPG_PRIVATE_KEY=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.gpg_private_key --with-decryption --query "Parameter.Value" --out text)
272+
- export GPG_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.gpg_passphrase --with-decryption --query "Parameter.Value" --out text)
273+
- export OSSRH_USERNAME=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_username --with-decryption --query "Parameter.Value" --out text)
274+
- export OSSRH_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-sdk-android.signing.ossrh_password --with-decryption --query "Parameter.Value" --out text)
275+
- ./gradlew :integrations:dd-sdk-android-rum-coroutines:publishToSonatype --stacktrace --no-daemon
260276

261277
publish:release-ndk:
262278
tags: [ "runner:main" ]

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# 2.0.0-beta3 / 2023-07-26
2+
3+
This is a beta release of SDK v2. Compared to SDK v1 it contains breaking changes related to the SDK setup and APIs. See the [migration guide](https://github.com/DataDog/dd-sdk-android/blob/5c9feb900856a6d7b3623820dade1eaead1498b9/CHANGELOG.md) for details.
4+
5+
Changes in comparison with `2.0.0-beta2`:
6+
7+
* [IMPROVEMENT] RUM: Remove tracking of view loading time and fix unit tests. See [#1545](https://github.com/DataDog/dd-sdk-android/pull/1545)
8+
* [IMPROVEMENT] Don't report OkHttp throwables to telemetry. See [#1548](https://github.com/DataDog/dd-sdk-android/pull/1548)
9+
* [IMPROVEMENT] Use `implementation` dependency for features in integrations modules. See [#1552](https://github.com/DataDog/dd-sdk-android/pull/1552)
10+
* [IMPROVEMENT] Remove `dd-sdk-android-ktx` module. See [#1555](https://github.com/DataDog/dd-sdk-android/pull/1555)
11+
* [BUGFIX] RUM: Fix memory leak in `JankStats` usage. See [#1553](https://github.com/DataDog/dd-sdk-android/pull/1553)
12+
* [DOCS] Remove redundant docs. See [#1540](https://github.com/DataDog/dd-sdk-android/pull/1540)
13+
* [DOCS] Update documentation for SDK v2. See [#1549](https://github.com/DataDog/dd-sdk-android/pull/1549)
14+
115
# 2.0.0-beta2 / 2023-07-17
216

317
This is a beta release of SDK v2. Compared to SDK v1 it contains breaking changes related to the SDK setup and APIs. See the [migration guide](https://github.com/DataDog/dd-sdk-android/blob/8d1f9abb101039abcd44ffed2823655c33e5129f/MIGRATION.MD) for details.

CONTRIBUTING.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,25 @@ In addition, to be able to run the static analysis tools locally, you should run
2121

2222
This project hosts the following modules:
2323

24-
- `dd-sdk-android`: the main library implementing all Datadog features (Logs, Traces, RUM, Crash reports);
25-
- `dd-sdk-android-ktx`: a set of Kotlin extensions to make the `dd-sdk-android` library more Kotlin friendly;
26-
- `dd-sdk-android-ndk`: a Plugin to allow tracking NDK information;
27-
- `dd-sdk-android-glide`: a lightweight library providing a bridge integration between `dd-sdk-android` and [Glide](https://bumptech.github.io/glide/);
28-
- `dd-sdk-android-timber`: a lightweight library providing a bridge integration between `dd-sdk-android` and [Timber](https://github.com/JakeWharton/timber);
24+
- `dd-sdk-android-core`: the main library implementing the core functionality of SDK (storage and upload of data, core APIs);
25+
- `features/***`: a set of libraries implementing Datadog products: Logs, RUM, Traces, etc.
26+
- `integrations/dd-sdk-android-coil`: a lightweight library providing a bridge integration between Datadog SDK and [Coil](https://coil-kt.github.io/coil/);
27+
- `integrations/dd-sdk-android-compose`: a lightweight library providing a bridge integration between Datadog SDK and [Jetpack Compose](https://developer.android.com/jetpack/compose);
28+
- `integrations/dd-sdk-android-fresco`: a lightweight library providing a bridge integration between Datadog SDK and [Fresco](https://frescolib.org/);
29+
- `integrations/dd-sdk-android-okhttp`: a lightweight library providing an instrumentation for [OkHttp](https://square.github.io/okhttp/);
30+
- `integrations/dd-sdk-android-rx`: a lightweight library providing a bridge integration between Datadog SDK and [RxJava](https://github.com/ReactiveX/RxJava);
31+
- `integrations/dd-sdk-android-sqldelight`: a lightweight library providing a bridge integration between Datadog SDK and [SQLDelight](https://cashapp.github.io/sqldelight/);
32+
- `integrations/dd-sdk-android-tv`: a lightweight library providing extensions for [Android TV](https://www.android.com/tv/)
33+
- `integrations/dd-sdk-android-ktx`: a set of Kotlin extensions to make the Datadog SDK more Kotlin friendly;
34+
- `integrations/dd-sdk-android-glide`: a lightweight library providing a bridge integration between Datadog SDK and [Glide](https://bumptech.github.io/glide/);
35+
- `integrations/dd-sdk-android-timber`: a lightweight library providing a bridge integration between Datadog SDK and [Timber](https://github.com/JakeWharton/timber);
2936
- `instrumented/integration`: a test module with integration tests using Espresso;
37+
- `instrumented/nightly-tests`: a test module with E2E tests using Espresso;
3038
- `tools/detekt`: a few custom [Detekt](https://github.com/arturbosch/detekt) static analysis rules;
39+
- `tools/lint`: a custom [Lint](https://developer.android.com/studio/write/lint) static analysis rule;
3140
- `tools/noopfactory`: an annotation processor generating no-op implementation of interfaces;
3241
- `tools/unit`: a utility library with code to help writing unit tests;
33-
- `sample/***`: a few sample application showcasing how to use the library features in production code;
42+
- `sample/***`: a few sample applications showcasing how to use the library features in production code;
3443

3544
### Building the SDK
3645

@@ -106,7 +115,7 @@ the bug are best.
106115
## Have a patch?
107116

108117
We welcome code contributions to the library, which you can
109-
[submit as a pull request](https://github.com/DataDog/dd-sdk-android/pull/new/master).
118+
[submit as a pull request](https://github.com/DataDog/dd-sdk-android/pull/new/develop).
110119
Before you submit a PR, make sure that you first create an Issue to explain the
111120
bug or the feature your patch covers, and make sure another Issue or PR doesn't
112121
already exist.
@@ -116,10 +125,8 @@ To create a pull request:
116125
1. **Fork the repository** from https://github.com/DataDog/dd-sdk-android ;
117126
2. **Make any changes** for your patch;
118127
3. **Write tests** that demonstrate how the feature works or how the bug is fixed;
119-
4. **Update any documentation** such as `docs/GettingStarted.md`, especially for
120-
new features;
121-
5. **Submit the pull request** from your fork back to this
122-
[repository](https://github.com/DataDog/dd-sdk-android) .
128+
4. **Update any documentation**, especially for new features. It can be found either in the `docs` folder of this repository, or in [documentation repository](https://github.com/DataDog/documentation);
129+
5. **Submit the pull request** from your fork back to this [repository](https://github.com/DataDog/dd-sdk-android).
123130

124131

125132
The pull request will be run through our CI pipeline, and a project member will
@@ -143,7 +150,7 @@ any change you introduce are still compatible with Java. If you want to add
143150
Kotlin specific features (DSL, lambdas, …), make sure there is a way to get the
144151
same feature from a Java source code.
145152

146-
### Code qualituy
153+
### Code quality
147154

148155
Our code uses [Detekt](https://detekt.dev/) static analysis with a shared configuration, slightly
149156
stricter than the default one. A Detekt check is ran on every on every PR to ensure that all new code
@@ -191,7 +198,7 @@ class Foo : Observable(), Runnable {
191198
```
192199

193200
There is also a command that you can use to automatically format the code following the
194-
required styling rules (require ktlint installed on your machine):
201+
required styling rules (require `ktlint` installed on your machine):
195202

196203
```console
197204
ktlint -F "**/*.kt" "**/*.kts" '!**/build/generated/**' '!**/build/kspCaches/**'
@@ -299,7 +306,7 @@ output is measured by 2 Datadog Monitors (one for performance and one for functi
299306

300307
4. `additionalInfo` is some context to distinguish multiple test on the same method (could be related to the argument, the context, a state)
301308

302-
- We need to add an identifier in the method documentation following the method signature in the [apiSurface](dd-sdk-android/apiSurface).
309+
- We need to add an identifier in the method documentation following the method signature in the [apiSurface](dd-sdk-android-core/api/apiSurface).
303310
This will be used by our test coverage tool.
304311

305312

@@ -309,9 +316,9 @@ We have created a Live Template that you can add in your development environment
309316
* apiMethodSignature: THE API METHOD SIGNATURE HERE
310317
*/
311318
@org.junit.Test
312-
fun $EXP$(){
319+
fun $EXP$() {
313320
val testMethodName = "$EXP$"
314-
measure(testMethodName){
321+
measure(testMethodName) {
315322
// API call here
316323
}
317324
}

MIGRATION.MD

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,28 @@ OkHttp instrumentation now supports the case when Datadog SDK is initialized aft
228228
Also, both `com.datadog.android.okhttp.DatadogInterceptor` and `com.datadog.android.okhttp.trace.TracingInterceptor` improve the integration with remote configuration, allowing you to control sampling dynamically.
229229
In order to do that, you need to provide your own implementation of the `com.datadog.android.core.sampling.Sampler` interface in the `com.datadog.android.okhttp.DatadogInterceptor`/`com.datadog.android.okhttp.trace.TracingInterceptor` constructor. It is queried for each request to make the sampling decision.
230230

231+
### `dd-sdk-android-ktx` module removal
232+
233+
In order to provide the better granularity for the Datadog SDK libraries used, `dd-sdk-android-ktx` module which was containing extension methods for both RUM and Trace features is removed and the code was re-arranged between the other modules:
234+
235+
| `1.x` | '2.0' | Module name |
236+
|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|-----------------------------------|
237+
| `com.datadog.android.ktx.coroutine#kotlinx.coroutines.CoroutineScope.launchTraced` | `com.datadog.android.trace.coroutines#kotlinx.coroutines.CoroutineScope.launchTraced` | `dd-sdk-android-trace-coroutines` |
238+
| `com.datadog.android.ktx.coroutine#runBlockingTraced` | `com.datadog.android.trace.coroutines#runBlockingTraced` | `dd-sdk-android-trace-coroutines` |
239+
| `com.datadog.android.ktx.coroutine#kotlinx.coroutines.CoroutineScope.asyncTraced` | `com.datadog.android.trace.coroutines#kotlinx.coroutines.CoroutineScope.asyncTraced` | `dd-sdk-android-trace-coroutines` |
240+
| `com.datadog.android.ktx.coroutine#kotlinx.coroutines.Deferred<T>.awaitTraced` | `com.datadog.android.trace.coroutines#kotlinx.coroutines.Deferred<T>.awaitTraced` | `dd-sdk-android-trace-coroutines` |
241+
| `com.datadog.android.ktx.coroutine#withContextTraced` | `com.datadog.android.trace.coroutines#withContextTraced` | `dd-sdk-android-trace-coroutines` |
242+
| `com.datadog.android.ktx.coroutine.CoroutineScopeSpan` | `com.datadog.android.trace.coroutines.CoroutineScopeSpan` | `dd-sdk-android-trace-coroutines` |
243+
| `com.datadog.android.ktx.sqlite#android.database.sqlite.SQLiteDatabase.transactionTraced` | `com.datadog.android.trace.sqlite#android.database.sqlite.SQLiteDatabase.transactionTraced` | `dd-sdk-android-trace` |
244+
| `com.datadog.android.ktx.tracing#io.opentracing.Span.setError` | `com.datadog.android.trace#io.opentracing.Span.setError` | `dd-sdk-android-trace` |
245+
| `com.datadog.android.ktx.tracing#withinSpan` | `com.datadog.android.trace#withinSpan` | `dd-sdk-android-trace` |
246+
| `com.datadog.android.ktx.coroutine#sendErrorToDatadog` | `com.datadog.android.rum.coroutines#sendErrorToDatadog` | `dd-sdk-android-rum-coroutines` |
247+
| `com.datadog.android.ktx.rum#java.io.Closeable.useMonitored` | `com.datadog.android.rum#java.io.Closeable.useMonitored` | `dd-sdk-android-rum` |
248+
| `com.datadog.android.ktx.rum#android.content.Context.getAssetAsRumResource` | `com.datadog.android.rum.resource#android.content.Context.getAssetAsRumResource` | `dd-sdk-android-rum` |
249+
| `com.datadog.android.ktx.rum#android.content.Context.getRawResAsRumResource` | `com.datadog.android.rum.resource#android.content.Context.getRawResAsRumResource` | `dd-sdk-android-rum` |
250+
| `com.datadog.android.ktx.rum#java.io.InputStream.asRumResource` | `com.datadog.android.rum.resource#java.io.InputStream.asRumResource` | `dd-sdk-android-rum` |
251+
| `com.datadog.android.ktx.tracing#okhttp3.Request.Builder.parentSpan` | `com.datadog.android.okhttp.trace#okhttp3.Request.Builder.parentSpan` | `dd-sdk-android-okhttp` |
252+
231253
## Using a Secondary Instance of the SDK
232254

233255
Previously, the Datadog SDK implemented a singleton and only one SDK instance could exist in the application process. This created obstacles for use-cases like the usage of the SDK by 3rd party libraries.

0 commit comments

Comments
 (0)