Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dogfood/2.0.0 beta2 #1370

Closed
wants to merge 107 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
e72a3ae
RUMM-3151 feat: reduce number of view updates by filtering events fro…
ganeshnj Jun 23, 2023
3bed75c
RUMM-3151 remove namespace
ganeshnj Jun 23, 2023
8ccf78d
RUMM-3151 make write<T:>(value:) public
ganeshnj Jun 23, 2023
5889552
RUMM-3151 convert for to compactMap
ganeshnj Jun 26, 2023
84beb87
RUMM-3151 docs updates
ganeshnj Jun 26, 2023
df3ea1b
RUMM-3151 update CHANGELOG.md
ganeshnj Jun 26, 2023
0c0db42
RUMM-3151 guard against some invalid block
ganeshnj Jun 26, 2023
0a77e34
RUMM-3151 fix compilation issues for benchmark target
ganeshnj Jun 26, 2023
ce7d6e4
RUMM-3151 fix linter
ganeshnj Jun 26, 2023
f8d53b7
RUMM-3151 remove compactMap
ganeshnj Jun 27, 2023
bfa773d
RUMM-3151 move code around to RUM module
ganeshnj Jun 27, 2023
743e7ef
RUMM-3151 atomic writes
ganeshnj Jun 27, 2023
769db02
RUMM-3151 remove EventFilter protocol
ganeshnj Jun 27, 2023
5faf9a9
RUMM-3151 encryption test case
ganeshnj Jun 27, 2023
1847044
RUMM-3151 one log per event
ganeshnj Jun 28, 2023
502fd11
RUMM-3151 adapt test to consider data and metadata
ganeshnj Jun 28, 2023
7bdf31d
RUMM-3151 fix logging
ganeshnj Jun 28, 2023
3efffcd
docs: add spi configuration
ganeshnj Jun 28, 2023
4e85aee
Regenerate rum model
maciejburda Jun 28, 2023
dd6a509
Merge pull request #1342 from DataDog/ganeshnj/docs/spi-config
ganeshnj Jun 28, 2023
fabc19d
Add test
maciejburda Jun 29, 2023
7120dc8
Update mock
maciejburda Jun 29, 2023
847cd96
RUMM-3151 re-align the blocks - [metadata value]
ganeshnj Jun 29, 2023
6fb6e80
PR fixes
maciejburda Jun 29, 2023
1b8cd0b
Merge pull request #1344 from DataDog/maciey/rum-models-update
maciejburda Jun 29, 2023
aabebe5
RUMM-3151 fix test cases
ganeshnj Jun 29, 2023
00a1e06
Merge branch 'develop' into ganeshnj/feat/reduce-view-updates
ganeshnj Jun 29, 2023
fee1813
RUMM-2387 Update CocoaPods specs
maxep Jun 30, 2023
357318e
REPLAY-1805 Update model generation script
maciejburda Jun 23, 2023
1e60bb9
REPLAY-1805 Regenerate SR model
maciejburda Jun 23, 2023
12912a3
REPLAY-1805 Use new placeholder
maciejburda Jun 23, 2023
ea49f26
REPLAY-1805 Add deprecated comment
maciejburda Jun 23, 2023
f115f4f
REPLAY-1805 Fix snapshot tests
maciejburda Jun 28, 2023
822a883
REPLAY-1805 Remove clipping in favour of relative rect
maciejburda Jun 28, 2023
7c08887
REPLAY-1805 Update tests
maciejburda Jun 30, 2023
abca88e
fix: broken IntegrationTests target
ganeshnj Jun 30, 2023
f368c8f
REPLAY-1805 Fix snapshot appearance
maciejburda Jun 30, 2023
16d9c4c
REPLAY-1805 Fix lint
maciejburda Jun 30, 2023
54ed9f6
REPLAY-1805 Fix regression and add tests
maciejburda Jun 30, 2023
053a851
RUMM-2987 Use instance name for data persistency
maxep Jun 30, 2023
bfae9d6
Merge pull request #1352 from DataDog/ganeshnj/fix/integ-tests-target
ganeshnj Jun 30, 2023
26bc833
Merge pull request #1328 from DataDog/ganeshnj/feat/reduce-view-updates
ganeshnj Jun 30, 2023
f005eca
feat: remove RUMViewUpdatesThrottlerType and send all events to batch…
ganeshnj Jun 30, 2023
54d77c4
Merge pull request #1353 from DataDog/maxep/RUMM-2987/sdk-instance-da…
maxep Jul 3, 2023
a3bf3df
Add podpecs to distribution pipeline
maxep Jul 3, 2023
6b1c34a
Merge pull request #1351 from DataDog/maxep/RUMM-2387/update-cocoapods
maxep Jul 3, 2023
d3d7722
Merge pull request #1354 from DataDog/ganeshnj/feat/RUMM-3151-remove-…
ganeshnj Jul 3, 2023
ca258e6
RUMM-3387 align v2 logs apis
maxep Jul 3, 2023
c8f9afb
RUMM-3387 align v2 trace apis
maxep Jul 3, 2023
4d9478c
RUMM-3387 align v2 rum apis
maxep Jul 3, 2023
bb05d09
Merge pull request #1326 from DataDog/maciey/REPLAY-1805-player-place…
maciejburda Jul 4, 2023
7a7d50c
REPLAY-1805 Fix image content frame logic
maciejburda Jul 4, 2023
a8dbb89
REPLAY-1805 Add tests
maciejburda Jul 4, 2023
5b3309d
REPLAY-1805 Fix flaky tests
maciejburda Jul 4, 2023
2bfce1b
RUMM-3404 Create MIGRATION.md
maxep Jul 4, 2023
3d4acba
RUMM-3387 aligne v2 core apis
maxep Jul 5, 2023
5aeb967
RUMM-3404 Update MIGRATION.md
maxep Jul 5, 2023
5c411e7
Apply suggestions from code review
maxep Jul 5, 2023
30f2d90
Merge pull request #1360 from DataDog/maciey/REPLAY-1805-image-placeh…
maciejburda Jul 5, 2023
c0b1541
REPLAY-1765 Add records count
maciejburda Jun 29, 2023
bcc64a7
REPLAY-1765 Add tests
maciejburda Jun 30, 2023
e99825a
REPLAY-1765 Add tests
maciejburda Jun 30, 2023
7468f47
REPLAY-1765 Lint fix
maciejburda Jun 30, 2023
e150f39
REPLAY-1765 PR fixes
maciejburda Jun 30, 2023
eee95d9
REPLAY-1765 PR fixes
maciejburda Jul 5, 2023
adfc9d1
Apply code review changes
maxep Jul 5, 2023
2ab269c
RUMM-3404 Update MIGRATION.md
maxep Jul 5, 2023
fa13af1
RUMM-3404 Add Carthage to migration guide
maxep Jul 5, 2023
924143d
RUMM-3387 Align webview tracking public api
maxep Jul 3, 2023
1546ebb
RUMM-3387 rename webview to webView
maxep Jul 4, 2023
ff43955
RUMM-3387 Only ship WebView Tracking with iOS
maxep Jul 5, 2023
0e1944d
RUMM-3387 WebViewTracking as enum
maxep Jul 5, 2023
7446049
RUMM-3387 Hide internal interfaces
maxep Jul 5, 2023
67d7564
Remove WebView Tracking tvOS target
maxep Jul 5, 2023
5ac3945
Update MIGRATION.md
maxep Jul 5, 2023
083682f
Merge pull request #1357 from DataDog/maxep/RUMM-3387/align-webview-t…
maxep Jul 5, 2023
4726fe2
Merge pull request #1358 from DataDog/maxep/RUMM-3387/align-public-api
maxep Jul 5, 2023
2b4d9b0
Bumped version to 2.0.0-beta1
maxep Jul 5, 2023
41df11d
Remove session replay from library
maxep Jul 5, 2023
9104ba6
Fix CHANGELOG
maxep Jul 5, 2023
4028b60
Apply changes from doc team
maxep Jul 6, 2023
a635662
REPLAY-1765 PR fixes
maciejburda Jul 6, 2023
a4199fe
REPLAY-1868 Make Session Replay uploader more eager
ncreated Jul 6, 2023
acd3713
REPLAY-1765 Update tests
maciejburda Jul 6, 2023
ecb11fa
Remove session replay from library
maxep Jul 6, 2023
628279b
Merge pull request #1347 from DataDog/maciey/REPLAY-1765-replay-stats
maciejburda Jul 6, 2023
a7451be
Merge pull request #1362 from DataDog/release/2.0.0-beta1
maxep Jul 6, 2023
5efc70e
Fix assets validator for v2
maxep Jul 6, 2023
e1a45e3
Fix DatadogSDK.podspec
maxep Jul 6, 2023
3accafd
Merge pull request #1361 from DataDog/maxep/RUMM-3404/migration-guide
rtrieu Jul 6, 2023
7adf22c
REPLAY-1868 Fix flaky assertion
ncreated Jul 7, 2023
467c4e7
Update gh_asset.py
maxep Jul 7, 2023
54c5377
Merge pull request #1364 from DataDog/maxep/fix-assets-validator
maxep Jul 7, 2023
f833251
Merge pull request #1363 from DataDog/ncreated/REPLAY-1868/make-sr-up…
ncreated Jul 7, 2023
5b18842
REPLAY-1616 Fix flaky execution of sub-process commands
ncreated Jul 10, 2023
ef863a1
Merge commit '54c5377f68e39e2b679130aed2f4faa830b66636' into maxep/v2…
maxep Jul 10, 2023
9f679f1
RUMM-3151 feat: reduce number of view updates by filtering events fro…
ganeshnj Jun 30, 2023
66aed9f
REPLAY-1616 Lint
ncreated Jul 10, 2023
19b7d33
Merge pull request #1365 from DataDog/ncreated/REPLAY-1616/fix-shell-…
ncreated Jul 10, 2023
524eb9e
Fix conflicts with #1347
maxep Jul 10, 2023
08540ad
Fix conflicts with #1354
maxep Jul 10, 2023
2b51ad1
Fix conflicts with configuration
maxep Jul 10, 2023
623a604
Update CHANGELOG.md
maxep Jul 10, 2023
16f13ad
Migrate E2E Tests
maxep Jul 11, 2023
02bce4c
Update api-surface
maxep Jul 11, 2023
b54b417
Merge pull request #1366 from DataDog/maxep/v2-develop-merge
maxep Jul 11, 2023
9504457
Bumped version to 2.0.0-beta2
maxep Jul 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
builder:
configs:
- platform: ios
documentation_targets: ["Datadog", "DatadogObjc", "DatadogCrashReporting"]
4 changes: 2 additions & 2 deletions BenchmarkTests/BenchmarkMocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ extension PerformancePreset {
struct FeatureRequestBuilderMock: FeatureRequestBuilder {
let dataFormat = DataFormat(prefix: "", suffix: "", separator: "\n")

func request(for events: [Data], with context: DatadogContext) -> URLRequest {
func request(for events: [Event], with context: DatadogContext) -> URLRequest {
let builder = URLRequestBuilder(
url: .mockAny(),
queryItems: [.ddtags(tags: ["foo:bar"])],
headers: []
)

let data = dataFormat.format(events)
let data = dataFormat.format(events.map { $0.data })
return builder.uploadRequest(with: data)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DataUploaderBenchmarkTests: BenchmarkTests {
measure(metrics: [XCTMemoryMetric()]) {
// in each, 10 requests are done:
try? (0..<10).forEach { _ in
let events = [Data(repeating: 0x41, count: 10 * 1_024 * 1_024)]
let events = [Event(data: Data(repeating: 0x41, count: 10 * 1_024 * 1_024))]
_ = try dataUploader.upload(events: events, context: context)
}
// After all, the baseline asserts `0kB` or less grow in Physical Memory.
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Unreleased

# 1.21.0 / 27-07-2023
- [IMPROVEMENT] Reduce number of view updates by filtering events from payload. See [#1328][]

# 1.21.0 / 27-06-2023
- [BUGFIX] Fix TracingUUID string format. See [#1311][] (Thanks [@changm4n][])
- [BUGFIX] Rename _Datadog_Private to DatadogPrivate. See [#1331] (Thanks [@alexfanatics][])
- [IMPROVEMENT] Add context to crash when there's an active view. See [#1315][]


# 1.20.0 / 01-06-2023
- [BUGFIX] Use targetTimestamp as reference to calculate FPS for variable refresh rate displays. See [#1272][]

Expand Down Expand Up @@ -472,6 +475,7 @@
[#1311]: https://github.com/DataDog/dd-sdk-ios/pull/1311
[#1315]: https://github.com/DataDog/dd-sdk-ios/pull/1315
[#1331]: https://github.com/DataDog/dd-sdk-ios/pull/1331
[#1328]: https://github.com/DataDog/dd-sdk-ios/pull/1328
[@00fa9a]: https://github.com/00FA9A
[@britton-earnin]: https://github.com/Britton-Earnin
[@hengyu]: https://github.com/Hengyu
Expand Down
540 changes: 95 additions & 445 deletions Datadog/Datadog.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,6 @@
ReferencedContainer = "container:Datadog.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3CE11A2629F7BE1B00202522"
BuildableName = "DatadogWebViewTrackingTests.xctest"
BlueprintName = "DatadogWebViewTrackingTests tvOS"
ReferencedContainer = "container:Datadog.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down

This file was deleted.

37 changes: 18 additions & 19 deletions Datadog/E2ETests/E2ETests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
*/

import XCTest
import DatadogCore
import DatadogInternal
import DatadogLogs
import DatadogTrace
import DatadogRUM

@testable import DatadogCore

/// A base class for all E2E test cases.
class E2ETests: XCTestCase {
Expand All @@ -18,7 +23,14 @@ class E2ETests: XCTestCase {
super.setUp()
deleteAllSDKData()
if !skipSDKInitialization {
initializeSDK()
Datadog.initialize(
with: .e2e,
trackingConsent: .granted
)

Logs.enable()
Trace.enable()
RUM.enable(with: .e2e)
}
}

Expand Down Expand Up @@ -47,29 +59,15 @@ class E2ETests: XCTestCase {
let result = block()
let stop = Date()

let performanceSpan = DatadogTracer.shared().startRootSpan(operationName: "perf_measure", startTime: start)
performanceSpan.setTag(key: DDTags.resource, value: resourceName)
let performanceSpan = Tracer.shared().startRootSpan(operationName: "perf_measure", startTime: start)
performanceSpan.setTag(key: SpanTags.resource, value: resourceName)
performanceSpan.finish(at: stop)

return result
}

// MARK: - SDK Lifecycle

func initializeSDK(
trackingConsent: TrackingConsent = .granted,
configuration: Datadog.Configuration = Datadog.Configuration.builderUsingE2EConfig().build()
) {
Datadog.initialize(
appContext: .init(),
trackingConsent: trackingConsent,
configuration: configuration
)

DatadogTracer.initialize()
Global.rum = RUMMonitor.initialize()
}

/// Sends all collected data and deinitializes the SDK. It is executed synchronously.
private func sendAllDataAndDeinitializeSDK() {
Datadog.flushAndDeinitialize()
Expand All @@ -79,6 +77,7 @@ class E2ETests: XCTestCase {

/// Deletes persisted data for all SDK features. Ensures clean start for each test.
private func deleteAllSDKData() {
PersistenceHelpers.deleteAllSDKData()
let core = CoreRegistry.default as? DatadogCore
core?.stores.values.forEach { $0.storage.clearAllData() }
}
}
3 changes: 1 addition & 2 deletions Datadog/E2ETests/E2EUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import Foundation
import DatadogCore

/// Collection of utilities for creating values for facets configured in "Mobile - Integration" org.
struct DD {
Expand Down Expand Up @@ -98,7 +97,7 @@ struct DD {
/// Attributes added to each log event.
///
/// Each attributes has a facet used in monitor to assert that events are actually delivered.
static func logAttributes(functionName: StaticString = #function) -> [AttributeKey: AttributeValue] {
static func logAttributes(functionName: StaticString = #function) -> [String: Encodable] {
return [
"test_method_name": testMethodName(functionName: functionName)
]
Expand Down
9 changes: 4 additions & 5 deletions Datadog/E2ETests/Helpers/DatadogE2EHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
import DatadogCore

extension Datadog.Configuration {
static func builderUsingE2EConfig() -> Datadog.Configuration.Builder {
return builderUsing(
rumApplicationID: E2EConfig.readRUMApplicationID(),
static var e2e: Self {
.init(
clientToken: E2EConfig.readClientToken(),
environment: E2EConfig.readEnv()
).set(sampleTelemetry: 100)
env: E2EConfig.readEnv()
)
}
}
12 changes: 6 additions & 6 deletions Datadog/E2ETests/Helpers/LoggingE2EHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* Copyright 2019-Present Datadog, Inc.
*/

import DatadogLogs
import TestUtilities
import DatadogCore

extension Logger {
func sendRandomLog(with attributes: [AttributeKey: AttributeValue]) {
extension LoggerProtocol {
func sendRandomLog(with attributes: [String: Encodable]) {
let message: String = .mockRandom()
let error: Error? = Bool.random() ? ErrorMock(.mockRandom()) : nil

Expand All @@ -28,9 +28,9 @@ extension Logger {
}
}

extension Logger.Builder.ConsoleLogFormat {
static func random() -> Logger.Builder.ConsoleLogFormat {
let allFormats: [Logger.Builder.ConsoleLogFormat] = [
extension Logger.Configuration.ConsoleLogFormat {
static func random() -> Logger.Configuration.ConsoleLogFormat {
let allFormats: [Logger.Configuration.ConsoleLogFormat] = [
.short,
.shortWith(prefix: .mockRandom())
]
Expand Down
15 changes: 12 additions & 3 deletions Datadog/E2ETests/Helpers/RUME2EHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
* Copyright 2019-Present Datadog, Inc.
*/

import DatadogCore
@testable import DatadogRUM

extension DDRUMMonitor {
var dd: RUMMonitor { self as! RUMMonitor }
extension RUMMonitorProtocol {
var dd: Monitor { self as! Monitor }
}

extension RUM.Configuration {
static var e2e: Self {
.init(
applicationID: E2EConfig.readRUMApplicationID(),
telemetrySampleRate: 100
)
}
}
Loading