Skip to content

Commit 9311393

Browse files
dd-mergequeue[bot]maxepmariedmsimaoseica-ddncreated
authored
Merge pull request #2184 from DataDog/release/2.23.0
Release 2.23.0 Co-authored-by: maxep <maxime.epain@datadoghq.com> Co-authored-by: mariedm <29802155+mariedm@users.noreply.github.com> Co-authored-by: simaoseica-dd <simao.seica@datadoghq.com> Co-authored-by: ncreated <maciek.grzybowski@datadoghq.com> Co-authored-by: maciejburda <maciej.burda@datadoghq.com> Co-authored-by: dd-mergequeue[bot] <121105855+dd-mergequeue[bot]@users.noreply.github.com> Co-authored-by: Reallnas <arnaud.minier@datadoghq.com> Co-authored-by: gonzalezreal <guille.gonzalez@datadoghq.com>
2 parents 0e33fbf + 2f97fe6 commit 9311393

File tree

242 files changed

+18922
-463
lines changed

Some content is hidden

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

242 files changed

+18922
-463
lines changed

BenchmarkTests/BenchmarkTests.xcodeproj/project.pbxproj

+779-6
Large diffs are not rendered by default.

BenchmarkTests/BenchmarkTests.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</EnvironmentVariable>
5959
<EnvironmentVariable
6060
key = "BENCHMARK_SCENARIO"
61-
value = "sessionReplay"
61+
value = "sessionReplaySwiftUI"
6262
isEnabled = "YES">
6363
</EnvironmentVariable>
6464
</EnvironmentVariables>

BenchmarkTests/Runner/Scenarios/SessionReplay/SessionReplayScenario.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ struct SessionReplayScenario: Scenario {
3636
SessionReplay.enable(
3737
with: SessionReplay.Configuration(
3838
replaySampleRate: 100,
39-
defaultPrivacyLevel: .allow
39+
textAndInputPrivacyLevel: .maskSensitiveInputs,
40+
imagePrivacyLevel: .maskNone,
41+
touchPrivacyLevel: .show
4042
)
4143
)
4244

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
import Foundation
8+
import UIKit
9+
import SwiftUI
10+
11+
import DatadogCore
12+
import DatadogRUM
13+
import DatadogSessionReplay
14+
15+
import SwiftUICatalog
16+
17+
struct SessionReplaySwiftUIScenario: Scenario {
18+
var initialViewController: UIViewController {
19+
UIHostingController(rootView: SwiftUICatalog.ContentView(monitor: DatadogMonitor()))
20+
}
21+
22+
func instrument(with info: AppInfo) {
23+
Datadog.initialize(
24+
with: .benchmark(info: info),
25+
trackingConsent: .granted
26+
)
27+
28+
RUM.enable(
29+
with: RUM.Configuration(
30+
applicationID: info.applicationID
31+
)
32+
)
33+
34+
SessionReplay.enable(
35+
with: SessionReplay.Configuration(
36+
replaySampleRate: 100,
37+
textAndInputPrivacyLevel: .maskSensitiveInputs,
38+
imagePrivacyLevel: .maskNone,
39+
touchPrivacyLevel: .show,
40+
featureFlags: [.swiftui: true]
41+
)
42+
)
43+
44+
RUMMonitor.shared().addAttribute(forKey: "scenario", value: "SessionReplaySwiftUI")
45+
}
46+
}
47+
48+
private struct DatadogMonitor: SwiftUICatalog.DatadogMonitor {
49+
func viewModifier(name: String) -> AnyViewModifier {
50+
AnyViewModifier { content in
51+
content.trackRUMView(name: name)
52+
}
53+
}
54+
55+
func actionModifier(name: String) -> AnyViewModifier {
56+
AnyViewModifier { content in
57+
content.trackRUMTapAction(name: name)
58+
}
59+
}
60+
}

BenchmarkTests/Runner/Scenarios/SyntheticScenario.swift

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ internal struct SyntheticScenario: Scenario {
1313
/// The Synthetics benchmark scenario value.
1414
internal enum Name: String {
1515
case sessionReplay
16+
case sessionReplaySwiftUI
1617
}
1718
/// The scenario's name.
1819
let name: Name
@@ -36,6 +37,8 @@ internal struct SyntheticScenario: Scenario {
3637
switch name {
3738
case .sessionReplay:
3839
_scenario = SessionReplayScenario()
40+
case .sessionReplaySwiftUI:
41+
_scenario = SessionReplaySwiftUIScenario()
3942
}
4043

4144
self.name = name
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
import SwiftUI
8+
9+
public struct AnyViewModifier: ViewModifier {
10+
private let _body: (Content) -> AnyView
11+
12+
public init<Body: View>(@ViewBuilder body: @escaping (Content) -> Body) {
13+
self._body = { AnyView(body($0)) }
14+
}
15+
16+
public init() {
17+
self._body = { AnyView($0) }
18+
}
19+
20+
public func body(content: Content) -> some View {
21+
_body(content)
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "display-p3",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0.038",
9+
"green" : "0.005",
10+
"red" : "0.020"
11+
}
12+
},
13+
"idiom" : "universal"
14+
},
15+
{
16+
"appearances" : [
17+
{
18+
"appearance" : "luminosity",
19+
"value" : "dark"
20+
}
21+
],
22+
"color" : {
23+
"color-space" : "display-p3",
24+
"components" : {
25+
"alpha" : "1.000",
26+
"blue" : "0.323",
27+
"green" : "0.680",
28+
"red" : "0.596"
29+
}
30+
},
31+
"idiom" : "universal"
32+
}
33+
],
34+
"info" : {
35+
"author" : "xcode",
36+
"version" : 1
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0.122",
9+
"green" : "0.122",
10+
"red" : "0.129"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"platform" : "universal",
6+
"reference" : "labelColor"
7+
},
8+
"idiom" : "universal"
9+
},
10+
{
11+
"appearances" : [
12+
{
13+
"appearance" : "luminosity",
14+
"value" : "dark"
15+
}
16+
],
17+
"color" : {
18+
"platform" : "ios",
19+
"reference" : "labelColor"
20+
},
21+
"idiom" : "universal"
22+
}
23+
],
24+
"info" : {
25+
"author" : "xcode",
26+
"version" : 1
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0.651",
9+
"green" : "0.173",
10+
"red" : "0.388"
11+
}
12+
},
13+
"idiom" : "universal"
14+
}
15+
],
16+
"info" : {
17+
"author" : "xcode",
18+
"version" : 1
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "display-p3",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "1.000",
9+
"green" : "0.976",
10+
"red" : "0.973"
11+
}
12+
},
13+
"idiom" : "universal"
14+
},
15+
{
16+
"appearances" : [
17+
{
18+
"appearance" : "luminosity",
19+
"value" : "dark"
20+
}
21+
],
22+
"color" : {
23+
"color-space" : "display-p3",
24+
"components" : {
25+
"alpha" : "1.000",
26+
"blue" : "0.651",
27+
"green" : "0.173",
28+
"red" : "0.388"
29+
}
30+
},
31+
"idiom" : "universal"
32+
}
33+
],
34+
"info" : {
35+
"author" : "xcode",
36+
"version" : 1
37+
}
38+
}
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "5347-github_102542.png",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
},
12+
"properties" : {
13+
"preserves-vector-representation" : true
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "charleyrivers_feature@2x.jpg",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "stmarylake_feature@2x.jpg",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "turtlerock_feature@2x.jpg",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}

0 commit comments

Comments
 (0)