You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Network
import CoreTelephony
func checkNetworkType(){letmonitor=NWPathMonitor()letqueue=DispatchQueue(label:"NetworkMonitor")
monitor.pathUpdateHandler ={ path in
if path.status ==.satisfied {// Device is connected to the internet
if path.usesInterfaceType(.cellular){// Cellular connectionletnetworkInfo=CTTelephonyNetworkInfo()
if let carrierType = networkInfo.serviceCurrentRadioAccessTechnology?.values.first {
switch carrierType {case CTRadioAccessTechnologyLTE:print("Connected via 4G (LTE)")case CTRadioAccessTechnologyNRNSA, CTRadioAccessTechnologyNR:print("Connected via 5G")default:print("Other cellular network (3G, etc.)")}}}else if path.usesInterfaceType(.wifi){print("Connected via WiFi")}}else{print("No internet connection")}}
monitor.start(queue: queue)}
Description
Sentry events currently show Connection Type, but only with values
wifi
,ethernet
,cellular
, ornull
. https://github.com/getsentry/sentry-java/blob/5b8a9a6b2d40e03d1e5d0a38237db370c0f6cfd0/sentry-android-core/src/main/java/io/sentry/android/core/internal/util/ConnectivityChecker.java#L195Extend the
connection_type
field to include cellular network technology (3G, 4G LTE, and 5G etc.).From getsentry/team-mobile#150
The text was updated successfully, but these errors were encountered: