Skip to content

Commit 83bae8e

Browse files
Merge pull request #546 from DataDog/louiszawadzki/rum-1947/release-1.9.0
Release 1.9.0
2 parents f2333b8 + 7374763 commit 83bae8e

File tree

17 files changed

+60
-36
lines changed

17 files changed

+60
-36
lines changed

example-new-architecture/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PODS:
55
- DatadogSDKCrashReporting (1.22.0):
66
- DatadogSDK (= 1.22.0)
77
- PLCrashReporter (~> 1.11.0)
8-
- DatadogSDKReactNative (1.8.5):
8+
- DatadogSDKReactNative (1.9.0):
99
- DatadogSDK (~> 1.22.0)
1010
- DatadogSDKCrashReporting (~> 1.22.0)
1111
- RCT-Folly (= 2021.07.22.00)
@@ -942,7 +942,7 @@ SPEC CHECKSUMS:
942942
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
943943
DatadogSDK: 46e1a7363bc3130fae151ec4aedf11ea291517c5
944944
DatadogSDKCrashReporting: 24a0e6ec6db905cdeb174721962a7941b2f8a9d2
945-
DatadogSDKReactNative: f5aebd969f859454689ca16326520c65a4eb3725
945+
DatadogSDKReactNative: 28e1439d5a240608b84c1516b7770e231388cfcf
946946
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
947947
FBLazyVector: ddb55c55295ea51ed98aa7e2e08add2f826309d5
948948
FBReactNativeSpec: 33a87f65f1a467d5f63d11d0cc106a10d3b0639d

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PODS:
44
- DatadogSDKCrashReporting (1.22.0):
55
- DatadogSDK (= 1.22.0)
66
- PLCrashReporter (~> 1.11.0)
7-
- DatadogSDKReactNative (1.8.5):
7+
- DatadogSDKReactNative (1.9.0):
88
- DatadogSDK (~> 1.22.0)
99
- DatadogSDKCrashReporting (~> 1.22.0)
1010
- React-Core
@@ -530,7 +530,7 @@ SPEC CHECKSUMS:
530530
boost: 57d2868c099736d80fcd648bf211b4431e51a558
531531
DatadogSDK: 46e1a7363bc3130fae151ec4aedf11ea291517c5
532532
DatadogSDKCrashReporting: 24a0e6ec6db905cdeb174721962a7941b2f8a9d2
533-
DatadogSDKReactNative: 1cd2c5ca0673e9fc83ad4b44b2c14f90cce9d53c
533+
DatadogSDKReactNative: 92e7f7fb2e1231d35b22971e899efe863bd43d8d
534534
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
535535
FBLazyVector: ddb55c55295ea51ed98aa7e2e08add2f826309d5
536536
FBReactNativeSpec: 90fc1a90b4b7a171e0a7c20ea426c1bf6ce4399c

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"npmClient": "yarn",
3-
"version": "1.8.5",
3+
"version": "1.9.0",
44
"packages": [
55
"packages/*"
66
],

packages/codepush/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@datadog/mobile-react-native-code-push",
3-
"version": "1.8.5",
3+
"version": "1.9.0",
44
"description": "A client-side React Native module to interact with Appcenter Codepush and Datadog",
55
"keywords": [
66
"datadog",
@@ -38,7 +38,7 @@
3838
"prepare": "rm -rf lib && yarn bob build"
3939
},
4040
"devDependencies": {
41-
"@datadog/mobile-react-native": "^1.8.5",
41+
"@datadog/mobile-react-native": "^1.9.0",
4242
"@testing-library/react-native": "7.0.2",
4343
"react-native-builder-bob": "0.17.1",
4444
"react-native-code-push": "7.0.5"

packages/core/android/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@ def getExtOrIntegerDefault(name) {
8484
android {
8585
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
8686
buildToolsVersion getExtOrDefault('buildToolsVersion')
87+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
88+
if (agpVersion.tokenize('.')[0].toInteger() >= 7) {
89+
namespace = "com.datadog.reactnative"
90+
}
91+
if (agpVersion.tokenize('.')[0].toInteger() >= 8) {
92+
buildFeatures {
93+
buildConfig = true
94+
}
95+
}
96+
8797
defaultConfig {
8898
minSdkVersion 21
8999
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')

packages/core/ios/Sources/DdTraceImplementation.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,13 @@ public class DdTraceImplementation: NSObject {
4444
public func finishSpan(spanId: NSString, context: NSDictionary, timestampMs: Double, resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
4545
objc_sync_enter(self)
4646
let optionalSpan = spanDictionary.removeValue(forKey: spanId)
47-
objc_sync_exit(self)
48-
4947
if let span = optionalSpan {
5048
set(tags: castAttributesToSwift(context).mergeWithGlobalAttributes(), to: span)
5149
let timeIntervalSince1970: TimeInterval = timestampMs / 1_000
5250
span.finish(at: Date(timeIntervalSince1970: timeIntervalSince1970))
5351
}
54-
52+
objc_sync_exit(self)
53+
5554
resolve(nil)
5655
}
5756

packages/core/ios/Tests/DdTraceTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ internal class DdTraceTests: XCTestCase {
139139
}
140140

141141
func testTracingConcurrently() {
142+
// It is possible and acceptable that a concurrent finishSpan resolve is called on a different thread before we get the lastResolveValue.
143+
// This would override lastResolveValue to be `nil`. To avoid this, we use a different resolve.
144+
func mockFinishResolve(args: Any?) {}
145+
142146
let iterationCount = 30
143147
DispatchQueue.concurrentPerform(iterations: iterationCount) { iteration in
144148
tracer.startSpan(
@@ -149,7 +153,7 @@ internal class DdTraceTests: XCTestCase {
149153
reject: mockReject
150154
)
151155
let spanID = lastResolveValue as! NSString
152-
tracer.finishSpan(spanId: spanID, context: testTags, timestampMs: 100, resolve: mockResolve, reject: mockReject)
156+
tracer.finishSpan(spanId: spanID, context: testTags, timestampMs: 100, resolve: mockFinishResolve, reject: mockReject)
153157
}
154158

155159
XCTAssertEqual(mockNativeTracer.startedSpans.count, iterationCount, "\(mockNativeTracer.startedSpans)")

packages/core/jest/mock.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const actualDatadog = jest.requireActual('@datadog/mobile-react-native');
1818
const DatadogProviderMock = ({ children }) => {
1919
return <>{children}</>;
2020
};
21+
DatadogProviderMock.initialize = jest.fn().mockResolvedValue();
2122

2223
module.exports = {
2324
...actualDatadog,

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@datadog/mobile-react-native",
3-
"version": "1.8.5",
3+
"version": "1.9.0",
44
"description": "A client-side React Native module to interact with Datadog",
55
"keywords": [
66
"datadog",

packages/core/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// generated by genversion
2-
export const version = '1.8.5';
2+
export const version = '1.9.0';

0 commit comments

Comments
 (0)