diff --git a/docs/getstarted/index.md b/docs/getstarted/index.md
index 6a4349747..b1f353633 100644
--- a/docs/getstarted/index.md
+++ b/docs/getstarted/index.md
@@ -32,7 +32,7 @@ This is going to be a crash course and I really recommend watching [What can go
You can now customize the configuration depending on what you need to do. However, a basic config that you can use to migrate from one team project to another with the same process will likley look somethig like:
```JSON
-{% include sampleConfig/configuration.json %}
+{% include sampleConfig/configuration-getstarted.json %}
```
The default [TfsWorkItemMigrationProcesor](_reference/reference.processors.tfsworkitemmigrationprocessor.md) processor will perform the following operations:
diff --git a/src/MigrationTools.Telemetery/.gitignore b/src/MigrationTools.Telemetery/.gitignore
new file mode 100644
index 000000000..ff5b00c50
--- /dev/null
+++ b/src/MigrationTools.Telemetery/.gitignore
@@ -0,0 +1,264 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# Azure Functions localsettings file
+local.settings.json
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+#*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush
+.cr/
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/GetShieldIoWorkItemMetrics.cs b/src/MigrationTools.Telemetery/GetShieldIoWorkItemMetrics.cs
new file mode 100644
index 000000000..430bca04e
--- /dev/null
+++ b/src/MigrationTools.Telemetery/GetShieldIoWorkItemMetrics.cs
@@ -0,0 +1,196 @@
+using System;
+using System.Text;
+using System.Threading.Tasks;
+using System.Net.Http;
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Azure.Functions.Worker;
+using Microsoft.Extensions.Caching.Memory;
+using Microsoft.Extensions.Logging;
+using Newtonsoft.Json;
+
+namespace MigrationTools.Telemetery
+{
+ public class GetShieldIoWorkItemMetrics
+ {
+ private static readonly HttpClient client = new HttpClient();
+ private readonly ILogger
_logger;
+ private readonly IMemoryCache _cache;
+ private static readonly TimeSpan CacheDuration = TimeSpan.FromMinutes(10); // Cache duration
+
+ public GetShieldIoWorkItemMetrics(ILogger logger, IMemoryCache cache)
+ {
+ _logger = logger;
+ _cache = cache;
+ }
+
+ [Function("GetShieldIoWorkItemMetrics_WorkItemTotals")]
+ public async Task GetShieldIoWorkItemMetrics_WorkItemTotals(
+ [HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
+ {
+ _logger.LogInformation("Processing request for Application Insights data.");
+
+ string appId = Environment.GetEnvironmentVariable("APP_INSIGHTS_APP_ID");
+ string apiKey = Environment.GetEnvironmentVariable("APP_INSIGHTS_API_KEY");
+
+ if (string.IsNullOrEmpty(appId) || string.IsNullOrEmpty(apiKey))
+ {
+ return new BadRequestObjectResult("Application Insights environment variables not set");
+ }
+
+ string versionPrefix = req.Query["version"]; // Get the 'version' query parameter if provided
+
+ // Check if cached result exists
+ if (!_cache.TryGetValue("ai_work_items", out AppInsightsResponse cachedData))
+ {
+ _logger.LogInformation("Cache miss. Fetching data from Application Insights.");
+
+ string query = @"
+ customMetrics
+ | where name == 'work_items_processed_total'
+ | summarize Total = sum(value) by application_Version";
+
+ var payload = new
+ {
+ query = query
+ };
+
+ client.DefaultRequestHeaders.Add("x-api-key", apiKey);
+ var content = new StringContent(JsonConvert.SerializeObject(payload), Encoding.UTF8, "application/json");
+ HttpResponseMessage response = await client.PostAsync($"https://api.applicationinsights.io/v1/apps/{appId}/query", content);
+
+ if (response.IsSuccessStatusCode)
+ {
+ string result = await response.Content.ReadAsStringAsync();
+ cachedData = JsonConvert.DeserializeObject(result);
+
+ // Cache the result with a defined expiration
+ _cache.Set("ai_work_items", cachedData, CacheDuration);
+ }
+ else
+ {
+ return new BadRequestObjectResult($"Error fetching data from Application Insights: {response.StatusCode}");
+ }
+ }
+ else
+ {
+ _logger.LogInformation("Cache hit. Returning cached data.");
+ }
+
+ // Check if the user requested a specific version prefix or if we should return the sum
+ double totalWorkItems = 0;
+ string formattedVersionLabel = "All Versions"; // Default label if no version is provided
+ if (!string.IsNullOrEmpty(versionPrefix))
+ {
+ // Sum totals for all versions that start with the provided version prefix
+ totalWorkItems = GetWorkItemTotalForVersionPrefix(cachedData, versionPrefix);
+ if (totalWorkItems == -1)
+ {
+ // No matching versions found, return "No Data" message
+ return new JsonResult(new
+ {
+ schemaVersion = 1,
+ label = $"Total Work Items ({FormatVersionLabel(versionPrefix)})",
+ message = "No Data",
+ color = "orange"
+ });
+ }
+
+ // Format the version label as X.Y.Z (3 digits)
+ formattedVersionLabel = FormatVersionLabel(versionPrefix);
+ }
+ else
+ {
+ // Sum all work items for all versions
+ totalWorkItems = GetTotalWorkItems(cachedData);
+ if (totalWorkItems == 0)
+ {
+ // No data found at all, return "No Data"
+ return new JsonResult(new
+ {
+ schemaVersion = 1,
+ label = "Total Work Items (All Versions)",
+ message = "No Data",
+ color = "orange"
+ });
+ }
+ }
+
+ // Create the response for Shields.io with total work items
+ var shieldsIoResponse = new
+ {
+ schemaVersion = 1,
+ label = $"Total Work Items ({formattedVersionLabel})",
+ message = totalWorkItems.ToString(),
+ color = "orange"
+ };
+
+ return new JsonResult(shieldsIoResponse);
+ }
+
+ // Method to calculate the total work items for all versions
+ private double GetTotalWorkItems(AppInsightsResponse appInsightsData)
+ {
+ double total = 0;
+ foreach (var row in appInsightsData.Tables[0].Rows)
+ {
+ total += Convert.ToDouble(row[1]); // Sum the "Total" column
+ }
+ return total;
+ }
+
+ // Method to get the work item total for all versions that start with the provided version prefix
+ private double GetWorkItemTotalForVersionPrefix(AppInsightsResponse appInsightsData, string versionPrefix)
+ {
+ double total = 0;
+ bool foundAnyMatchingVersion = false;
+
+ foreach (var row in appInsightsData.Tables[0].Rows)
+ {
+ string version = row[0].ToString(); // "application_Version" column
+ if (version.StartsWith(versionPrefix))
+ {
+ total += Convert.ToDouble(row[1]); // Sum the "Total" column for matching versions
+ foundAnyMatchingVersion = true;
+ }
+ }
+
+ return foundAnyMatchingVersion ? total : -1; // Return -1 if no matching versions were found
+ }
+
+ // Helper method to format the version label to always have three parts (e.g., X.Y.Z)
+ private string FormatVersionLabel(string version)
+ {
+ var versionParts = version.Split('.');
+ if (versionParts.Length == 1)
+ {
+ return $"{versionParts[0]}.0.0"; // Pad with .0.0
+ }
+ else if (versionParts.Length == 2)
+ {
+ return $"{versionParts[0]}.{versionParts[1]}.0"; // Pad with .0
+ }
+ return version; // Already in X.Y.Z format
+ }
+ }
+
+ // Classes to represent the structure of the Application Insights response
+ public class AppInsightsResponse
+ {
+ public List Tables { get; set; }
+ }
+
+ public class Table
+ {
+ public string Name { get; set; }
+ public List Columns { get; set; }
+ public List> Rows { get; set; }
+ }
+
+ public class Column
+ {
+ public string Name { get; set; }
+ public string Type { get; set; }
+ }
+}
diff --git a/src/MigrationTools.Telemetery/MigrationTools.Telemetery.csproj b/src/MigrationTools.Telemetery/MigrationTools.Telemetery.csproj
new file mode 100644
index 000000000..4ffe01ba9
--- /dev/null
+++ b/src/MigrationTools.Telemetery/MigrationTools.Telemetery.csproj
@@ -0,0 +1,30 @@
+
+
+ net8.0
+ v4
+ Exe
+ enable
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+ Never
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Program.cs b/src/MigrationTools.Telemetery/Program.cs
new file mode 100644
index 000000000..c2df7fbe4
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Program.cs
@@ -0,0 +1,14 @@
+using Microsoft.Azure.Functions.Worker;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+
+var host = new HostBuilder()
+ .ConfigureFunctionsWebApplication()
+ .ConfigureServices(services =>
+ {
+ services.AddApplicationInsightsTelemetryWorkerService();
+ services.ConfigureFunctionsApplicationInsights();
+ })
+ .Build();
+
+host.Run();
diff --git a/src/MigrationTools.Telemetery/Properties/PublishProfiles/MigrationToolsTelemetery - Web Deploy.pubxml b/src/MigrationTools.Telemetery/Properties/PublishProfiles/MigrationToolsTelemetery - Web Deploy.pubxml
new file mode 100644
index 000000000..818c6c3cb
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/PublishProfiles/MigrationToolsTelemetery - Web Deploy.pubxml
@@ -0,0 +1,23 @@
+
+
+
+
+ MSDeploy
+ AzureWebSite
+ Release
+ Any CPU
+ https://migrationtoolstelemetery.azurewebsites.net
+ false
+ /subscriptions/c2d1c3f0-0945-44b4-a0ba-67c45e9d16ac/resourceGroups/MigrationTools/providers/Microsoft.Web/sites/MigrationToolsTelemetery
+ win-x64
+ false
+ migrationtoolstelemetery.scm.azurewebsites.net:443
+ WMSVC
+ false
+ true
+ true
+ MigrationToolsTelemetery
+
+
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/appInsights1.arm.json b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/appInsights1.arm.json
new file mode 100644
index 000000000..b38ae846a
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/appInsights1.arm.json
@@ -0,0 +1,67 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "resourceGroupName": {
+ "type": "string",
+ "defaultValue": "MigrationTools",
+ "metadata": {
+ "_parameterType": "resourceGroup",
+ "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
+ }
+ },
+ "resourceGroupLocation": {
+ "type": "string",
+ "defaultValue": "northeurope",
+ "metadata": {
+ "_parameterType": "location",
+ "description": "Location of the resource group. Resource groups could have different location than resources."
+ }
+ },
+ "resourceLocation": {
+ "type": "string",
+ "defaultValue": "[parameters('resourceGroupLocation')]",
+ "metadata": {
+ "_parameterType": "location",
+ "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
+ }
+ }
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Resources/resourceGroups",
+ "name": "[parameters('resourceGroupName')]",
+ "location": "[parameters('resourceGroupLocation')]",
+ "apiVersion": "2019-10-01"
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('MigrationToolAI', subscription().subscriptionId)))]",
+ "resourceGroup": "[parameters('resourceGroupName')]",
+ "apiVersion": "2019-10-01",
+ "dependsOn": [
+ "[parameters('resourceGroupName')]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "kind": "web",
+ "name": "MigrationToolAI",
+ "type": "microsoft.insights/components",
+ "location": "[parameters('resourceLocation')]",
+ "properties": {},
+ "apiVersion": "2015-05-01"
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "metadata": {
+ "_dependencyType": "appInsights.azure"
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/profile.arm.json b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/profile.arm.json
new file mode 100644
index 000000000..fcacd5fc3
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/profile.arm.json
@@ -0,0 +1,113 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "metadata": {
+ "_dependencyType": "compute.appService.windows"
+ },
+ "parameters": {
+ "resourceGroupName": {
+ "type": "string",
+ "defaultValue": "MigrationTools",
+ "metadata": {
+ "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
+ }
+ },
+ "resourceGroupLocation": {
+ "type": "string",
+ "defaultValue": "northeurope",
+ "metadata": {
+ "description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
+ }
+ },
+ "resourceName": {
+ "type": "string",
+ "defaultValue": "MigrationToolsTelemetery",
+ "metadata": {
+ "description": "Name of the main resource to be created by this template."
+ }
+ },
+ "resourceLocation": {
+ "type": "string",
+ "defaultValue": "[parameters('resourceGroupLocation')]",
+ "metadata": {
+ "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
+ }
+ }
+ },
+ "variables": {
+ "appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
+ "appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Resources/resourceGroups",
+ "name": "[parameters('resourceGroupName')]",
+ "location": "[parameters('resourceGroupLocation')]",
+ "apiVersion": "2019-10-01"
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
+ "resourceGroup": "[parameters('resourceGroupName')]",
+ "apiVersion": "2019-10-01",
+ "dependsOn": [
+ "[parameters('resourceGroupName')]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "location": "[parameters('resourceLocation')]",
+ "name": "[parameters('resourceName')]",
+ "type": "Microsoft.Web/sites",
+ "apiVersion": "2015-08-01",
+ "tags": {
+ "[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
+ },
+ "dependsOn": [
+ "[variables('appServicePlan_ResourceId')]"
+ ],
+ "kind": "app",
+ "properties": {
+ "name": "[parameters('resourceName')]",
+ "kind": "app",
+ "httpsOnly": true,
+ "reserved": false,
+ "serverFarmId": "[variables('appServicePlan_ResourceId')]",
+ "siteConfig": {
+ "metadata": [
+ {
+ "name": "CURRENT_STACK",
+ "value": "dotnetcore"
+ }
+ ]
+ }
+ },
+ "identity": {
+ "type": "SystemAssigned"
+ }
+ },
+ {
+ "location": "[parameters('resourceLocation')]",
+ "name": "[variables('appServicePlan_name')]",
+ "type": "Microsoft.Web/serverFarms",
+ "apiVersion": "2015-08-01",
+ "sku": {
+ "name": "S1",
+ "tier": "Standard",
+ "family": "S",
+ "size": "S1"
+ },
+ "properties": {
+ "name": "[variables('appServicePlan_name')]"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/storage1.arm.json b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/storage1.arm.json
new file mode 100644
index 000000000..73bcb7e2e
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery - Web Deploy/storage1.arm.json
@@ -0,0 +1,70 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "resourceGroupName": {
+ "type": "string",
+ "defaultValue": "MigrationTools",
+ "metadata": {
+ "_parameterType": "resourceGroup",
+ "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
+ }
+ },
+ "resourceGroupLocation": {
+ "type": "string",
+ "defaultValue": "northeurope",
+ "metadata": {
+ "_parameterType": "location",
+ "description": "Location of the resource group. Resource groups could have different location than resources."
+ }
+ },
+ "resourceLocation": {
+ "type": "string",
+ "defaultValue": "[parameters('resourceGroupLocation')]",
+ "metadata": {
+ "_parameterType": "location",
+ "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
+ }
+ }
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Resources/resourceGroups",
+ "name": "[parameters('resourceGroupName')]",
+ "location": "[parameters('resourceGroupLocation')]",
+ "apiVersion": "2019-10-01"
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('migrationtoolstorewe', subscription().subscriptionId)))]",
+ "resourceGroup": "[parameters('resourceGroupName')]",
+ "apiVersion": "2019-10-01",
+ "dependsOn": [
+ "[parameters('resourceGroupName')]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "sku": {
+ "name": "Standard_LRS",
+ "tier": "Standard"
+ },
+ "kind": "Storage",
+ "name": "migrationtoolstorewe",
+ "type": "Microsoft.Storage/storageAccounts",
+ "location": "[parameters('resourceLocation')]",
+ "apiVersion": "2017-10-01"
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "metadata": {
+ "_dependencyType": "storage.azure"
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery/appInsights1.arm.json b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery/appInsights1.arm.json
new file mode 100644
index 000000000..b38ae846a
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery/appInsights1.arm.json
@@ -0,0 +1,67 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "resourceGroupName": {
+ "type": "string",
+ "defaultValue": "MigrationTools",
+ "metadata": {
+ "_parameterType": "resourceGroup",
+ "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
+ }
+ },
+ "resourceGroupLocation": {
+ "type": "string",
+ "defaultValue": "northeurope",
+ "metadata": {
+ "_parameterType": "location",
+ "description": "Location of the resource group. Resource groups could have different location than resources."
+ }
+ },
+ "resourceLocation": {
+ "type": "string",
+ "defaultValue": "[parameters('resourceGroupLocation')]",
+ "metadata": {
+ "_parameterType": "location",
+ "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
+ }
+ }
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Resources/resourceGroups",
+ "name": "[parameters('resourceGroupName')]",
+ "location": "[parameters('resourceGroupLocation')]",
+ "apiVersion": "2019-10-01"
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('MigrationToolAI', subscription().subscriptionId)))]",
+ "resourceGroup": "[parameters('resourceGroupName')]",
+ "apiVersion": "2019-10-01",
+ "dependsOn": [
+ "[parameters('resourceGroupName')]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "kind": "web",
+ "name": "MigrationToolAI",
+ "type": "microsoft.insights/components",
+ "location": "[parameters('resourceLocation')]",
+ "properties": {},
+ "apiVersion": "2015-05-01"
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "metadata": {
+ "_dependencyType": "appInsights.azure"
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery/storage1.arm.json b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery/storage1.arm.json
new file mode 100644
index 000000000..73bcb7e2e
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/ServiceDependencies/MigrationToolsTelemetery/storage1.arm.json
@@ -0,0 +1,70 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "resourceGroupName": {
+ "type": "string",
+ "defaultValue": "MigrationTools",
+ "metadata": {
+ "_parameterType": "resourceGroup",
+ "description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
+ }
+ },
+ "resourceGroupLocation": {
+ "type": "string",
+ "defaultValue": "northeurope",
+ "metadata": {
+ "_parameterType": "location",
+ "description": "Location of the resource group. Resource groups could have different location than resources."
+ }
+ },
+ "resourceLocation": {
+ "type": "string",
+ "defaultValue": "[parameters('resourceGroupLocation')]",
+ "metadata": {
+ "_parameterType": "location",
+ "description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
+ }
+ }
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Resources/resourceGroups",
+ "name": "[parameters('resourceGroupName')]",
+ "location": "[parameters('resourceGroupLocation')]",
+ "apiVersion": "2019-10-01"
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('migrationtoolstorewe', subscription().subscriptionId)))]",
+ "resourceGroup": "[parameters('resourceGroupName')]",
+ "apiVersion": "2019-10-01",
+ "dependsOn": [
+ "[parameters('resourceGroupName')]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "sku": {
+ "name": "Standard_LRS",
+ "tier": "Standard"
+ },
+ "kind": "Storage",
+ "name": "migrationtoolstorewe",
+ "type": "Microsoft.Storage/storageAccounts",
+ "location": "[parameters('resourceLocation')]",
+ "apiVersion": "2017-10-01"
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "metadata": {
+ "_dependencyType": "storage.azure"
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/launchSettings.json b/src/MigrationTools.Telemetery/Properties/launchSettings.json
new file mode 100644
index 000000000..1e26bb917
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/launchSettings.json
@@ -0,0 +1,9 @@
+{
+ "profiles": {
+ "MigrationTools.Telemetery": {
+ "commandName": "Project",
+ "commandLineArgs": "--port 7008",
+ "launchBrowser": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/serviceDependencies.MigrationToolsTelemetery - Web Deploy.json b/src/MigrationTools.Telemetery/Properties/serviceDependencies.MigrationToolsTelemetery - Web Deploy.json
new file mode 100644
index 000000000..50afcd51e
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/serviceDependencies.MigrationToolsTelemetery - Web Deploy.json
@@ -0,0 +1,14 @@
+{
+ "dependencies": {
+ "storage1": {
+ "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/migrationtoolstorewe",
+ "type": "storage.azure",
+ "connectionId": "AzureWebJobsStorage"
+ },
+ "appInsights1": {
+ "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/microsoft.insights/components/MigrationToolAI",
+ "type": "appInsights.azure",
+ "connectionId": "APPLICATIONINSIGHTS_CONNECTION_STRING"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/serviceDependencies.MigrationToolsTelemetery.json b/src/MigrationTools.Telemetery/Properties/serviceDependencies.MigrationToolsTelemetery.json
new file mode 100644
index 000000000..e60b0ebf4
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/serviceDependencies.MigrationToolsTelemetery.json
@@ -0,0 +1,14 @@
+{
+ "dependencies": {
+ "appInsights1": {
+ "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/microsoft.insights/components/MigrationToolAI",
+ "type": "appInsights.azure",
+ "connectionId": "APPLICATIONINSIGHTS_CONNECTION_STRING"
+ },
+ "storage1": {
+ "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/migrationtoolstorewe",
+ "type": "storage.azure",
+ "connectionId": "AzureWebJobsStorage"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/serviceDependencies.json b/src/MigrationTools.Telemetery/Properties/serviceDependencies.json
new file mode 100644
index 000000000..ce1d90cda
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/serviceDependencies.json
@@ -0,0 +1,12 @@
+{
+ "dependencies": {
+ "storage1": {
+ "type": "storage",
+ "connectionId": "AzureWebJobsStorage"
+ },
+ "appInsights1": {
+ "type": "appInsights",
+ "connectionId": "APPLICATIONINSIGHTS_CONNECTION_STRING"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/Properties/serviceDependencies.local.json b/src/MigrationTools.Telemetery/Properties/serviceDependencies.local.json
new file mode 100644
index 000000000..5a956e859
--- /dev/null
+++ b/src/MigrationTools.Telemetery/Properties/serviceDependencies.local.json
@@ -0,0 +1,7 @@
+{
+ "dependencies": {
+ "appInsights1": {
+ "type": "appInsights.sdk"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools.Telemetery/host.json b/src/MigrationTools.Telemetery/host.json
new file mode 100644
index 000000000..ee5cf5f83
--- /dev/null
+++ b/src/MigrationTools.Telemetery/host.json
@@ -0,0 +1,12 @@
+{
+ "version": "2.0",
+ "logging": {
+ "applicationInsights": {
+ "samplingSettings": {
+ "isEnabled": true,
+ "excludedTypes": "Request"
+ },
+ "enableLiveMetricsFilters": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MigrationTools/Services/ActivitySourceProvider.cs b/src/MigrationTools/Services/ActivitySourceProvider.cs
index 21e6c3f0c..0f2f7af19 100644
--- a/src/MigrationTools/Services/ActivitySourceProvider.cs
+++ b/src/MigrationTools/Services/ActivitySourceProvider.cs
@@ -22,8 +22,7 @@ namespace MigrationTools.Services
public class ActivitySourceProvider
{
public static readonly string ActivitySourceName = "MigrationTools";
- //private static string OpenTelemetryConnectionString = "InstrumentationKey=823d0de3-69c9-42ee-b902-de7675f681bc;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=4dd8f684-2f91-48ac-974f-dc898b686786";
- private static string MigrationToolAIConnectionString = "InstrumentationKey=2d666f84-b3fb-4dcf-9aad-65de038d2772;IngestionEndpoint=https://northeurope-0.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=9146fe72-5c18-48d7-a0f2-8fb891ef1277";
+ private static string OpenTelemetryConnectionString = "InstrumentationKey=823d0de3-69c9-42ee-b902-de7675f681bc;IngestionEndpoint=https://westeurope-5.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=4dd8f684-2f91-48ac-974f-dc898b686786";
public static ActivitySource ActivitySource { get; private set; }
@@ -33,7 +32,7 @@ public class ActivitySourceProvider
public static string GetConnectionString()
{
- return MigrationToolAIConnectionString;
+ return OpenTelemetryConnectionString;
}