Skip to content

Commit

Permalink
Merge pull request #7434 from vector-im/andy/local_feature
Browse files Browse the repository at this point in the history
Increase local rust crypto rollout to 20% of all users
  • Loading branch information
Anderas authored Mar 21, 2023
2 parents 7f5d3b4 + 51ee925 commit 814af5a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Riot/Experiments/CryptoSDKFeature.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//

import Foundation
import MatrixSDKCrypto

/// An implementation of `MXCryptoV2Feature` which uses `UserDefaults` to persist the enabled status
/// of `CryptoSDK`, and which uses feature flags to control rollout availability.
Expand All @@ -30,6 +31,11 @@ import Foundation
@objc class CryptoSDKFeature: NSObject, MXCryptoV2Feature {
@objc static let shared = CryptoSDKFeature()

var version: String {
// Will be moved into the olm machine as API
Bundle(for: OlmMachine.self).infoDictionary?["CFBundleShortVersionString"] as? String ?? ""
}

var isEnabled: Bool {
RiotSettings.shared.enableCryptoSDK
}
Expand All @@ -45,7 +51,7 @@ import Foundation
// Local feature is currently set to 0% target, and all availability is fully controlled
// by the remote feature. Once the remote is fully rolled out, target for local feature will
// be gradually increased.
targetPercentage: 0.0
targetPercentage: 0.2
)
}

Expand Down
3 changes: 3 additions & 0 deletions Riot/Modules/Analytics/SentryMonitoringClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ struct SentryMonitoringClient {
if let message = event.message?.formatted {
event.fingerprint = [message]
}
event.tags = [
"crypto_module": MXSDKOptions.sharedInstance().cryptoModuleId
]
MXLog.debug("[SentryMonitoringClient] Issue detected: \(event)")
return event
}
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-7434.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Crypto: Increase local rust crypto rollout to 20% of all users

0 comments on commit 814af5a

Please sign in to comment.