Skip to content

Commit

Permalink
test: Remove metrics API from the iOS-Swift sample (#4249)
Browse files Browse the repository at this point in the history
We plan on deprecating the existing metrics API. Therefore, we can
already remove the usages in the iOS-Swift sample app to minimize side
effects for UI tests.
  • Loading branch information
philipphofmann committed Aug 8, 2024
1 parent 5bcb070 commit 9067467
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
7 changes: 0 additions & 7 deletions Samples/iOS-Swift/iOS-Swift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return scope
}
})

SentrySDK.metrics.increment(key: "app.start", value: 1.0, tags: ["view": "app-delegate"])

}
//swiftlint:enable function_body_length cyclomatic_complexity
Expand All @@ -173,11 +171,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
AppDelegate.startSentry()
}

randomDistributionTimer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { _ in
let random = Double.random(in: 0..<1_000)
SentrySDK.metrics.distribution(key: "random.distribution", value: random)
}

if #available(iOS 15.0, *) {
metricKit.receiveReports()
}
Expand Down
6 changes: 0 additions & 6 deletions Samples/iOS-Swift/iOS-Swift/ErrorsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ class ErrorsViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
SentrySDK.reportFullyDisplayed()

SentrySDK.metrics.increment(key: "load.errors.view.controller")

SentrySDK.metrics.timing(key: "timing.some.delayed") {
Thread.sleep(forTimeInterval: 0.01)
}
}

@IBAction func useAfterFree(_ sender: UIButton) {
Expand Down

0 comments on commit 9067467

Please sign in to comment.