Ejemplo n.º 1
0
        public void Initialize(ITelemetry telemetry)
        {
            telemetry.Context.GlobalProperties["Environment"] = ThisAppVersionInfo.GetDeploymentType() ?? "Local";

            // Always default to Local if we're in the debugger
            if (Debugger.IsAttached)
            {
                telemetry.Context.GlobalProperties["Environment"] = "Local";
            }
        }
Ejemplo n.º 2
0
        private void App_Startup(object sender, StartupEventArgs e)
        {
            TelemetryClient.InstrumentationKey = "52dd7c90-6256-4d23-bbc5-e3e175c632f4";

            // Set session data:
            TelemetryClient.Context.User.Id                = Environment.UserName;
            TelemetryClient.Context.Session.Id             = Guid.NewGuid().ToString();
            TelemetryClient.Context.Device.OperatingSystem = Environment.OSVersion.ToString();
            TelemetryClient.Context.Component.Version      = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            TelemetryClient.Context.GlobalProperties.Add("DeploymentType", ThisAppVersionInfo.GetDeploymentType());
            // Log a page view:
            TelemetryClient.TrackTrace("App Start");
        }
Ejemplo n.º 3
0
        private void App_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
        {
            clock.Stop();
            var elapsed = clock.Elapsed;

            mainWindow.statusBarTimeElapsed.Content = elapsed.Humanize(2, false);
            DiagnosticsClient.TrackEvent("StartupPerf",
                                         new Dictionary <string, string> {
                { "DeploymentType", ThisAppVersionInfo.GetDeploymentType() }, { "NetFlavor", ThisAppVersionInfo.GetDotNetInfo() }
            },
                                         new Dictionary <string, double> {
                { "startupTime", elapsed.TotalMilliseconds }
            });
        }
Ejemplo n.º 4
0
 private void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     Navigation.Navigation.Navigate(new Uri("Views/MainPage.xaml", UriKind.RelativeOrAbsolute));
     ((ShellViewModel)this.DataContext).StartUpTime = App.Clock.Elapsed.Humanize(2, false);
     this.Title += $"{ThisAppVersionInfo.ProductVersion} [{ThisAppVersionInfo.GetDeploymentType()}] [{ThisAppVersionInfo.GetDotNetInfo()}]";
 }
Ejemplo n.º 5
0
 private void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     Navigation.Navigation.Navigate(new Uri("Views/MainPage.xaml", UriKind.RelativeOrAbsolute));
     this.Title += $"{ThisAppVersionInfo.ProductVersion} [{ThisAppVersionInfo.GetDeploymentType()}] [{ThisAppVersionInfo.GetDotNetInfo()}]";
 }