{"id":19099899,"url":"https://github.com/microsoft/ApplicationInsights-aspnetcore","last_synced_at":"2025-04-18T17:32:17.100Z","repository":{"id":28891160,"uuid":"32415843","full_name":"microsoft/ApplicationInsights-aspnetcore","owner":"microsoft","description":"ASP.NET Core web applications monitoring","archived":true,"fork":false,"pushed_at":"2020-06-09T19:34:42.000Z","size":17424,"stargazers_count":313,"open_issues_count":1,"forks_count":123,"subscribers_count":115,"default_branch":"develop","last_synced_at":"2024-11-07T20:14:06.007Z","etag":null,"topics":["application-insights","aspnetcore","azure","c-sharp","distributed-tracing","dotnetcore","monitoring","observability","telemetry"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-17T19:39:40.000Z","updated_at":"2024-10-17T20:47:23.000Z","dependencies_parsed_at":"2022-09-03T09:03:05.085Z","dependency_job_id":null,"html_url":"https://github.com/microsoft/ApplicationInsights-aspnetcore","commit_stats":null,"previous_names":["microsoft/applicationinsights-aspnet5"],"tags_count":62,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FApplicationInsights-aspnetcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FApplicationInsights-aspnetcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FApplicationInsights-aspnetcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FApplicationInsights-aspnetcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/ApplicationInsights-aspnetcore/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783108,"owners_count":17201903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application-insights","aspnetcore","azure","c-sharp","distributed-tracing","dotnetcore","monitoring","observability","telemetry"],"created_at":"2024-11-09T03:52:21.580Z","updated_at":"2024-11-09T03:52:42.377Z","avatar_url":"https://github.com/microsoft.png","language":"C#","funding_links":[],"categories":["monitoring","azure"],"sub_categories":[],"readme":"# This repo is in the process of being migrated\n\nPlease pardon our progress...\nWe are currently in the process of consolidating our github repos.\nSee https://github.com/microsoft/ApplicationInsights-dotnet/issues/1214\n\n\n\n\n\n## NuGet packages\n\n- [Microsoft.ApplicationInsights.AspNetCore](https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore/)\n[![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.AspNetCore.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore)\n- [Microsoft.ApplicationInsights.WorkerService](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WorkerService/)\n[![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.WorkerService.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.WorkerService)\n\n\n\nWindows: [![Build Status](https://mseng.visualstudio.com/AppInsights/_apis/build/status/ChuckNorris/AI_ASPNETCore_Develop?branchName=develop)](https://mseng.visualstudio.com/AppInsights/_build/latest?definitionId=3717\u0026branchName=develop)\n\nLinux :[![Build Status](https://mseng.visualstudio.com/AppInsights/_apis/build/status/ChuckNorris/AI-AspNetCoreSDK-develop-linux?branchName=develop)](https://mseng.visualstudio.com/AppInsights/_build/latest?definitionId=6273\u0026branchName=develop)\n\n\nMicrosoft Application Insights for ASP.NET Core applications\n=============================================================\n\nThis repository has a code for [Application Insights monitoring](http://azure.microsoft.com/en-us/services/application-insights/) of [ASP.NET Core](https://docs.microsoft.com/aspnet/core) applications. Read about contribution policies on Application Insights Home [repository](https://github.com/microsoft/ApplicationInsights-home)\n\nGetting Started\n---------------\n\n[Application Insights monitoring](http://azure.microsoft.com/en-us/services/application-insights/) is a service that allows you to collect monitoring and diagnostics information about your application. The [getting started](https://docs.microsoft.com/azure/azure-monitor/app/asp-net-core) guide shows how you can onboard your ASP.NET Core web application to use the Application Insights SDK.\n\n\nRepository structure\n--------------------\n\n```\nroot\\\n    ApplicationInsights.AspNetCore.sln - Main Solution\n\n    src\\\n        ApplicationInsights.AspNetCore - Application Insights package\n\n    test\\\n        ApplicationInsights.AspNetCore.Tests - Unit tests\n        FunctionalTestUtils - Test utilities for functional tests\n        MVCFramework.FunctionalTests - functional tests for MVC application targeting NetCore1.1,NetCore2.0 and NET45\n        WebApi.FunctionalTests - functional tests for Web API application targeting NetCore1.1,NetCore2.0 and NET45\n\t\tEmptyApp.FunctionalTests - functional tests for an Empty application targeting NetCore1.1,NetCore2.0 and NET45\n        PerfTest - performance test\n```\n\nDeveloping\n----------\nTo successfully build the sources on your machine, make sure you've installed the following prerequisites:\n* Visual Studio 2017 Community or Enterprise. Please make sure to install all the latest updates to Visual Studio\n* .NET Framework 4.6\n* .NET Core SDK 1.1.7\n* .NET Core SDK 2.0 or above.(https://www.microsoft.com/net/download/windows)\n\n## Building\nOnce you've installed the prerequisites execute ```buildDebug.cmd``` or ```buildRelease.cmd``` script in the repository root to build the project locally.\nYou can also open the solution in Visual Studio and build the ApplicationInsights.AspNetCore.sln solution directly.\n\n## Testing/Debugging\nExecute the ```RunTests.cmd``` script in the repository root.\n\nYou can also open the solution in Visual Studio and run tests directly from Visual Studio Test Explorer. However, as the tests has multiple targets, Test Explorer only shows the first target\nfrom \u003cTargetFrameworks\u003e in .csproj. To debug/run tests from a particular TargetFramework with Visual Studio, only option is to re-arrange the \u003cTargetFrameworks\u003e\nsuch that the intended target comes first. This is a Visual Studio limitation and is likely removed in the future.\n\n\nRunning and writing tests\n-------------------------\nThere are two sets of tests unit tests and functional tests. Please use unit tests for all features testing. The purpose of functional tests is just end-to-end validation of functionality on sample applications.\n\n*Functional tests*\nFunctional tests are regular web applications with unit tests integrated into them. Application can be compiled as a regular web application as well as set of tests. Typical functional tests will do the following:\n\n1. Host the current project in In-Proc server.\n2. Initialize application insights telemetry channel.\n3. Initiate request to self hosted web application using HttpClient.\n4. Check data received in telemetry channel.\n\nThe following are modifications made to a regular web application to make it work this way:\n\nAdd dependencies to .csproj:\n\n```\n\"FunctionalTestUtils\": \"1.0.0-*\",\n\"dotnet.test.xunit\": \"1.0.0-*\",\n\"xunit\": \"2.1.0\"\n```\n\nand test command:\n\n```\n\"test\": \"xunit\"\n```\n\nAdd this initialization logic to Startup.cs:\n\n```\nservices.AddFunctionalTestTelemetryChannel();\n```\n\n\n## Branches\n- We follow the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model) model.\n- [master](https://github.com/Microsoft/ApplicationInsights-aspnetcore/tree/master) has the _latest_ version released on [NuGet.org](https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore).\n- [develop](https://github.com/Microsoft/ApplicationInsights-aspnetcore/tree/develop) has the code for the _next_ release.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2FApplicationInsights-aspnetcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2FApplicationInsights-aspnetcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2FApplicationInsights-aspnetcore/lists"}