From e79284db5b2fff7c69211085deb0978c18f5ebea Mon Sep 17 00:00:00 2001 From: MikhailSuendukov <110986399+MikhailSuendukov@users.noreply.github.com> Date: Fri, 22 Sep 2023 13:28:23 +0200 Subject: [PATCH] Add dataResidencyRegion option for sending to portal (#1752) Co-authored-by: AnatolyPristensky --- Apps/Contoso.MAUI.Demo/App.xaml.cs | 1 + Apps/Contoso.MAUI.Demo/Constants.cs | 1 + .../ModulePages/AppCenterContentPage.xaml | 7 +++++ .../ModulePages/AppCenterContentPage.xaml.cs | 9 +++++++ .../Contoso.WinUI.Desktop.Demo/App.xaml.cs | 2 ++ .../Contoso.WinUI.Desktop.Demo/Constants.cs | 1 + .../MainWindow.xaml | 11 ++++++++ .../MainWindow.xaml.cs | 12 +++++++++ .../Contoso.WinUI.Desktop.Puppet/App.xaml.cs | 2 ++ .../Contoso.WinUI.Desktop.Puppet/Constants.cs | 1 + .../MainWindow.xaml | 11 ++++++++ .../MainWindow.xaml.cs | 12 +++++++++ CHANGELOG.md | 4 ++- .../Microsoft.AppCenter.Android/AppCenter.cs | 10 +++++++ .../ApiDefinition.cs | 10 +++++++ .../Microsoft.AppCenter.Apple/AppCenter.cs | 10 +++++++ .../AppCenter.cs | 27 +++++++++++++++++-- .../Channel/Channel.cs | 1 + .../Ingestion/Models/Log.cs | 12 ++++++++- .../Ingestion/Models/LogWithProperties.cs | 5 ++-- .../Ingestion/Models/StartServiceLog.cs | 5 ++-- .../AppCenter.Shared.cs | 20 ++++++++++++++ .../Microsoft.AppCenter/AppCenter.cs | 9 +++++++ .../Analytics.cs | 2 +- .../Ingestion/Models/EventLog.cs | 5 ++-- .../Ingestion/Models/PageLog.cs | 5 ++-- .../Ingestion/Models/StartSessionLog.cs | 5 ++-- .../Crashes.cs | 3 ++- .../Ingestion/Models/AbstractErrorLog.cs | 5 ++-- .../Ingestion/Models/HandledErrorLog.cs | 5 ++-- .../Ingestion/Models/ManagedErrorLog.cs | 5 ++-- .../Utils/ErrorLogHelper.cs | 1 + .../Distribute/DistributeUpdateTest.cs | 6 +++-- .../AppCenterTest.cs | 16 +++++++++++ .../Ingestion/Models/LogTest.cs | 12 +++++++++ .../Ingestion/Models/LogWithPropertiesTest.cs | 2 +- scripts/configuration/ac-build-config.xml | 4 +-- 37 files changed, 232 insertions(+), 27 deletions(-) diff --git a/Apps/Contoso.MAUI.Demo/App.xaml.cs b/Apps/Contoso.MAUI.Demo/App.xaml.cs index a1694e441..491153b91 100644 --- a/Apps/Contoso.MAUI.Demo/App.xaml.cs +++ b/Apps/Contoso.MAUI.Demo/App.xaml.cs @@ -77,6 +77,7 @@ private void StartAppCenter() { AppCenter.SetMaxStorageSizeAsync(Preferences.Get(Constants.StorageMaxSize, 0)); } + AppCenter.PlatformSetDataResidencyRegion(Preferences.Get(Constants.DataResidencyRegion, null)); var appSecret = GetTokensString(); AppCenter.Start(appSecret, typeof(Analytics), typeof(Crashes), typeof(Distribute)); diff --git a/Apps/Contoso.MAUI.Demo/Constants.cs b/Apps/Contoso.MAUI.Demo/Constants.cs index 44e96fb59..f8c421579 100644 --- a/Apps/Contoso.MAUI.Demo/Constants.cs +++ b/Apps/Contoso.MAUI.Demo/Constants.cs @@ -12,5 +12,6 @@ public static class Constants public const string StorageMaxSize = "storage-max-size"; public const string EnableManualSessionTracker = "enable-manual-session-tracker"; public const string CountryCode = "country-code"; + public const string DataResidencyRegion = "data-residency-region"; public const string EnabledForDebuggableBuild = "enabled-for-debuggable-build"; } diff --git a/Apps/Contoso.MAUI.Demo/ModulePages/AppCenterContentPage.xaml b/Apps/Contoso.MAUI.Demo/ModulePages/AppCenterContentPage.xaml index 4678a7c4c..206b3683e 100644 --- a/Apps/Contoso.MAUI.Demo/ModulePages/AppCenterContentPage.xaml +++ b/Apps/Contoso.MAUI.Demo/ModulePages/AppCenterContentPage.xaml @@ -28,5 +28,12 @@