This commit is contained in:
Expecho 2020-07-03 11:52:09 +02:00
Родитель a58783ca7f 8256bad3f9
Коммит e65d1edada
139 изменённых файлов: 867 добавлений и 3130 удалений

6
.github/ISSUE_TEMPLATE/auto_instrumentation_issue.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,6 @@
---
name: Issue with Auto Instrumentation / Codeless Attach
about: Need help with Auto Instrumentation / Codeless Attach
---
If you're using [auto-instrumentation](https://docs.microsoft.com/azure/azure-monitor/app/codeless-overview), get support from [Azure Support Center](https://azure.microsoft.com/support/create-ticket/).

6
.github/ISSUE_TEMPLATE/azure_application_insights_profiler.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,6 @@
---
name: Issue with Application Insights Profiler
about: Need help with Application Insights Profiler
---
If you're seeing issue with [Application Insights Profiler](https://docs.microsoft.com/azure/azure-monitor/app/profiler-overview), get support from [Azure Support Center](https://azure.microsoft.com/support/create-ticket/).

6
.github/ISSUE_TEMPLATE/azure_functions_issue.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,6 @@
---
name: Issue with Azure Functions
about: Need help with Azure Functions
---
If you're running the application in Azure Functions, please file an issue [here](https://github.com/Azure/azure-functions-host/issues/new/choose).

6
.github/ISSUE_TEMPLATE/azure_snapshot_debugger_issue.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,6 @@
---
name: Issue with Application Insights Snapshot Debugger
about: Need help with Application Insights Snapshot Debugger
---
If you're seeing issue with [Application Insights Snapshot Debugger](https://docs.microsoft.com/azure/azure-monitor/app/snapshot-debugger), get support from [Azure Support Center](https://azure.microsoft.com/support/create-ticket/).

25
.github/ISSUE_TEMPLATE/bug_report.md поставляемый
Просмотреть файл

@ -4,22 +4,19 @@ about: Create a report to help us improve
labels: bug
---
**Describe your environment.** Describe any aspect of your environment relevant to the problem:
* SDK version:
* .NET runtime version (.NET or .NET Core, TargetFramework in the .csproj file):
* Hosting Info (IIS/Azure WebApps/etc):
* Platform and OS version:
* List of [NuGet packages](https://github.com/microsoft/ApplicationInsights-dotnet#nuget-packages) and version that you are using:
* Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the `*.csproj` file):
* Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):
If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on master.
### Describe the bug
**Steps to reproduce.**
Describe exactly how to reproduce the error. Include a code sample if applicable.
A clear and concise description of what the bug is.
**What is the expected behavior?**
What did you expect to see?
### To Reproduce
**What is the actual behavior?**
What did you see instead?
Create a self-contained project using the template of your choice, apply the minimum required code to result in the issue you're observing.
**Additional context.**
Add any other context about the problem here.
We will close this issue if:
* The repro project you share with us is complex. We can't investigate custom projects, so don't point us to such, please.
* If we will not be able to repro the behavior you're reporting

13
.github/ISSUE_TEMPLATE/question.md поставляемый
Просмотреть файл

@ -4,15 +4,10 @@ about: Create a question to help us improve our knowledgebase and documentation
labels: question
---
**Describe your environment.**
Describe any aspect of your environment relevant to the question:
* SDK version:
* .NET runtime version (.NET or .NET Core, TargetFramework in the .csproj file):
* Hosting Info (IIS/Azure WebApps/etc):
* Platform and OS version:
* List of [NuGet packages](https://github.com/microsoft/ApplicationInsights-dotnet#nuget-packages) and version that you are using:
* Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the `*.csproj` file):
* Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):
**What are you trying to achieve?**
What did you expect to see?
**Additional context.**
Add any other context about the problem here.
**What have you tried so far?**

Просмотреть файл

@ -11,18 +11,15 @@
<Import Project=".\_GlobalStaticVersion.props" />
<Import Project=".\_Nupkg.props" />
<ItemGroup Condition=" $(OS) == 'Windows_NT' And $(Configuration) == 'Release'">
<ItemGroup Condition=" $(OS) == 'Windows_NT'">
<!--Analyzers-->
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="2.9.8">
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.0.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
@ -37,5 +34,12 @@
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<PropertyGroup>
<!--Removing the SRC folder from the output directory-->
<CorePath>$(RelativeOutputPathBase)</CorePath>
<OutputPath>$(BinRoot)\$(Configuration)\$(CorePath)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
</PropertyGroup>
</Project>

Просмотреть файл

@ -8,4 +8,8 @@
<Import Project=".\_Common.props" />
<Import Project=".\_AnalyzerSettings.props" />
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
</Project>

Просмотреть файл

@ -15,11 +15,6 @@
<!-- https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/warn-compiler-option -->
<WarningLevel>4</WarningLevel>
<!-- TODO: NEEDS INVESTIGATION. This has some conflicts with the functional test apps using dirs.proj -->
<!-- https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/langversion-compiler-option -->
<!-- https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version -->
<!--<LangVersion>7.3</LangVersion>-->
</PropertyGroup>

Просмотреть файл

@ -13,7 +13,7 @@
<SemanticVersionMajor>2</SemanticVersionMajor>
<SemanticVersionMinor>15</SemanticVersionMinor> <!-- If changing the Minor version, also update the Date value. -->
<SemanticVersionPatch>0</SemanticVersionPatch>
<PreReleaseMilestone>beta1</PreReleaseMilestone> <!--Valid values: beta1, beta2, EMPTY for stable -->
<PreReleaseMilestone>beta2</PreReleaseMilestone> <!--Valid values: beta1, beta2, EMPTY for stable -->
<PreReleaseMilestone Condition="'$(NightlyBuild)' == 'True'">nightly</PreReleaseMilestone> <!-- Overwrite this property for nightly builds from the DEVELOP branch. -->
<!--
Date when Semantic Version was changed.

Просмотреть файл

@ -50,10 +50,7 @@
<PropertyGroup Condition="$(BuildServer) == 'true'">
<!-- indicate that the build executes on a build/CI server -->
<!-- <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> -->
<!-- mapping all source paths included in the project outputs to deterministic values -->
<!-- <DeterministicSourcePaths>true</DeterministicSourcePaths> -->
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<!-- produce an assembly whose byte-for-byte output is identical across compilations for identical inputs-->
<Deterministic>true</Deterministic>
@ -67,16 +64,6 @@
<!-- <PackageTags>$(PackageTags) newTag1 newTag2</PackageTags> -->
</PropertyGroup>
<PropertyGroup>
<!-- Disable auto generation of package attributes. This resolves the 'Duplicate attribute' error. -->
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
</PropertyGroup>
<Target Name="FixXmlDocumentation" AfterTargets="AfterBuild" DependsOnTargets="AfterBuild" Condition="$(OS) == 'Windows_NT'">
<!-- This target will add an English localization tag to our xml documentation file. -->
<InjectXmlLanguage FilePath="$(OutputPath)\$(AssemblyName).XML" />

Просмотреть файл

@ -1,69 +0,0 @@
Microsoft.ApplicationInsights.Common.ActiveSubsciptionManager
Microsoft.ApplicationInsights.Common.ActiveSubsciptionManager.ActiveSubsciptionManager() -> void
Microsoft.ApplicationInsights.Common.ActiveSubsciptionManager.Attach(object subscription) -> void
Microsoft.ApplicationInsights.Common.ActiveSubsciptionManager.Detach(object subscription) -> void
Microsoft.ApplicationInsights.Common.ActiveSubsciptionManager.IsActive(object subscriber) -> bool
Microsoft.ApplicationInsights.Common.ConditionalWeakTableExtensions
Microsoft.ApplicationInsights.Common.InjectionGuardConstants
Microsoft.ApplicationInsights.Common.StringUtilities
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.DependencyTrackingTelemetryModule() -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.DisableDiagnosticSourceInstrumentation.get -> bool
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.DisableDiagnosticSourceInstrumentation.set -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.DisableRuntimeInstrumentation.get -> bool
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.DisableRuntimeInstrumentation.set -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.Dispose() -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableAzureSdkTelemetryListener.get -> bool
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableAzureSdkTelemetryListener.set -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableLegacyCorrelationHeadersInjection.get -> bool
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableLegacyCorrelationHeadersInjection.set -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableRequestIdHeaderInjectionInW3CMode.get -> bool
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableRequestIdHeaderInjectionInW3CMode.set -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableSqlCommandTextInstrumentation.get -> bool
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableSqlCommandTextInstrumentation.set -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableW3CHeadersInjection.get -> bool
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.EnableW3CHeadersInjection.set -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.ExcludeComponentCorrelationHttpHeadersOnDomains.get -> System.Collections.Generic.ICollection<string>
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.IncludeDiagnosticSourceActivities.get -> System.Collections.Generic.ICollection<string>
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.ProfileQueryEndpoint.get -> string
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.ProfileQueryEndpoint.set -> void
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.SetComponentCorrelationHttpHeaders.get -> bool
Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.SetComponentCorrelationHttpHeaders.set -> void
Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer
Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer.HttpDependenciesParsingTelemetryInitializer() -> void
Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.W3C.W3CActivityExtensions
Microsoft.ApplicationInsights.W3C.W3CConstants
Microsoft.ApplicationInsights.W3C.W3COperationCorrelationTelemetryInitializer
Microsoft.ApplicationInsights.W3C.W3COperationCorrelationTelemetryInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.W3C.W3COperationCorrelationTelemetryInitializer.W3COperationCorrelationTelemetryInitializer() -> void
const Microsoft.ApplicationInsights.Common.InjectionGuardConstants.AppIdMaxLength = 50 -> int
const Microsoft.ApplicationInsights.Common.InjectionGuardConstants.ContextHeaderKeyMaxLength = 50 -> int
const Microsoft.ApplicationInsights.Common.InjectionGuardConstants.ContextHeaderValueMaxLength = 1024 -> int
const Microsoft.ApplicationInsights.Common.InjectionGuardConstants.QuickPulseResponseHeaderMaxLength = 1024 -> int
const Microsoft.ApplicationInsights.Common.InjectionGuardConstants.RequestHeaderMaxLength = 1024 -> int
const Microsoft.ApplicationInsights.Common.InjectionGuardConstants.TraceParentHeaderMaxLength = 55 -> int
const Microsoft.ApplicationInsights.Common.InjectionGuardConstants.TraceStateHeaderMaxLength = 512 -> int
const Microsoft.ApplicationInsights.Common.InjectionGuardConstants.TraceStateMaxPairs = 32 -> int
const Microsoft.ApplicationInsights.W3C.W3CConstants.ApplicationIdTraceStateField = "cid-v1" -> string
const Microsoft.ApplicationInsights.W3C.W3CConstants.AzureTracestateNamespace = "az" -> string
const Microsoft.ApplicationInsights.W3C.W3CConstants.TraceParentHeader = "traceparent" -> string
const Microsoft.ApplicationInsights.W3C.W3CConstants.TraceStateHeader = "tracestate" -> string
const Microsoft.ApplicationInsights.W3C.W3CConstants.TracestateAzureSeparator = ';' -> char
static Microsoft.ApplicationInsights.Common.ConditionalWeakTableExtensions.AddIfNotExists<TKey, TValue>(this System.Runtime.CompilerServices.ConditionalWeakTable<TKey, TValue> conditionalWeakTable, TKey key, TValue value) -> void
static Microsoft.ApplicationInsights.Common.StringUtilities.EnforceMaxLength(string input, int maxLength) -> string
static Microsoft.ApplicationInsights.Common.StringUtilities.FormatRequestId(string traceId, string spanId) -> string
static Microsoft.ApplicationInsights.Common.StringUtilities.GenerateSpanId() -> string
static Microsoft.ApplicationInsights.Common.StringUtilities.GenerateTraceId() -> string
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.GenerateW3CContext(this System.Diagnostics.Activity activity) -> System.Diagnostics.Activity
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.GetParentSpanId(this System.Diagnostics.Activity activity) -> string
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.GetSpanId(this System.Diagnostics.Activity activity) -> string
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.GetTraceId(this System.Diagnostics.Activity activity) -> string
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.GetTraceparent(this System.Diagnostics.Activity activity) -> string
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.GetTracestate(this System.Diagnostics.Activity activity) -> string
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.IsW3CActivity(this System.Diagnostics.Activity activity) -> bool
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.SetTraceparent(this System.Diagnostics.Activity activity, string value) -> void
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.SetTracestate(this System.Diagnostics.Activity activity, string value) -> void
static Microsoft.ApplicationInsights.W3C.W3CActivityExtensions.UpdateContextOnActivity(this System.Diagnostics.Activity activity) -> System.Diagnostics.Activity
virtual Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule.Dispose(bool disposing) -> void

Просмотреть файл

@ -1,36 +0,0 @@
Microsoft.ApplicationInsights.Common.ConditionalWeakTableExtensions
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule.Counters.get -> System.Collections.Generic.IList<Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest>
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule.DefaultCounters.get -> System.Collections.Generic.IList<Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest>
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule.Dispose() -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule.EnableIISExpressPerformanceCounters.get -> bool
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule.EnableIISExpressPerformanceCounters.set -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule.PerformanceCollectorModule() -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest.PerformanceCounter.get -> string
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest.PerformanceCounter.set -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest.PerformanceCounterCollectionRequest() -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest.PerformanceCounterCollectionRequest(string performanceCounter, string reportAs) -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest.ReportAs.get -> string
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCounterCollectionRequest.ReportAs.set -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.AuthenticationApiKey.get -> string
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.AuthenticationApiKey.set -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.DisableFullTelemetryItems.get -> bool
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.DisableFullTelemetryItems.set -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.DisableTopCpuProcesses.get -> bool
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.DisableTopCpuProcesses.set -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.Dispose() -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.QuickPulseServiceEndpoint.get -> string
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.QuickPulseServiceEndpoint.set -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.QuickPulseTelemetryModule() -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.RegisterTelemetryProcessor(Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor telemetryProcessor) -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.ServerId.get -> string
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.ServerId.set -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor.Process(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor.QuickPulseTelemetryProcessor(Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor next) -> void
static Microsoft.ApplicationInsights.Common.ConditionalWeakTableExtensions.AddIfNotExists<TKey, TValue>(this System.Runtime.CompilerServices.ConditionalWeakTable<TKey, TValue> conditionalWeakTable, TKey key, TValue value) -> void

Просмотреть файл

@ -1,116 +0,0 @@
Microsoft.ApplicationInsights.Extensibility.TelemetryProcessorChainBuilderExtensions
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.AdaptiveSamplingPercentageEvaluatedCallback
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.EvaluationInterval.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.EvaluationInterval.set -> void
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.InitialSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.InitialSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.MaxSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.MaxSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.MaxTelemetryItemsPerSecond.get -> double
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.MaxTelemetryItemsPerSecond.set -> void
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.MinSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.MinSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.MovingAverageRatio.get -> double
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.MovingAverageRatio.set -> void
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageDecreaseTimeout.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageDecreaseTimeout.set -> void
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageEstimatorSettings() -> void
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageIncreaseTimeout.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageIncreaseTimeout.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.AdaptiveSamplingTelemetryProcessor(Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor next) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.AdaptiveSamplingTelemetryProcessor(Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings settings, Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.AdaptiveSamplingPercentageEvaluatedCallback callback, Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor next) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.Dispose() -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.EvaluationInterval.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.EvaluationInterval.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.ExcludedTypes.get -> string
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.ExcludedTypes.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.IncludedTypes.get -> string
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.IncludedTypes.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.InitialSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.InitialSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.MaxSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.MaxSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.MaxTelemetryItemsPerSecond.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.MaxTelemetryItemsPerSecond.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.MinSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.MinSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.MovingAverageRatio.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.MovingAverageRatio.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.Process(Microsoft.ApplicationInsights.Channel.ITelemetry item) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.SamplingPercentageDecreaseTimeout.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.SamplingPercentageDecreaseTimeout.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.SamplingPercentageIncreaseTimeout.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.SamplingPercentageIncreaseTimeout.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.AdaptiveSamplingPercentageEvaluatedCallback
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.ApplicationStoppingEventArgs
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.ApplicationStoppingEventArgs.ApplicationStoppingEventArgs(System.Func<System.Func<System.Threading.Tasks.Task>, System.Threading.Tasks.Task> asyncMethodRunner) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.ApplicationStoppingEventArgs.Run(System.Func<System.Threading.Tasks.Task> asyncMethod) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.IApplicationLifecycle
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.IApplicationLifecycle.Started -> System.Action<object, object>
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.IApplicationLifecycle.Stopping -> System.EventHandler<Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.ApplicationStoppingEventArgs>
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.EvaluationInterval.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.EvaluationInterval.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.InitialSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.InitialSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.MaxSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.MaxSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.MaxTelemetryItemsPerSecond.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.MaxTelemetryItemsPerSecond.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.MinSamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.MinSamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.MovingAverageRatio.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.MovingAverageRatio.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageDecreaseTimeout.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageDecreaseTimeout.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageEstimatorSettings() -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageIncreaseTimeout.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.Implementation.SamplingPercentageEstimatorSettings.SamplingPercentageIncreaseTimeout.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor.ExcludedTypes.get -> string
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor.ExcludedTypes.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor.IncludedTypes.get -> string
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor.IncludedTypes.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor.Process(Microsoft.ApplicationInsights.Channel.ITelemetry item) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor.SamplingPercentage.get -> double
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor.SamplingPercentage.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor.SamplingTelemetryProcessor(Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor next) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.DefaultBackoffEnabledReportingInterval.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.DefaultBackoffEnabledReportingInterval.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.DeveloperMode.get -> bool?
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.DeveloperMode.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.Dispose() -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.EnableLocalThrottling.get -> bool
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.EnableLocalThrottling.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.EndpointAddress.get -> string
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.EndpointAddress.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.Flush() -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.LocalThrottleLimit.get -> int
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.LocalThrottleLimit.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.LocalThrottleWindow.get -> int
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.LocalThrottleWindow.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxBacklogSize.get -> int
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxBacklogSize.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTelemetryBufferCapacity.get -> int
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTelemetryBufferCapacity.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTelemetryBufferDelay.get -> System.TimeSpan
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTelemetryBufferDelay.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTransmissionBufferCapacity.get -> int
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTransmissionBufferCapacity.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTransmissionSenderCapacity.get -> int
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTransmissionSenderCapacity.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTransmissionStorageCapacity.get -> long
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.MaxTransmissionStorageCapacity.set -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.Send(Microsoft.ApplicationInsights.Channel.ITelemetry item) -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.ServerTelemetryChannel() -> void
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.StorageFolder.get -> string
Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel.StorageFolder.set -> void
static Microsoft.ApplicationInsights.Extensibility.TelemetryProcessorChainBuilderExtensions.UseAdaptiveSampling(this Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryProcessorChainBuilder builder, double maxTelemetryItemsPerSecond, string excludedTypes = null, string includedTypes = null) -> Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryProcessorChainBuilder
static Microsoft.ApplicationInsights.Extensibility.TelemetryProcessorChainBuilderExtensions.UseAdaptiveSampling(this Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryProcessorChainBuilder builder, Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.SamplingPercentageEstimatorSettings settings, Microsoft.ApplicationInsights.WindowsServer.Channel.Implementation.AdaptiveSamplingPercentageEvaluatedCallback callback, string excludedTypes = null, string includedTypes = null) -> Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryProcessorChainBuilder
static Microsoft.ApplicationInsights.Extensibility.TelemetryProcessorChainBuilderExtensions.UseAdaptiveSampling(this Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryProcessorChainBuilder builder, string excludedTypes = null, string includedTypes = null) -> Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryProcessorChainBuilder
static Microsoft.ApplicationInsights.Extensibility.TelemetryProcessorChainBuilderExtensions.UseSampling(this Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryProcessorChainBuilder builder, double samplingPercentage, string excludedTypes = null, string includedTypes = null) -> Microsoft.ApplicationInsights.Extensibility.Implementation.TelemetryProcessorChainBuilder
virtual Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor.Dispose(bool disposing) -> void

Просмотреть файл

@ -1,28 +0,0 @@
Microsoft.ApplicationInsights.Common.ConditionalWeakTableExtensions
Microsoft.ApplicationInsights.WindowsServer.AppServicesHeartbeatTelemetryModule
Microsoft.ApplicationInsights.WindowsServer.AppServicesHeartbeatTelemetryModule.AppServicesHeartbeatTelemetryModule() -> void
Microsoft.ApplicationInsights.WindowsServer.AppServicesHeartbeatTelemetryModule.Dispose() -> void
Microsoft.ApplicationInsights.WindowsServer.AppServicesHeartbeatTelemetryModule.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.WindowsServer.AppServicesHeartbeatTelemetryModule.UpdateHeartbeatWithAppServiceEnvVarValues() -> void
Microsoft.ApplicationInsights.WindowsServer.AzureInstanceMetadataTelemetryModule
Microsoft.ApplicationInsights.WindowsServer.AzureInstanceMetadataTelemetryModule.AzureInstanceMetadataTelemetryModule() -> void
Microsoft.ApplicationInsights.WindowsServer.AzureInstanceMetadataTelemetryModule.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration unused) -> void
Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer
Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer.AzureWebAppRoleEnvironmentTelemetryInitializer() -> void
Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer.Dispose() -> void
Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer
Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer.BuildInfoConfigComponentVersionTelemetryInitializer() -> void
Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.WindowsServer.DeveloperModeWithDebuggerAttachedTelemetryModule
Microsoft.ApplicationInsights.WindowsServer.DeveloperModeWithDebuggerAttachedTelemetryModule.DeveloperModeWithDebuggerAttachedTelemetryModule() -> void
Microsoft.ApplicationInsights.WindowsServer.DeveloperModeWithDebuggerAttachedTelemetryModule.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.WindowsServer.DomainNameRoleInstanceTelemetryInitializer
Microsoft.ApplicationInsights.WindowsServer.DomainNameRoleInstanceTelemetryInitializer.DomainNameRoleInstanceTelemetryInitializer() -> void
Microsoft.ApplicationInsights.WindowsServer.DomainNameRoleInstanceTelemetryInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule
Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule.Dispose() -> void
Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule.UnobservedExceptionTelemetryModule() -> void
static Microsoft.ApplicationInsights.Common.ConditionalWeakTableExtensions.AddIfNotExists<TKey, TValue>(this System.Runtime.CompilerServices.ConditionalWeakTable<TKey, TValue> conditionalWeakTable, TKey key, TValue value) -> void
virtual Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer.LoadBuildInfoConfig() -> System.Xml.Linq.XElement

Просмотреть файл

@ -1,154 +0,0 @@
abstract Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.TelemetryInitializerBase.OnInitializeTelemetry(Microsoft.AspNetCore.Http.HttpContext platformContext, Microsoft.ApplicationInsights.DataContracts.RequestTelemetry requestTelemetry, Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener.Dispose() -> void
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener.ListenerName.get -> string
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener.MvcDiagnosticsListener() -> void
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener.OnBeforeAction(Microsoft.AspNetCore.Http.HttpContext httpContext, System.Collections.Generic.IDictionary<string, object> routeValues) -> void
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener.OnCompleted() -> void
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener.OnError(System.Exception error) -> void
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener.OnNext(System.Collections.Generic.KeyValuePair<string, object> value) -> void
Microsoft.ApplicationInsights.AspNetCore.DiagnosticListeners.MvcDiagnosticsListener.OnSubscribe() -> void
Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware
Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.ExceptionTrackingMiddleware(Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.ApplicationInsights.TelemetryClient client) -> void
Microsoft.ApplicationInsights.AspNetCore.ExceptionTrackingMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext) -> System.Threading.Tasks.Task
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.AddAutoCollectedMetricExtractor.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.AddAutoCollectedMetricExtractor.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.ApplicationInsightsServiceOptions() -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.ApplicationVersion.get -> string
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.ApplicationVersion.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.ConnectionString.get -> string
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.ConnectionString.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.DependencyCollectionOptions.get -> Microsoft.ApplicationInsights.AspNetCore.Extensions.DependencyCollectionOptions
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.DeveloperMode.get -> bool?
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.DeveloperMode.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableAdaptiveSampling.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableAdaptiveSampling.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableAppServicesHeartbeatTelemetryModule.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableAppServicesHeartbeatTelemetryModule.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableAuthenticationTrackingJavaScript.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableAuthenticationTrackingJavaScript.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableAzureInstanceMetadataTelemetryModule.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableAzureInstanceMetadataTelemetryModule.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableDebugLogger.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableDebugLogger.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableDependencyTrackingTelemetryModule.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableDependencyTrackingTelemetryModule.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableHeartbeat.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableHeartbeat.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnablePerformanceCounterCollectionModule.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnablePerformanceCounterCollectionModule.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableQuickPulseMetricStream.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableQuickPulseMetricStream.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableRequestTrackingTelemetryModule.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EnableRequestTrackingTelemetryModule.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EndpointAddress.get -> string
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.EndpointAddress.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.InstrumentationKey.get -> string
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.InstrumentationKey.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions.RequestCollectionOptions.get -> Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions
Microsoft.ApplicationInsights.AspNetCore.Extensions.DependencyCollectionOptions
Microsoft.ApplicationInsights.AspNetCore.Extensions.DependencyCollectionOptions.DependencyCollectionOptions() -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.DependencyCollectionOptions.EnableLegacyCorrelationHeadersInjection.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.DependencyCollectionOptions.EnableLegacyCorrelationHeadersInjection.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.HttpRequestExtensions
Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions
Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions.EnableW3CDistributedTracing.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions.EnableW3CDistributedTracing.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions.InjectResponseHeaders.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions.InjectResponseHeaders.set -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions.RequestCollectionOptions() -> void
Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions.TrackExceptions.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions.TrackExceptions.set -> void
Microsoft.ApplicationInsights.AspNetCore.IJavaScriptSnippet
Microsoft.ApplicationInsights.AspNetCore.IJavaScriptSnippet.FullScript.get -> string
Microsoft.ApplicationInsights.AspNetCore.ITelemetryModuleConfigurator
Microsoft.ApplicationInsights.AspNetCore.ITelemetryModuleConfigurator.Configure(Microsoft.ApplicationInsights.Extensibility.ITelemetryModule telemetryModule) -> void
Microsoft.ApplicationInsights.AspNetCore.ITelemetryModuleConfigurator.Configure(Microsoft.ApplicationInsights.Extensibility.ITelemetryModule telemetryModule, Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions options) -> void
Microsoft.ApplicationInsights.AspNetCore.ITelemetryModuleConfigurator.TelemetryModuleType.get -> System.Type
Microsoft.ApplicationInsights.AspNetCore.ITelemetryProcessorFactory
Microsoft.ApplicationInsights.AspNetCore.ITelemetryProcessorFactory.Create(Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor nextProcessor) -> Microsoft.ApplicationInsights.Extensibility.ITelemetryProcessor
Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet
Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.FullScript.get -> string
Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.JavaScriptSnippet(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration telemetryConfiguration, Microsoft.Extensions.Options.IOptions<Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions> serviceOptions, Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor, System.Text.Encodings.Web.JavaScriptEncoder encoder = null) -> void
Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet.ScriptBody.get -> string
Microsoft.ApplicationInsights.AspNetCore.Logging.ApplicationInsightsLoggerOptions
Microsoft.ApplicationInsights.AspNetCore.Logging.ApplicationInsightsLoggerOptions.ApplicationInsightsLoggerOptions() -> void
Microsoft.ApplicationInsights.AspNetCore.Logging.ApplicationInsightsLoggerOptions.IncludeEventId.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Logging.ApplicationInsightsLoggerOptions.IncludeEventId.set -> void
Microsoft.ApplicationInsights.AspNetCore.Logging.ApplicationInsightsLoggerOptions.TrackExceptionsAsExceptionTelemetry.get -> bool
Microsoft.ApplicationInsights.AspNetCore.Logging.ApplicationInsightsLoggerOptions.TrackExceptionsAsExceptionTelemetry.set -> void
Microsoft.ApplicationInsights.AspNetCore.RequestTrackingTelemetryModule
Microsoft.ApplicationInsights.AspNetCore.RequestTrackingTelemetryModule.CollectionOptions.get -> Microsoft.ApplicationInsights.AspNetCore.Extensions.RequestCollectionOptions
Microsoft.ApplicationInsights.AspNetCore.RequestTrackingTelemetryModule.CollectionOptions.set -> void
Microsoft.ApplicationInsights.AspNetCore.RequestTrackingTelemetryModule.Dispose() -> void
Microsoft.ApplicationInsights.AspNetCore.RequestTrackingTelemetryModule.Initialize(Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration configuration) -> void
Microsoft.ApplicationInsights.AspNetCore.RequestTrackingTelemetryModule.RequestTrackingTelemetryModule() -> void
Microsoft.ApplicationInsights.AspNetCore.RequestTrackingTelemetryModule.RequestTrackingTelemetryModule(Microsoft.ApplicationInsights.Extensibility.IApplicationIdProvider applicationIdProvider) -> void
Microsoft.ApplicationInsights.AspNetCore.Resources
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.AspNetCoreEnvironmentTelemetryInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.AspNetCoreEnvironmentTelemetryInitializer.AspNetCoreEnvironmentTelemetryInitializer(Microsoft.AspNetCore.Hosting.IHostingEnvironment environment) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.AspNetCoreEnvironmentTelemetryInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.AzureAppServiceRoleNameFromHostNameHeaderInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.AzureAppServiceRoleNameFromHostNameHeaderInitializer.AzureAppServiceRoleNameFromHostNameHeaderInitializer(string webAppSuffix = ".azurewebsites.net") -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.AzureAppServiceRoleNameFromHostNameHeaderInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.AzureAppServiceRoleNameFromHostNameHeaderInitializer.WebAppSuffix.get -> string
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.AzureAppServiceRoleNameFromHostNameHeaderInitializer.WebAppSuffix.set -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ClientIpHeaderTelemetryInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ClientIpHeaderTelemetryInitializer.ClientIpHeaderTelemetryInitializer(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ClientIpHeaderTelemetryInitializer.HeaderNames.get -> System.Collections.Generic.ICollection<string>
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ClientIpHeaderTelemetryInitializer.HeaderValueSeparators.get -> string
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ClientIpHeaderTelemetryInitializer.HeaderValueSeparators.set -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ClientIpHeaderTelemetryInitializer.UseFirstIp.get -> bool
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ClientIpHeaderTelemetryInitializer.UseFirstIp.set -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ComponentVersionTelemetryInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ComponentVersionTelemetryInitializer.ComponentVersionTelemetryInitializer(Microsoft.Extensions.Options.IOptions<Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions> options) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ComponentVersionTelemetryInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.DomainNameRoleInstanceTelemetryInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.DomainNameRoleInstanceTelemetryInitializer.DomainNameRoleInstanceTelemetryInitializer() -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.DomainNameRoleInstanceTelemetryInitializer.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.OperationNameTelemetryInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.OperationNameTelemetryInitializer.OperationNameTelemetryInitializer(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.SyntheticTelemetryInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.SyntheticTelemetryInitializer.SyntheticTelemetryInitializer(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.TelemetryInitializerBase
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.TelemetryInitializerBase.Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.TelemetryInitializerBase.TelemetryInitializerBase(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer.WebSessionTelemetryInitializer(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) -> void
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebUserTelemetryInitializer
Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebUserTelemetryInitializer.WebUserTelemetryInitializer(Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor) -> void
Microsoft.AspNetCore.Hosting.ApplicationInsightsWebHostBuilderExtensions
Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions
Microsoft.Extensions.Logging.ApplicationInsightsLoggerFactoryExtensions
override Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.ClientIpHeaderTelemetryInitializer.OnInitializeTelemetry(Microsoft.AspNetCore.Http.HttpContext platformContext, Microsoft.ApplicationInsights.DataContracts.RequestTelemetry requestTelemetry, Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
override Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.OperationNameTelemetryInitializer.OnInitializeTelemetry(Microsoft.AspNetCore.Http.HttpContext platformContext, Microsoft.ApplicationInsights.DataContracts.RequestTelemetry requestTelemetry, Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
override Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.SyntheticTelemetryInitializer.OnInitializeTelemetry(Microsoft.AspNetCore.Http.HttpContext platformContext, Microsoft.ApplicationInsights.DataContracts.RequestTelemetry requestTelemetry, Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
override Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer.OnInitializeTelemetry(Microsoft.AspNetCore.Http.HttpContext platformContext, Microsoft.ApplicationInsights.DataContracts.RequestTelemetry requestTelemetry, Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
override Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebUserTelemetryInitializer.OnInitializeTelemetry(Microsoft.AspNetCore.Http.HttpContext platformContext, Microsoft.ApplicationInsights.DataContracts.RequestTelemetry requestTelemetry, Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) -> void
static Microsoft.ApplicationInsights.AspNetCore.Extensions.HttpRequestExtensions.GetUri(this Microsoft.AspNetCore.Http.HttpRequest request) -> System.Uri
static Microsoft.ApplicationInsights.AspNetCore.Resources.Culture.get -> System.Globalization.CultureInfo
static Microsoft.ApplicationInsights.AspNetCore.Resources.Culture.set -> void
static Microsoft.ApplicationInsights.AspNetCore.Resources.JavaScriptAuthSnippet.get -> string
static Microsoft.ApplicationInsights.AspNetCore.Resources.JavaScriptSnippet.get -> string
static Microsoft.ApplicationInsights.AspNetCore.Resources.ResourceManager.get -> System.Resources.ResourceManager
static Microsoft.AspNetCore.Hosting.ApplicationInsightsWebHostBuilderExtensions.UseApplicationInsights(this Microsoft.AspNetCore.Hosting.IWebHostBuilder webHostBuilder) -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
static Microsoft.AspNetCore.Hosting.ApplicationInsightsWebHostBuilderExtensions.UseApplicationInsights(this Microsoft.AspNetCore.Hosting.IWebHostBuilder webHostBuilder, string instrumentationKey) -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsSettings(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationSourceRoot, bool? developerMode = null, string endpointAddress = null, string instrumentationKey = null) -> Microsoft.Extensions.Configuration.IConfigurationBuilder
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsSettings(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationSourceRoot, string connectionString, bool? developerMode = null, string endpointAddress = null, string instrumentationKey = null) -> Microsoft.Extensions.Configuration.IConfigurationBuilder
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsTelemetry(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsTelemetry(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions options) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsTelemetry(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration configuration) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsTelemetry(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string instrumentationKey) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsTelemetry(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions> options) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsTelemetryProcessor(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Type telemetryProcessorType) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.AddApplicationInsightsTelemetryProcessor<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.ConfigureTelemetryModule<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<T, Microsoft.ApplicationInsights.AspNetCore.Extensions.ApplicationInsightsServiceOptions> configModule) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.ConfigureTelemetryModule<T>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<T> configModule) -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.UseApplicationInsightsExceptionTelemetry(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) -> Microsoft.AspNetCore.Builder.IApplicationBuilder
static Microsoft.Extensions.DependencyInjection.ApplicationInsightsExtensions.UseApplicationInsightsRequestTelemetry(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) -> Microsoft.AspNetCore.Builder.IApplicationBuilder
static Microsoft.Extensions.Logging.ApplicationInsightsLoggerFactoryExtensions.AddApplicationInsights(this Microsoft.Extensions.Logging.ILoggerFactory factory, System.IServiceProvider serviceProvider) -> Microsoft.Extensions.Logging.ILoggerFactory
static Microsoft.Extensions.Logging.ApplicationInsightsLoggerFactoryExtensions.AddApplicationInsights(this Microsoft.Extensions.Logging.ILoggerFactory factory, System.IServiceProvider serviceProvider, Microsoft.Extensions.Logging.LogLevel minLevel) -> Microsoft.Extensions.Logging.ILoggerFactory
static Microsoft.Extensions.Logging.ApplicationInsightsLoggerFactoryExtensions.AddApplicationInsights(this Microsoft.Extensions.Logging.ILoggerFactory factory, System.IServiceProvider serviceProvider, System.Func<string, Microsoft.Extensions.Logging.LogLevel, bool> filter) -> Microsoft.Extensions.Logging.ILoggerFactory
static Microsoft.Extensions.Logging.ApplicationInsightsLoggerFactoryExtensions.AddApplicationInsights(this Microsoft.Extensions.Logging.ILoggerFactory factory, System.IServiceProvider serviceProvider, System.Func<string, Microsoft.Extensions.Logging.LogLevel, bool> filter, System.Action loggerAddedCallback) -> Microsoft.Extensions.Logging.ILoggerFactory
virtual Microsoft.ApplicationInsights.AspNetCore.RequestTrackingTelemetryModule.Dispose(bool disposing) -> void

Просмотреть файл

@ -1,12 +0,0 @@
Microsoft.ApplicationInsights.NLogTarget.ApplicationInsightsTarget
Microsoft.ApplicationInsights.NLogTarget.ApplicationInsightsTarget.ApplicationInsightsTarget() -> void
Microsoft.ApplicationInsights.NLogTarget.ApplicationInsightsTarget.ContextProperties.get -> System.Collections.Generic.IList<Microsoft.ApplicationInsights.NLogTarget.TargetPropertyWithContext>
Microsoft.ApplicationInsights.NLogTarget.ApplicationInsightsTarget.InstrumentationKey.get -> string
Microsoft.ApplicationInsights.NLogTarget.ApplicationInsightsTarget.InstrumentationKey.set -> void
Microsoft.ApplicationInsights.NLogTarget.TargetPropertyWithContext
Microsoft.ApplicationInsights.NLogTarget.TargetPropertyWithContext.Layout.get -> NLog.Layouts.Layout
Microsoft.ApplicationInsights.NLogTarget.TargetPropertyWithContext.Layout.set -> void
Microsoft.ApplicationInsights.NLogTarget.TargetPropertyWithContext.Name.get -> string
Microsoft.ApplicationInsights.NLogTarget.TargetPropertyWithContext.Name.set -> void
Microsoft.ApplicationInsights.NLogTarget.TargetPropertyWithContext.TargetPropertyWithContext() -> void
Microsoft.ApplicationInsights.NLogTarget.TargetPropertyWithContext.TargetPropertyWithContext(string name, NLog.Layouts.Layout layout) -> void

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- If $(EnlistmentRoot) is not set then Directory.Build.props hasn't been imported yet. Import Microsoft.Common.props to get it included. -->
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="'$(EnlistmentRoot)' == '' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<!-- If $(EnlistmentRoot) is still not set, then import Directory.Build.props directly. This can happen when gitlink tries to build (because it uses MSBuild tools version 4.0 and we can't find Microsoft.Common.props) -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'Directory.Build.props'))\Directory.Build.props" Condition="'$(EnlistmentRoot)' == ''"/>
<PropertyGroup>
<LangVersion>7.1</LangVersion>
<ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,100 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file (Directory.Build.props) is automatically included by MSBuild into all projects in this solution. -->
<!-- It defines common build paths and infrastructure. -->
<!-- Other products / repositories using the same build pattern will have their own copy of copy this file -->
<!-- This file (Directory.Build.props) is automatically included by MSBuild into all projects in this solution. -->
<!-- It defines common build paths and infrastructure. -->
<!-- Other products / repositories using the same build pattern will have their own copy of copy this file -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<!-- The common project structure looks like this: -->
<!-- d:\DDGit\ -->
<!-- ServiceFoo\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- .git\ -->
<!-- .nuget\ -->
<!-- Directory.Build.props (this file) -->
<!-- SomeProjectFolderA\ -->
<!-- NuGet.config -->
<!-- SomeProjectA.sln -->
<!-- ... -->
<!-- SomeProjectFolderB\ -->
<!-- ... -->
<!-- EnlistmentRoot.marker -->
<!-- ServiceBar\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- ... -->
<!-- -->
<!-- The Bin folder contains ALL build output. -->
<!-- The Obj folder contains all intermediate build files (like the obj folder). -->
<!-- The Packages folder contains ALL packages downloaded by NuGet. -->
<!-- The above folders contain NOTHING that is checked in (they are not checked in themselves). -->
<!-- The Src folder contains EVERHYTHNG that is checked in and ALL that is checked in. -->
<!-- No build output or temp files should end up in the Src folder! (barring a few *small* VS temporaries) -->
<!-- -->
<!-- Src MUST contain the EnlistmentRoot.marker file which marks the EnlistmentRoot. -->
<!-- Src also contains the NuGet.config file which ensures that NuGet uses the NuGet.Packages folder. -->
<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>
<SourceRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'SourceRoot.marker'))</SourceRoot>
<KeysRoot>$(EnlistmentRoot)\.keys</KeysRoot>
<PropsRoot>$(EnlistmentRoot)\.props</PropsRoot>
<RulesetsRoot>$(EnlistmentRoot)\.rulesets</RulesetsRoot>
<TargetsRoot>$(EnlistmentRoot)\.targets</TargetsRoot>
<PublicApiRoot>$(EnlistmentRoot)\.publicApi</PublicApiRoot>
<BinRoot>$(EnlistmentRoot)\..\bin</BinRoot>
<BinRoot>$([System.IO.Path]::GetFullPath( $(BinRoot) ))</BinRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(SourceRoot.Length)))</RelativeOutputPathBase>
<BaseIntermediateOutputPath>$(EnlistmentRoot)\..\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(BaseIntermediateOutputPath) ))</BaseIntermediateOutputPath>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<OutputPath>$(BinRoot)\$(Configuration)\$(RelativeOutputPathBase)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>
<PackagesDir>$(EnlistmentRoot)\..\packages</PackagesDir>
<PackagesDir>$([System.IO.Path]::GetFullPath( $(PackagesDir) ))</PackagesDir>
<!-- Forces EventRegister target to generate ETW manifest file -->
<EtwManifestForceAll Condition="$(OS) == 'Windows_NT'">true</EtwManifestForceAll>
<EtwManifestOutDir>$(BinRoot)\$(Configuration)\ETW\$(TargetFramework)\</EtwManifestOutDir>
</PropertyGroup>
<PropertyGroup>
<!-- Enable NuGet package restore during build -->
<RestorePackages>true</RestorePackages>
<RequireRestoreConsent>false</RequireRestoreConsent>
</PropertyGroup>
<!-- Generate AssemblyFileVersion and AssemblyVersion attributes. -->
<PropertyGroup>
<!-- Turn on dynamic assembly attribute generation -->
<AssemblyAttributesPath>$(IntermediateOutputPath)\AssemblyInfo.g.cs</AssemblyAttributesPath>
<GenerateAdditionalSources>true</GenerateAdditionalSources>
</PropertyGroup>
<!-- The common project structure looks like this: -->
<!-- d:\DDGit\ -->
<!-- ServiceFoo\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- .git\ -->
<!-- .nuget\ -->
<!-- Directory.Build.props (this file) -->
<!-- SomeProjectFolderA\ -->
<!-- NuGet.config -->
<!-- SomeProjectA.sln -->
<!-- ... -->
<!-- SomeProjectFolderB\ -->
<!-- ... -->
<!-- EnlistmentRoot.marker -->
<!-- ServiceBar\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- ... -->
<!-- -->
<!-- The Bin folder contains ALL build output. -->
<!-- The Obj folder contains all intermediate build files (like the obj folder). -->
<!-- The Packages folder contains ALL packages downloaded by NuGet. -->
<!-- The above folders contain NOTHING that is checked in (they are not checked in themselves). -->
<!-- The Src folder contains EVERHYTHNG that is checked in and ALL that is checked in. -->
<!-- No build output or temp files should end up in the Src folder! (barring a few *small* VS temporaries) -->
<!-- -->
<!-- Src MUST contain the EnlistmentRoot.marker file which marks the EnlistmentRoot. -->
<!-- Src also contains the NuGet.config file which ensures that NuGet uses the NuGet.Packages folder. -->
<SourceRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'SourceRoot.marker'))</SourceRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(SourceRoot.Length)))</RelativeOutputPathBase>
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>
<!-- Forces EventRegister target to generate ETW manifest file -->
<EtwManifestForceAll Condition="$(OS) == 'Windows_NT'">true</EtwManifestForceAll>
<EtwManifestOutDir>$(BinRoot)\$(Configuration)\ETW\$(TargetFramework)\</EtwManifestOutDir>
</PropertyGroup>
</Project>

Просмотреть файл

@ -14,12 +14,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio
.gitignore = .gitignore
CHANGELOG.md = CHANGELOG.md
CodeCov.ps1 = CodeCov.ps1
Common.props = Common.props
Directory.Build.props = Directory.Build.props
NuGet.config = NuGet.config
Package.targets = Package.targets
README.md = README.md
Test.props = Test.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ServerTelemetryChannel", "ServerTelemetryChannel", "{E7B0521E-DA4D-40EA-B55D-ADCBDA69027C}"

Просмотреть файл

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SourceRoot)\Common.props"/>
<PropertyGroup>
<!--Removing the SRC folder from the output directory-->
<CorePath>$(RelativeOutputPathBase.Substring(4))</CorePath>
<OutputPath>$(BinRoot)\$(Configuration)\$(CorePath)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)\Common.props"/>
<PropertyGroup>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,15 +1,10 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />
<!--temp while we dont merge application insights types -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Product.props'))\Product.props" />
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<Company>Microsoft</Company>
<Copyright>Copyright © Microsoft. All Rights Reserved.</Copyright>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netstandard2.0</TargetFrameworks>

Просмотреть файл

@ -1,23 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net45;net46;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Просмотреть файл

@ -1,20 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<ProjectGuid>{2759BC71-7F47-44DA-8579-AE2D8C8C684D}</ProjectGuid>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<TargetFrameworks>net46;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="$(OS) != 'Windows_NT'">

Просмотреть файл

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--Removing the SRC folder from the output directory-->
<CorePath>$(RelativeOutputPathBase)</CorePath>
<CorePath>$(RelativeOutputPathBase)</CorePath>
<OutputPath>$(BinRoot)\$(Configuration)\$(CorePath)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
</PropertyGroup>
</Project>
</Project>

Просмотреть файл

@ -1,21 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<ProjectGuid>{21CB9A8A-F25B-4DEB-92CB-ACB6920EB8BC}</ProjectGuid>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<TargetFrameworks>net45</TargetFrameworks>
<AssemblyName>TelemetryChannel.Nuget.Tests</AssemblyName>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<!-- This can be removed. Requires update to .yml -->

Просмотреть файл

@ -5,11 +5,7 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.ApplicationInsights")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Microsoft.ApplicationInsights")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Просмотреть файл

@ -1,27 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<AssemblyName>Microsoft.ApplicationInsights.TelemetryChannel.Tests</AssemblyName>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -16,6 +16,8 @@
/// </summary>
public OperationContextForCallContext ParentContext;
private static readonly object LockObj = new object();
private readonly TelemetryClient telemetryClient;
private readonly object originalActivity = null;
@ -65,7 +67,7 @@
{
// We need to compare the operation id and name of telemetry with operation id and name of current call context before tracking it
// to make sure that the customer is tracking the right telemetry.
lock (this)
lock (LockObj)
{
if (!this.isDisposed)
{

Просмотреть файл

@ -96,7 +96,7 @@
}
}
this.SelectInstrumentationKey(configuration);
SelectInstrumentationKey(configuration);
InitializeComponents(configuration, modules);
}
@ -469,7 +469,7 @@
return attributeDefinitions.Concat(elementDefinitions);
}
private void SelectInstrumentationKey(TelemetryConfiguration configuration)
private static void SelectInstrumentationKey(TelemetryConfiguration configuration)
{
if (PlatformSingleton.Current.TryGetEnvironmentVariable(ConnectionStringEnvironmentVariable, out string connectionStringEnVar))
{

Просмотреть файл

@ -635,6 +635,7 @@
public void IngestionResponseTime(int responseCode, float responseDurationInMs, string appDomainName = "Incorrect") => this.WriteEvent(67, responseCode, responseDurationInMs, this.nameProvider.Name);
[NonEvent]
[SuppressMessage("Microsoft.Performance", "CA1822: MarkMembersAsStatic", Justification = "This method does access instance data in NetStandard 2.0 scenarios.")]
public void IngestionResponseTimeEventCounter(float responseDurationInMs)
{
#if NETSTANDARD2_0

Просмотреть файл

@ -1,6 +1,4 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<Import Project="$(SourceRoot)\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
@ -9,7 +7,7 @@
<TargetFrameworks>net45;net46;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netstandard2.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<!--Nupkg properties-->
<PackageId>Microsoft.ApplicationInsights</PackageId>
@ -26,12 +24,13 @@
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.6.0" />
<PackageReference Include="System.Memory" Version="4.5.4" /> <!-- This is a temporary explicit dependency. We're waiting on the next version of System.Diagnostics.DiagnosticSource. https://github.com/microsoft/ApplicationInsights-dotnet/issues/1707 -->
<!-- This is a temporary explicit dependency. We're waiting on the next version of System.Diagnostics.DiagnosticSource. https://github.com/microsoft/ApplicationInsights-dotnet/issues/1707 -->
<PackageReference Include="System.Memory" Version="4.5.4" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'net46'">
<Reference Include="System.Net.Http" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="$(PublicApiRoot)\$(AssemblyName).dll\$(TargetFramework)\PublicAPI.Shipped.txt" />

Просмотреть файл

@ -38,7 +38,7 @@
throw new ArgumentNullException(nameof(environment));
}
if(IsWindowsOperatingSystem())
if (IsWindowsOperatingSystem())
{
this.identityProvider = new WindowsIdentityProvider();
this.ApplySecurityToDirectory = this.SetSecurityPermissionsToAdminAndCurrentUserWindows;
@ -109,15 +109,6 @@
return result;
}
/// <summary>
/// Test hook to allow testing of non-windows scenario.
/// </summary>
/// <param name="applySecurityToDirectory">The method to be invoked to set directory access.</param>
internal void OverrideApplySecurityToDirectory(Func<DirectoryInfo, bool> applySecurityToDirectory)
{
this.ApplySecurityToDirectory = applySecurityToDirectory;
}
internal static bool IsWindowsOperatingSystem()
{
#if NET45
@ -134,6 +125,15 @@
#endif
}
/// <summary>
/// Test hook to allow testing of non-windows scenario.
/// </summary>
/// <param name="applySecurityToDirectory">The method to be invoked to set directory access.</param>
internal void OverrideApplySecurityToDirectory(Func<DirectoryInfo, bool> applySecurityToDirectory)
{
this.ApplySecurityToDirectory = applySecurityToDirectory;
}
private static string GetPathAccessFailureErrorMessage(Exception exp, string path)
{
return "Path: " + path + "; Error: " + exp.Message + Environment.NewLine;

Просмотреть файл

@ -3,6 +3,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.Extensibility;
@ -10,6 +11,7 @@
/// <summary>
/// Accumulates <see cref="ITelemetry"/> items for efficient transmission.
/// </summary>
[SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockObjectsWithWeakIdentity", Justification = "This should be removed, but there is currently a dependency on this behavior.")]
internal class TelemetryBuffer : IEnumerable<ITelemetry>, ITelemetryProcessor, IDisposable
{
private static readonly TimeSpan DefaultFlushDelay = TimeSpan.FromSeconds(30);

Просмотреть файл

@ -1,6 +1,4 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<Import Project="$(SourceRoot)\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>

Просмотреть файл

@ -1,6 +1,9 @@
# Changelog
## VNext
## Version 2.15.0-beta2
- [Read all properties of ApplicationInsightsServiceOptions from IConfiguration](https://github.com/microsoft/ApplicationInsights-dotnet/issues/1882)
- [End support for NetStandard 1.x, Add support for NetStandard 2.0](https://github.com/microsoft/ApplicationInsights-dotnet/issues/1160)
- [Add support for SourceLink.Github to all SDKs.](https://github.com/microsoft/ApplicationInsights-dotnet/issues/1760)

Просмотреть файл

@ -30,17 +30,23 @@
<ObjRoot>$(EnlistmentRoot)\..\obj</ObjRoot>
<ObjRoot>$([System.IO.Path]::GetFullPath( $(ObjRoot) ))</ObjRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(EnlistmentRoot.Length)))</RelativeOutputPathBase>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<PackagesDir>$(EnlistmentRoot)\..\packages</PackagesDir>
<PackagesDir>$([System.IO.Path]::GetFullPath( $(PackagesDir) ))</PackagesDir>
<OutputPath>$(BinRoot)\$(Configuration)\$(RelativeOutputPathBase)</OutputPath>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(EnlistmentRoot.Length)))</RelativeOutputPathBase>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<!--This is to disable code analysis while devs are working. Default is true.-->
<RunAnalyzers Condition=" '$(Configuration)' == 'Debug' ">false</RunAnalyzers>
<OutputPath>$(BinRoot)\$(Configuration)\test\$(MSBuildProjectName)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>
<IntermediateOutputPath>$(ObjRoot)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$(ObjRoot)\$(Configuration)\$(MSBuildProjectName)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>
<!-- Testing fix for https://github.com/dotnet/sdk/issues/2523 -->
@ -48,4 +54,13 @@
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
</PropertyGroup>
<PropertyGroup>
<LangVersion>7.3</LangVersion>
<!-- Enable NuGet package restore during build -->
<RestorePackages>true</RestorePackages>
<RequireRestoreConsent>false</RequireRestoreConsent>
</PropertyGroup>
</Project>

Просмотреть файл

@ -91,8 +91,6 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TestFramework.Shared.Base",
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TestFramework.Shared.Web", "WEB\Src\TestFramework\Shared\TestFramework.Shared.Web.shproj", "{9718F051-147F-4F5F-9FF3-C926430EFCF7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventCounterCollector.Tests", "WEB\Src\EventCounterCollector\EventCounterCollector.Tests\EventCounterCollector.Tests\EventCounterCollector.Tests.csproj", "{BECFC6B1-E04E-431C-A4D9-6F330F7DE22D}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.NetFull", "WEB\Src\PerformanceCollector\Perf.Shared.NetFull\Perf.Shared.NetFull.shproj", "{0196259C-3582-4F4E-A01F-A8F9AE83B0F3}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.NetStandard", "WEB\Src\PerformanceCollector\Perf.Shared.NetStandard\Perf.Shared.NetStandard.shproj", "{D13C3EC7-B300-4158-9054-216156B203BE}"
@ -147,6 +145,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionalTests.EmptyApp.Te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Perf.Tests", "WEB\Src\PerformanceCollector\Perf.Tests\Perf.Tests.csproj", "{27B8D7BE-8CB7-48BF-97DA-0F031103C03D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventCounterCollector.Tests", "WEB\Src\EventCounterCollector\EventCounterCollector.Tests\EventCounterCollector.Tests.csproj", "{A1891190-0E43-4E2E-BEFE-1AF0068A0D1E}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
WEB\Src\PerformanceCollector\Perf.Shared.NetFull\Perf.Shared.NetFull.projitems*{0196259c-3582-4f4e-a01f-a8f9ae83b0f3}*SharedItemsImports = 13
@ -284,10 +284,6 @@ Global
{21CB9A8A-F25B-4DEB-92CB-ACB6920EB8BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21CB9A8A-F25B-4DEB-92CB-ACB6920EB8BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21CB9A8A-F25B-4DEB-92CB-ACB6920EB8BC}.Release|Any CPU.Build.0 = Release|Any CPU
{BECFC6B1-E04E-431C-A4D9-6F330F7DE22D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BECFC6B1-E04E-431C-A4D9-6F330F7DE22D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BECFC6B1-E04E-431C-A4D9-6F330F7DE22D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BECFC6B1-E04E-431C-A4D9-6F330F7DE22D}.Release|Any CPU.Build.0 = Release|Any CPU
{262792BF-31A8-4FCD-BBC7-341EB29FAE96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{262792BF-31A8-4FCD-BBC7-341EB29FAE96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{262792BF-31A8-4FCD-BBC7-341EB29FAE96}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -376,6 +372,10 @@ Global
{27B8D7BE-8CB7-48BF-97DA-0F031103C03D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27B8D7BE-8CB7-48BF-97DA-0F031103C03D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27B8D7BE-8CB7-48BF-97DA-0F031103C03D}.Release|Any CPU.Build.0 = Release|Any CPU
{A1891190-0E43-4E2E-BEFE-1AF0068A0D1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1891190-0E43-4E2E-BEFE-1AF0068A0D1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1891190-0E43-4E2E-BEFE-1AF0068A0D1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1891190-0E43-4E2E-BEFE-1AF0068A0D1E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -401,7 +401,6 @@ Global
{4B0BC3B7-C7FC-4333-9E28-5790D9153F07} = {632FB9CE-540D-4451-9FF2-12E89C1492BD}
{2759BC71-7F47-44DA-8579-AE2D8C8C684D} = {632FB9CE-540D-4451-9FF2-12E89C1492BD}
{21CB9A8A-F25B-4DEB-92CB-ACB6920EB8BC} = {FBAFD313-0139-4DA3-BCB3-EE54DC3B6CCD}
{BECFC6B1-E04E-431C-A4D9-6F330F7DE22D} = {DFCBB4ED-976C-4239-BCAF-8AA21E684E8C}
{0196259C-3582-4F4E-A01F-A8F9AE83B0F3} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
{D13C3EC7-B300-4158-9054-216156B203BE} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
{262792BF-31A8-4FCD-BBC7-341EB29FAE96} = {D2A0AA36-57F7-436C-A7AF-7322927F1734}
@ -426,6 +425,7 @@ Global
{43D6CB2E-6EE7-4B2B-A517-0D70298ACDBF} = {E9AEB857-E8AA-4ED6-A020-DF4D8486CEB0}
{00FC8932-554B-455F-9E02-E8A4B0DBFAA8} = {E9AEB857-E8AA-4ED6-A020-DF4D8486CEB0}
{27B8D7BE-8CB7-48BF-97DA-0F031103C03D} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
{A1891190-0E43-4E2E-BEFE-1AF0068A0D1E} = {DFCBB4ED-976C-4239-BCAF-8AA21E684E8C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0E0415AF-37CC-4999-8E5B-DD36F75BFD4D}

Просмотреть файл

@ -1,101 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file (Directory.Build.props) is automatically included by MSBuild into all projects in this solution. -->
<!-- It defines common build paths and infrastructure. -->
<!-- Other products / repositories using the same build pattern will have an own copy of copy this file -->
<PropertyGroup>
<!-- The common project structure looks like this: -->
<!-- d:\DDGit\ -->
<!-- ServiceFoo\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- .git\ -->
<!-- .nuget\ -->
<!-- Global.props -->
<!-- SomeProjectFolderA\ -->
<!-- NuGet.config -->
<!-- SomeProjectA.sln -->
<!-- ... -->
<!-- SomeProjectFolderB\ -->
<!-- ... -->
<!-- EnlistmentRoot.marker -->
<!-- ServiceBar\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- ... -->
<!-- -->
<!-- The Bin folder contains ALL build output. -->
<!-- The Obj folder contains all intermediate build files (like the obj folder). -->
<!-- The Packages folder contains ALL packages downloaded by NuGet. -->
<!-- The above folders contain NOTHING that is checked in (they are not checked in themselves). -->
<!-- The Src folder contains EVERHYTHNG that is checked in and ALL that is checked in. -->
<!-- No build output or temp files should end up in the Src folder! (barring a few *small* VS temporaries) -->
<!-- -->
<!-- Src MUST contain the EnlistmentRoot.marker file which marks the EnlistmentRoot. -->
<!-- Src also contains the NuGet.config file which ensures that NuGet uses the NuGet.Packages folder. -->
<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>
<SourceRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'SourceRoot.marker'))</SourceRoot>
<!-- This file (Directory.Build.props) is automatically included by MSBuild into all projects in this solution. -->
<!-- It defines common build paths and infrastructure. -->
<!-- Other products / repositories using the same build pattern will have an own copy of copy this file -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<KeysRoot>$(EnlistmentRoot)\.keys</KeysRoot>
<PropsRoot>$(EnlistmentRoot)\.props</PropsRoot>
<RulesetsRoot>$(EnlistmentRoot)\.rulesets</RulesetsRoot>
<TargetsRoot>$(EnlistmentRoot)\.targets</TargetsRoot>
<PublicApiRoot>$(EnlistmentRoot)\.publicApi</PublicApiRoot>
<BinRoot>$(EnlistmentRoot)\..\bin</BinRoot>
<BinRoot>$([System.IO.Path]::GetFullPath( $(BinRoot) ))</BinRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(SourceRoot.Length)))</RelativeOutputPathBase>
<!-- Unit Test projects should be in a separate obj directory to exclude them from SDL scans -->
<BaseIntermediateOutputPath>$(EnlistmentRoot)\..\obj\src\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="$(MSBuildProjectName.Contains('.Tests'))">$(EnlistmentRoot)\..\obj\tests\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(BaseIntermediateOutputPath) ))</BaseIntermediateOutputPath>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<OutputPath>$(BinRoot)\$(Configuration)\$(RelativeOutputPathBase)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>
<PackagesDir>$(EnlistmentRoot)\..\packages</PackagesDir>
<PackagesDir>$([System.IO.Path]::GetFullPath( $(PackagesDir) ))</PackagesDir>
</PropertyGroup>
<PropertyGroup>
<!-- Enable NuGet package restore during build -->
<RestorePackages>true</RestorePackages>
<RequireRestoreConsent>false</RequireRestoreConsent>
<!-- Set the root namespace for all assemblies in this project hierarchy -->
<RootNamespace>Microsoft.ApplicationInsights</RootNamespace>
</PropertyGroup>
<!-- Generate AssemblyFileVersion and AssemblyVersion attributes. -->
<PropertyGroup>
<!-- Turn on dynamic assembly attribute generation -->
<AssemblyAttributesPath>$(IntermediateOutputPath)\AssemblyInfo.g.cs</AssemblyAttributesPath>
<GenerateAdditionalSources>true</GenerateAdditionalSources>
<!-- The common project structure looks like this: -->
<!-- d:\DDGit\ -->
<!-- ServiceFoo\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- .git\ -->
<!-- .nuget\ -->
<!-- Global.props -->
<!-- SomeProjectFolderA\ -->
<!-- NuGet.config -->
<!-- SomeProjectA.sln -->
<!-- ... -->
<!-- SomeProjectFolderB\ -->
<!-- ... -->
<!-- EnlistmentRoot.marker -->
<!-- ServiceBar\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- ... -->
<!-- -->
<!-- The Bin folder contains ALL build output. -->
<!-- The Obj folder contains all intermediate build files (like the obj folder). -->
<!-- The Packages folder contains ALL packages downloaded by NuGet. -->
<!-- The above folders contain NOTHING that is checked in (they are not checked in themselves). -->
<!-- The Src folder contains EVERHYTHNG that is checked in and ALL that is checked in. -->
<!-- No build output or temp files should end up in the Src folder! (barring a few *small* VS temporaries) -->
<!-- -->
<!-- Src MUST contain the EnlistmentRoot.marker file which marks the EnlistmentRoot. -->
<!-- Src also contains the NuGet.config file which ensures that NuGet uses the NuGet.Packages folder. -->
<SourceRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'SourceRoot.marker'))</SourceRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(SourceRoot.Length)))</RelativeOutputPathBase>
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>
</PropertyGroup>
<PropertyGroup>
<!-- Set the root namespace for all assemblies in this project hierarchy -->
<RootNamespace>Microsoft.ApplicationInsights</RootNamespace>
</PropertyGroup>
</Project>

Просмотреть файл

@ -17,7 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio
CodeCov.ps1 = CodeCov.ps1
Directory.Build.props = Directory.Build.props
NuGet.Config = NuGet.Config
src\Product.props = src\Product.props
README.md = README.md
EndProjectSection
EndProject

Просмотреть файл

@ -1,14 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.DiagnosticSourceListener</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.DiagnosticSourceListener</AssemblyName>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Product.props'))\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<!--Nupkg properties-->
<PackageId>Microsoft.ApplicationInsights.DiagnosticSourceListener</PackageId>

Просмотреть файл

@ -35,6 +35,11 @@ namespace Microsoft.ApplicationInsights.EtwCollector
}
}
public static bool? IsElevated()
{
return TraceEventSession.IsElevated();
}
public void DisableProvider(Guid providerGuid)
{
this.session.DisableProvider(providerGuid);
@ -60,11 +65,6 @@ namespace Microsoft.ApplicationInsights.EtwCollector
return this.session.EnableProvider(providerName, providerLevel, matchAnyKeywords, options);
}
public bool? IsElevated()
{
return TraceEventSession.IsElevated();
}
public bool Stop(bool noThrow = false)
{
return this.session.Stop(noThrow);

Просмотреть файл

@ -1,13 +1,11 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<TargetFrameworks>net451</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.EtwCollector</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EtwCollector</AssemblyName>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Product.props'))\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

Просмотреть файл

@ -9,14 +9,6 @@ using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.ApplicationInsights.EtwCollector")]
[assembly: AssemblyDescription("")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -1,14 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Microsoft.ApplicationInsights.EventSourceListener</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EventSourceListener</AssemblyName>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Product.props'))\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Просмотреть файл

@ -8,6 +8,7 @@ namespace Microsoft.ApplicationInsights.EventSourceListener
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Tracing;
using System.Linq;
using Microsoft.ApplicationInsights.EventSourceListener.Implementation;
@ -182,6 +183,7 @@ namespace Microsoft.ApplicationInsights.EventSourceListener
/// <param name="eventSource">EventSource instance.</param>
/// <remarks>When an instance of an EventListener is created, it will immediately receive notifications about all EventSources already existing in the AppDomain.
/// Then, as new EventSources are created, the EventListener will receive notifications about them.</remarks>
[SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockObjectsWithWeakIdentity", Justification = "This was done intentionally for a bug fix.")]
protected override void OnEventSourceCreated(EventSource eventSource)
{
if (eventSource == null)

Просмотреть файл

@ -10,14 +10,6 @@ using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.ApplicationInsights.EventSourceListener")]
[assembly: AssemblyDescription("EventSourceListener is an Application Insights telemetry module that collects data from EventSource class instances.")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM

Просмотреть файл

@ -1,13 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>Microsoft.Extensions.Logging.ApplicationInsights</RootNamespace>
<AssemblyName>Microsoft.Extensions.Logging.ApplicationInsights</AssemblyName>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Product.props'))\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->

Просмотреть файл

@ -11,16 +11,6 @@ using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.ApplicationInsights.Log4NetAppender")]
[assembly: AssemblyDescription("Application Insights Log4Net Appender is a customer appender allowing you to send Log4Net log messages to Application Insights. Application Insights will collect your logs from multiple sources and provide rich powerful search capabilities. This functionality depends on Microsoft Monitoring Agent being installed onto your machine, http://go.microsoft.com/fwlink/?LinkID=328052.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -1,13 +1,11 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.Log4NetAppender</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.Log4NetAppender</AssemblyName>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Product.props'))\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<!--Nupkg properties-->

Просмотреть файл

@ -11,16 +11,6 @@ using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.ApplicationInsights.NLogTarget")]
[assembly: AssemblyDescription("Application Insights NLog Target is a custom target allowing you to send NLog log messages to Application Insights. Application Insights will collect your logs from multiple sources and provide rich powerful search capabilities. This functionality depends on Microsoft Monitoring Agent being installed onto your machine, http://go.microsoft.com/fwlink/?LinkID=328052.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -1,14 +1,12 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.NLogTarget</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.NLogTarget</AssemblyName>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Product.props'))\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<!--Nupkg properties-->
<PackageId>Microsoft.ApplicationInsights.NLogTarget</PackageId>

Просмотреть файл

@ -11,16 +11,6 @@ using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.ApplicationInsights.TraceListener")]
[assembly: AssemblyDescription("Application Insights Trace Listener is a customer trace listener allowing you to send trace log messages to Application Insights. Application Insights will collect your logs from multiple sources and provide rich powerful search capabilities. This functionality depends on Microsoft Monitoring Agent being installed onto your machine, http://go.microsoft.com/fwlink/?LinkID=328052.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -1,14 +1,12 @@
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<RootNamespace>Microsoft.ApplicationInsights.TraceListener</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.TraceListener</AssemblyName>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Product.props'))\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<!--Nupkg properties-->
<PackageId>Microsoft.ApplicationInsights.TraceListener</PackageId>

Просмотреть файл

@ -4,7 +4,6 @@
<RootNamespace>Microsoft.ApplicationInsights.DiagnosticSourceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.DiagnosticSourceListener.Tests</AssemblyName>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -4,8 +4,6 @@
<RootNamespace>Microsoft.ApplicationInsights.EtwCollector.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EtwCollector.Tests</AssemblyName>
<TargetFrameworks>net46</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -2,13 +2,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.ApplicationInsights.EtwCollector.Tests")]
[assembly: AssemblyProduct("Microsoft.ApplicationInsights.EtwCollector.Tests")]
[assembly: AssemblyCopyright("Copyright © 2017")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -4,8 +4,6 @@
<RootNamespace>Microsoft.ApplicationInsights.EventSourceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.EventSourceListener.Tests</AssemblyName>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -8,13 +8,6 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Microsoft.ApplicationInsights.EventSourceListener.Tests")]
[assembly: AssemblyProduct("Microsoft.ApplicationInsights.EventSourceListener.Tests")]
[assembly: AssemblyCopyright("Copyright © 2017")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
@ -17,7 +16,6 @@
<ProjectReference Include="..\..\src\ILogger\ILogger.csproj" />
</ItemGroup>
<Import Project="$(PropsRoot)\Test.props" />
<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />

Просмотреть файл

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<RootNamespace>Microsoft.ApplicationInsights.Log4NetAppender.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.Log4NetAppender.Tests</AssemblyName>
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
@ -26,7 +25,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(PropsRoot)\Test.props" />
<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />

Просмотреть файл

@ -9,18 +9,6 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Log4NetAppender.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Log4NetAppender.Tests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<RootNamespace>Microsoft.ApplicationInsights.NLogTarget.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.NLogTarget.Tests</AssemblyName>
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
@ -26,8 +25,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(PropsRoot)\Test.props" />
<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />
</Project>

Просмотреть файл

@ -9,18 +9,6 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("NLogTarget.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NLogTarget.Tests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -9,18 +9,6 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("TraceListener.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TraceListener.Tests")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<RootNamespace>Microsoft.ApplicationInsights.TraceListener.Tests</RootNamespace>
<AssemblyName>Microsoft.ApplicationInsights.TraceListener.Tests</AssemblyName>
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
@ -26,8 +25,6 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(PropsRoot)\Test.props" />
<Import Project="..\Shared\Adapters.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\Shared\Adapters.Shared.Tests.projitems')" />
<Import Project="..\CommonTestShared\CommonTestShared.projitems" Label="Shared" Condition="Exists('..\CommonTestShared\CommonTestShared.projitems')" />
</Project>

Просмотреть файл

@ -9,18 +9,6 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Xdt.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Xdt.Tests")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

Просмотреть файл

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup>
<RootNamespace>Xdt.Tests</RootNamespace>
<AssemblyName>Xdt.Tests</AssemblyName>
<TargetFramework>net45</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
@ -91,5 +91,4 @@
<ProjectReference Include="..\..\..\BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
</ItemGroup>
<Import Project="$(PropsRoot)\Test.props" />
</Project>

Просмотреть файл

@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solutio
build.ps1 = build.ps1
..\CHANGELOG.md = ..\CHANGELOG.md
Common.targets = Common.targets
Directory.Build.props = Directory.Build.props
dirs.proj = dirs.proj
NuGet.config = NuGet.config
Readme.md = Readme.md

Просмотреть файл

@ -1,47 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Info_DirectoryBuildProps" BeforeTargets="Build" >
<Message Text="INFO) Directory.Build.props imported by $(MSBuildProjectName)." Importance="high"/>
</Target>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<!-- EnlistmentRoot is used to determine where to put BIN and OBJ directories. -->
<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>
<!-- SourceRoot is used to reference project dependencies (ex: *.props). -->
<SourceRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'SourceRoot.marker'))</SourceRoot>
<KeysRoot>$(EnlistmentRoot)\.keys</KeysRoot>
<PropsRoot>$(EnlistmentRoot)\.props</PropsRoot>
<RulesetsRoot>$(EnlistmentRoot)\.rulesets</RulesetsRoot>
<TargetsRoot>$(EnlistmentRoot)\.targets</TargetsRoot>
<PublicApiRoot>$(EnlistmentRoot)\.publicApi</PublicApiRoot>
<BinRoot>$(EnlistmentRoot)\..\bin</BinRoot>
<BinRoot>$([System.IO.Path]::GetFullPath( $(BinRoot) ))</BinRoot>
<ObjRoot>$(EnlistmentRoot)\..\obj</ObjRoot>
<ObjRoot>$([System.IO.Path]::GetFullPath( $(ObjRoot) ))</ObjRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(SourceRoot.Length)))</RelativeOutputPathBase>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<OutputPath>$(BinRoot)\$(Configuration)\$(RelativeOutputPathBase)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
<IntermediateOutputPath>$(ObjRoot)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>
</PropertyGroup>
</Project>

Просмотреть файл

@ -138,18 +138,12 @@
/// <inheritdoc/>
public string ListenerName { get; } = "Microsoft.AspNetCore";
/// <inheritdoc />
public void OnSubscribe()
{
SubscriptionManager.Attach(this);
}
/// <summary>
/// Diagnostic event handler method for 'Microsoft.AspNetCore.Mvc.BeforeAction' event.
/// </summary>
/// <param name="httpContext">HttpContext is used to retrieve information about the Request and Response.</param>
/// <param name="routeValues">Used to get the name of the request.</param>
public void OnBeforeAction(HttpContext httpContext, IDictionary<string, object> routeValues)
public static void OnBeforeAction(HttpContext httpContext, IDictionary<string, object> routeValues)
{
var telemetry = httpContext.Features.Get<RequestTelemetry>();
@ -164,6 +158,12 @@
}
}
/// <inheritdoc />
public void OnSubscribe()
{
SubscriptionManager.Attach(this);
}
/// <summary>
/// Diagnostic event handler method for 'Microsoft.AspNetCore.Hosting.HttpRequestIn.Start' event. This is from 2.XX runtime.
/// </summary>
@ -506,7 +506,7 @@
if (context != null && routeValues != null)
{
this.OnBeforeAction(context, routeValues);
OnBeforeAction(context, routeValues);
}
}
else if (value.Key == "Microsoft.AspNetCore.Hosting.BeginRequest")

Просмотреть файл

@ -72,7 +72,7 @@
var stateDictionary = state as IReadOnlyList<KeyValuePair<string, object>>;
if (exception == null || this.options?.TrackExceptionsAsExceptionTelemetry == false)
{
var traceTelemetry = new TraceTelemetry(formatter(state, exception), this.GetSeverityLevel(logLevel));
var traceTelemetry = new TraceTelemetry(formatter(state, exception), GetSeverityLevel(logLevel));
this.PopulateTelemetry(traceTelemetry, stateDictionary, eventId);
this.telemetryClient.TrackTrace(traceTelemetry);
}
@ -80,7 +80,7 @@
{
var exceptionTelemetry = new ExceptionTelemetry(exception);
exceptionTelemetry.Message = formatter(state, exception);
exceptionTelemetry.SeverityLevel = this.GetSeverityLevel(logLevel);
exceptionTelemetry.SeverityLevel = GetSeverityLevel(logLevel);
exceptionTelemetry.Properties["Exception"] = exception.ToString();
exception.Data.Cast<DictionaryEntry>().ToList().ForEach((item) => exceptionTelemetry.Properties[item.Key.ToString()] = (item.Value ?? "null").ToString());
this.PopulateTelemetry(exceptionTelemetry, stateDictionary, eventId);
@ -89,6 +89,25 @@
}
}
private static SeverityLevel GetSeverityLevel(LogLevel logLevel)
{
switch (logLevel)
{
case LogLevel.Critical:
return SeverityLevel.Critical;
case LogLevel.Error:
return SeverityLevel.Error;
case LogLevel.Warning:
return SeverityLevel.Warning;
case LogLevel.Information:
return SeverityLevel.Information;
case LogLevel.Debug:
case LogLevel.Trace:
default:
return SeverityLevel.Verbose;
}
}
private void PopulateTelemetry(ITelemetry telemetry, IReadOnlyList<KeyValuePair<string, object>> stateDictionary, EventId eventId)
{
var telemetryWithProperties = telemetry as ISupportProperties;
@ -121,25 +140,6 @@
telemetry.Context.GetInternalContext().SdkVersion = this.sdkVersion;
}
private SeverityLevel GetSeverityLevel(LogLevel logLevel)
{
switch (logLevel)
{
case LogLevel.Critical:
return SeverityLevel.Critical;
case LogLevel.Error:
return SeverityLevel.Error;
case LogLevel.Warning:
return SeverityLevel.Warning;
case LogLevel.Information:
return SeverityLevel.Information;
case LogLevel.Debug:
case LogLevel.Trace:
default:
return SeverityLevel.Verbose;
}
}
}
#pragma warning restore CS0618
}

Просмотреть файл

@ -1,22 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<!-- Override settings from Nupkg.props. I don't know why the NetCore projects need this and the others don't. -->
<GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>true</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>true</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>true</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>true</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>true</GenerateAssemblyTitleAttribute>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>Microsoft.ApplicationInsights.AspNetCore</AssemblyName>
<LangVersion>7.2</LangVersion>
<TargetFrameworks>netstandard2.0;net451;net46;net461</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);AI_ASPNETCORE_WEB;</DefineConstants>
</PropertyGroup>
@ -42,27 +30,32 @@
<ProjectReference Include="..\..\..\WEB\Src\DependencyCollector\DependencyCollector\DependencyCollector.csproj" />
<ProjectReference Include="..\..\..\WEB\Src\PerformanceCollector\PerformanceCollector\Perf.csproj" />
<ProjectReference Include="..\..\..\WEB\Src\WindowsServer\WindowsServer\WindowsServer.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="1.0.2" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.3.1" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.6.0" />
<PackageReference Include="System.Memory" Version="4.5.4" /> <!-- This is a temporary explicit dependency. We're waiting on the next version of System.Diagnostics.DiagnosticSource. https://github.com/microsoft/ApplicationInsights-dotnet/issues/1707 -->
<PackageReference Include="System.Memory" Version="4.5.4" />
<!-- This is a temporary explicit dependency. We're waiting on the next version of System.Diagnostics.DiagnosticSource. https://github.com/microsoft/ApplicationInsights-dotnet/issues/1707 -->
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' AND '$(TargetFramework)' != 'net461' ">
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net461' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net461' ">
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.0" />
<ProjectReference Include="..\..\..\LOGGING\src\ILogger\ILogger.csproj" />
<ProjectReference Include="..\..\..\WEB\Src\EventCounterCollector\EventCounterCollector\EventCounterCollector.csproj" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.3.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' OR '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="1.1.3" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net461' ">
<!-- Need to update this to 2.1.1, but testing with the lower version. -->
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="1.1.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' ">
@ -73,5 +66,5 @@
<AdditionalFiles Include="$(PublicApiRoot)\$(AssemblyName).dll\$(TargetFramework)\PublicAPI.Shipped.txt" />
<AdditionalFiles Include="$(PublicApiRoot)\$(AssemblyName).dll\$(TargetFramework)\PublicAPI.Unshipped.txt" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,20 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>
<!-- Override settings from Nupkg.props. I don't know why the NetCore projects need this and the others don't. -->
<GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>true</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>true</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>true</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>true</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>true</GenerateAssemblyTitleAttribute>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>Microsoft.ApplicationInsights.WorkerService</AssemblyName>
<LangVersion>7.2</LangVersion>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);AI_ASPNETCORE_WORKER;</DefineConstants>
</PropertyGroup>
@ -29,7 +17,7 @@
</PropertyGroup>
<Import Project="..\Shared\Shared.projitems" Label="Shared" />
<ItemGroup>
<ProjectReference Include="..\..\..\BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj" />
<ProjectReference Include="..\..\..\BASE\src\ServerTelemetryChannel\TelemetryChannel.csproj" />
@ -38,7 +26,7 @@
<ProjectReference Include="..\..\..\WEB\Src\EventCounterCollector\EventCounterCollector\EventCounterCollector.csproj" />
<ProjectReference Include="..\..\..\WEB\Src\PerformanceCollector\PerformanceCollector\Perf.csproj" />
<ProjectReference Include="..\..\..\WEB\Src\WindowsServer\WindowsServer\WindowsServer.csproj" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
</ItemGroup>

Просмотреть файл

@ -7,8 +7,6 @@
<AssemblyName>FunctionalTests.EmptyApp.Tests</AssemblyName>
<PackageId>FunctionalTests.EmptyApp.Tests</PackageId>
<DependsOnNETStandard Condition=" '$(TargetFramework)' == 'net461'">true</DependsOnNETStandard>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -47,12 +47,6 @@
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>

Просмотреть файл

@ -6,8 +6,6 @@
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>FunctionalTests.Utils</AssemblyName>
<PackageId>FunctionalTests.Utils</PackageId>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -6,8 +6,6 @@
<RuntimeIdentifier Condition=" '$(TargetFramework)' == 'net461' ">win7-x86</RuntimeIdentifier>
<AssemblyName>FunctionalTests.WebApi.Tests</AssemblyName>
<PackageId>FunctionalTests.WebApi.Tests</PackageId>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -671,370 +671,6 @@ namespace Microsoft.Extensions.DependencyInjection.Test
Assert.NotNull(cpuCounterRequest);
}
#endif
/// <summary>
/// User could enable or disable PerformanceCounterCollectionModule by setting EnablePerformanceCounterCollectionModule.
/// This configuration can be read from a JSON file by the configuration factory or through code by passing ApplicationInsightsServiceOptions.
/// </summary>
/// <param name="configType">
/// DefaultConfiguration - calls services.AddApplicationInsightsTelemetry() which reads IConfiguration from user application automatically.
/// SuppliedConfiguration - invokes services.AddApplicationInsightsTelemetry(configuration) where IConfiguration object is supplied by caller.
/// Code - Caller creates an instance of ApplicationInsightsServiceOptions and passes it. This option overrides all configuration being used in JSON file.
/// There is a special case where NULL values in these properties - InstrumentationKey, ConnectionString, EndpointAddress and DeveloperMode are overwritten. We check IConfiguration object to see if these properties have values, if values are present then we override it.
/// </param>
/// <param name="isEnable">Sets the value for property EnablePerformanceCounterCollectionModule.</param>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisablePerfCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
if (configType == "Code")
{
serviceOptions = o => { o.EnablePerformanceCounterCollectionModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsTelemetry(filePath, null, serviceOptions, true, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<PerformanceCollectorModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
Type perfModuleType = typeof(PerformanceCollectorModule);
PerformanceCollectorModule perfModule = (PerformanceCollectorModule)modules.FirstOrDefault(m => m.GetType() == perfModuleType);
// Get the PerformanceCollectorModule private field value for isInitialized.
FieldInfo isInitializedField = perfModuleType.GetField("isInitialized", BindingFlags.NonPublic | BindingFlags.Instance);
// PerformanceCollectorModule.isInitialized is set to true when EnablePerformanceCounterCollectionModule is enabled, else it is set to false.
Assert.Equal(isEnable, (bool)isInitializedField.GetValue(perfModule));
}
#if NETCOREAPP
/// <summary>
/// User could enable or disable EventCounterCollectionModule by setting EnableEventCounterCollectionModule.
/// This configuration can be read from a JSON file by the configuration factory or through code by passing ApplicationInsightsServiceOptions.
/// </summary>
/// <param name="configType">
/// DefaultConfiguration - calls services.AddApplicationInsightsTelemetry() which reads IConfiguration from user application automatically.
/// SuppliedConfiguration - invokes services.AddApplicationInsightsTelemetry(configuration) where IConfiguration object is supplied by caller.
/// Code - Caller creates an instance of ApplicationInsightsServiceOptions and passes it. This option overrides all configuration being used in JSON file.
/// There is a special case where NULL values in these properties - InstrumentationKey, ConnectionString, EndpointAddress and DeveloperMode are overwritten. We check IConfiguration object to see if these properties have values, if values are present then we override it.
/// </param>
/// <param name="isEnable">Sets the value for property EnableEventCounterCollectionModule.</param>
[Theory]
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableEventCounterCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
if (configType == "Code")
{
serviceOptions = o => { o.EnableEventCounterCollectionModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsTelemetry(filePath, null, serviceOptions, true, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<EventCounterCollectionModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
Type eventCollectorModuleType = typeof(EventCounterCollectionModule);
EventCounterCollectionModule eventCollectorModule = (EventCounterCollectionModule)modules.FirstOrDefault(m => m.GetType() == eventCollectorModuleType);
// Get the EventCounterCollectionModule private field value for isInitialized.
FieldInfo isInitializedField = eventCollectorModuleType.GetField("isInitialized", BindingFlags.NonPublic | BindingFlags.Instance);
// EventCounterCollectionModule.isInitialized is set to true when EnableEventCounterCollectionModule is enabled, else it is set to false.
Assert.Equal(isEnable, (bool)isInitializedField.GetValue(eventCollectorModule));
}
#endif
/// <summary>
/// User could enable or disable RequestTrackingTelemetryModule by setting EnableRequestTrackingTelemetryModule.
/// This configuration can be read from a JSON file by the configuration factory or through code by passing ApplicationInsightsServiceOptions.
/// </summary>
/// <param name="configType">
/// DefaultConfiguration - calls services.AddApplicationInsightsTelemetry() which reads IConfiguration from user application automatically.
/// SuppliedConfiguration - invokes services.AddApplicationInsightsTelemetry(configuration) where IConfiguration object is supplied by caller.
/// Code - Caller creates an instance of ApplicationInsightsServiceOptions and passes it. This option overrides all configuration being used in JSON file.
/// There is a special case where NULL values in these properties - InstrumentationKey, ConnectionString, EndpointAddress and DeveloperMode are overwritten. We check IConfiguration object to see if these properties have values, if values are present then we override it.
/// </param>
/// <param name="isEnable">Sets the value for property EnableRequestTrackingTelemetryModule.</param>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableRequestCounterCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
if (configType == "Code")
{
serviceOptions = o => { o.EnableRequestTrackingTelemetryModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsTelemetry(filePath, null, serviceOptions, true, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<RequestTrackingTelemetryModule>());
var req = modules.OfType<RequestTrackingTelemetryModule>().First();
// RequestTrackingTelemetryModule.isInitialized is set to true when EnableRequestTrackingTelemetryModule is enabled, else it is set to false.
Assert.Equal(isEnable, req.IsInitialized);
}
/// <summary>
/// User could enable or disable DependencyTrackingTelemetryModule by setting EnableDependencyTrackingTelemetryModule.
/// This configuration can be read from a JSON file by the configuration factory or through code by passing ApplicationInsightsServiceOptions.
/// </summary>
/// <param name="configType">
/// DefaultConfiguration - calls services.AddApplicationInsightsTelemetry() which reads IConfiguration from user application automatically.
/// SuppliedConfiguration - invokes services.AddApplicationInsightsTelemetry(configuration) where IConfiguration object is supplied by caller.
/// Code - Caller creates an instance of ApplicationInsightsServiceOptions and passes it. This option overrides all configuration being used in JSON file.
/// There is a special case where NULL values in these properties - InstrumentationKey, ConnectionString, EndpointAddress and DeveloperMode are overwritten. We check IConfiguration object to see if these properties have values, if values are present then we override it.
/// </param>
/// <param name="isEnable">Sets the value for property EnableDependencyTrackingTelemetryModule.</param>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableDependencyCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
if (configType == "Code")
{
serviceOptions = o => { o.EnableDependencyTrackingTelemetryModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsTelemetry(filePath, null, serviceOptions, true, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<DependencyTrackingTelemetryModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
Type dependencyModuleType = typeof(DependencyTrackingTelemetryModule);
DependencyTrackingTelemetryModule dependencyModule = (DependencyTrackingTelemetryModule)modules.FirstOrDefault(m => m.GetType() == dependencyModuleType);
// Get the DependencyTrackingTelemetryModule private field value for isInitialized.
FieldInfo isInitializedField = dependencyModuleType.GetField("isInitialized", BindingFlags.NonPublic | BindingFlags.Instance);
// DependencyTrackingTelemetryModule.isInitialized is set to true when EnableDependencyTrackingTelemetryModule is enabled, else it is set to false.
Assert.Equal(isEnable, (bool)isInitializedField.GetValue(dependencyModule));
}
/// <summary>
/// User could enable or disable QuickPulseCollectorModule by setting EnableQuickPulseMetricStream.
/// This configuration can be read from a JSON file by the configuration factory or through code by passing ApplicationInsightsServiceOptions.
/// </summary>
/// <param name="configType">
/// DefaultConfiguration - calls services.AddApplicationInsightsTelemetry() which reads IConfiguration from user application automatically.
/// SuppliedConfiguration - invokes services.AddApplicationInsightsTelemetry(configuration) where IConfiguration object is supplied by caller.
/// Code - Caller creates an instance of ApplicationInsightsServiceOptions and passes it. This option overrides all configuration being used in JSON file.
/// There is a special case where NULL values in these properties - InstrumentationKey, ConnectionString, EndpointAddress and DeveloperMode are overwritten. We check IConfiguration object to see if these properties have values, if values are present then we override it.
/// </param>
/// <param name="isEnable">Sets the value for property EnableQuickPulseMetricStream.</param>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableQuickPulseCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
if (configType == "Code")
{
serviceOptions = o => { o.EnableQuickPulseMetricStream = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsTelemetry(filePath, null, serviceOptions, true, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<QuickPulseTelemetryModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
Type quickPulseModuleType = typeof(QuickPulseTelemetryModule);
QuickPulseTelemetryModule quickPulseModule = (QuickPulseTelemetryModule)modules.FirstOrDefault(m => m.GetType() == quickPulseModuleType);
// Get the QuickPulseTelemetryModule private field value for isInitialized.
FieldInfo isInitializedField = quickPulseModuleType.GetField("isInitialized", BindingFlags.NonPublic | BindingFlags.Instance);
// QuickPulseTelemetryModule.isInitialized is set to true when EnableQuickPulseMetricStream is enabled, else it is set to false.
Assert.Equal(isEnable, (bool)isInitializedField.GetValue(quickPulseModule));
}
/// <summary>
/// User could enable or disable AppServiceHeartbeatModule by setting EnableAppServicesHeartbeatTelemetryModule.
/// This configuration can be read from a JSON file by the configuration factory or through code by passing ApplicationInsightsServiceOptions.
/// </summary>
/// <param name="configType">
/// DefaultConfiguration - calls services.AddApplicationInsightsTelemetry() which reads IConfiguration from user application automatically.
/// SuppliedConfiguration - invokes services.AddApplicationInsightsTelemetry(configuration) where IConfiguration object is supplied by caller.
/// Code - Caller creates an instance of ApplicationInsightsServiceOptions and passes it. This option overrides all configuration being used in JSON file.
/// There is a special case where NULL values in these properties - InstrumentationKey, ConnectionString, EndpointAddress and DeveloperMode are overwritten. We check IConfiguration object to see if these properties have values, if values are present then we override it.
/// </param>
/// <param name="isEnable">Sets the value for property EnableAppServicesHeartbeatTelemetryModule.</param>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableAppServiceHeartbeatModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
if (configType == "Code")
{
serviceOptions = o => { o.EnableAppServicesHeartbeatTelemetryModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsTelemetry(filePath, null, serviceOptions, true, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<AppServicesHeartbeatTelemetryModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
AppServicesHeartbeatTelemetryModule appServHBModule = modules.OfType<AppServicesHeartbeatTelemetryModule>().Single();
Assert.Equal(isEnable, appServHBModule.IsInitialized);
}
/// <summary>
/// User could enable or disable AzureInstanceMetadataModule by setting EnableAzureInstanceMetadataTelemetryModule.
/// This configuration can be read from a JSON file by the configuration factory or through code by passing ApplicationInsightsServiceOptions.
/// </summary>
/// <param name="configType">
/// DefaultConfiguration - calls services.AddApplicationInsightsTelemetry() which reads IConfiguration from user application automatically.
/// SuppliedConfiguration - invokes services.AddApplicationInsightsTelemetry(configuration) where IConfiguration object is supplied by caller.
/// Code - Caller creates an instance of ApplicationInsightsServiceOptions and passes it. This option overrides all configuration being used in JSON file.
/// There is a special case where NULL values in these properties - InstrumentationKey, ConnectionString, EndpointAddress and DeveloperMode are overwritten. We check IConfiguration object to see if these properties have values, if values are present then we override it.
/// </param>
/// <param name="isEnable">Sets the value for property EnableAzureInstanceMetadataTelemetryModule.</param>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableAzureInstanceMetadataModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
if (configType == "Code")
{
serviceOptions = o => { o.EnableAzureInstanceMetadataTelemetryModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsTelemetry(filePath, null, serviceOptions, true, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<AzureInstanceMetadataTelemetryModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
AzureInstanceMetadataTelemetryModule azureInstanceMetadataModule = modules.OfType<AzureInstanceMetadataTelemetryModule>().Single();
Assert.Equal(isEnable, azureInstanceMetadataModule.IsInitialized);
}
[Fact]
public static void RegistersTelemetryConfigurationFactoryMethodThatPopulatesDependencyCollectorWithDefaultValues()
@ -1350,7 +986,6 @@ namespace Microsoft.Extensions.DependencyInjection.Test
Assert.Null(testTelemetryModule);
}
[Fact]
public static void AddsAddaptiveSamplingServiceToTheConfigurationByDefault()
{

Просмотреть файл

@ -0,0 +1,274 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using Microsoft.ApplicationInsights.AspNetCore.Extensions;
using Microsoft.ApplicationInsights.DependencyCollector;
using Microsoft.ApplicationInsights.Extensibility;
#if NETCOREAPP
using Microsoft.ApplicationInsights.Extensibility.EventCounterCollector;
#endif
using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector;
using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse;
using Microsoft.ApplicationInsights.WindowsServer;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Internal;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Xunit;
namespace Microsoft.ApplicationInsights.AspNetCore.Tests.Extensions
{
/// <summary>
/// Test class for <see cref="ApplicationInsightsServiceOptions"/>.
/// </summary>
/// <remarks>
/// This configuration can be read from a JSON file by the configuration factory or through code by passing ApplicationInsightsServiceOptions.
/// <param name="configType">
/// DefaultConfiguration - calls services.AddApplicationInsightsTelemetryWorkerService() which reads IConfiguration from user application automatically.
/// SuppliedConfiguration - invokes services.AddApplicationInsightsTelemetryWorkerService(configuration) where IConfiguration object is supplied by caller.
/// Code - Caller creates an instance of ApplicationInsightsServiceOptions and passes it. This option overrides all configuration being used in JSON file.
/// There is a special case where NULL values in these properties - InstrumentationKey, ConnectionString, EndpointAddress and DeveloperMode are overwritten. We check IConfiguration object to see if these properties have values, if values are present then we override it.
/// </param>
/// <param name="isEnable">Sets the value for property EnableEventCounterCollectionModule.</param>
/// </remarks>
public class ApplicationInsightsServiceOptionsTests
{
private static IServiceProvider TestShim(string configType, bool isEnabled, Action<ApplicationInsightsServiceOptions, bool> testConfig)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine(Directory.GetCurrentDirectory(), "content", "config-all-settings-" + isEnabled.ToString().ToLower() + ".json");
if (configType == "Code")
{
filePath = null;
// This will set the property defined in the test.
serviceOptions = o => { testConfig(o, isEnabled); };
}
// ACT
var services = CreateServicesAndAddApplicationinsightsWorker(
jsonPath: filePath,
serviceOptions: serviceOptions,
useDefaultConfig: configType == "DefaultConfiguration" ? true : false);
IServiceProvider serviceProvider = services.BuildServiceProvider();
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
// Verify that Modules were added to DI.
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
return serviceProvider;
}
private static ServiceCollection CreateServicesAndAddApplicationinsightsWorker(string jsonPath, Action<ApplicationInsightsServiceOptions> serviceOptions = null, bool useDefaultConfig = true)
{
IConfigurationRoot config;
var services = new ServiceCollection()
.AddSingleton<IHostingEnvironment>(new HostingEnvironment() { ContentRootPath = Directory.GetCurrentDirectory() })
.AddSingleton<DiagnosticListener>(new DiagnosticListener("TestListener"));
if (jsonPath != null)
{
var jsonFullPath = Path.Combine(Directory.GetCurrentDirectory(), jsonPath);
Console.WriteLine("json:" + jsonFullPath);
try
{
config = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile(jsonFullPath).Build();
}
catch (Exception)
{
throw new Exception("Unable to build with json:" + jsonFullPath);
}
}
else
{
var configBuilder = new ConfigurationBuilder()
.AddJsonFile(Path.Combine(Directory.GetCurrentDirectory(), "appsettings.json"), true)
.AddEnvironmentVariables();
config = configBuilder.Build();
}
#if NET46
// In NET46, we don't read from default configuration or bind configuration.
services.AddApplicationInsightsTelemetry(config);
#else
if (useDefaultConfig)
{
services.AddSingleton<IConfiguration>(config);
services.AddApplicationInsightsTelemetry();
}
else
{
services.AddApplicationInsightsTelemetry(config);
}
#endif
if (serviceOptions != null)
{
services.Configure(serviceOptions);
}
return (ServiceCollection)services;
}
/// <summary>
/// User could enable or disable PerformanceCounterCollectionModule by setting EnablePerformanceCounterCollectionModule.
/// </summary>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisablePerfCollectorModule(string configType, bool isEnable)
{
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnablePerformanceCounterCollectionModule = b );
var modules = serviceProvider.GetServices<ITelemetryModule>();
var module = modules.OfType<PerformanceCollectorModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
#if NETCOREAPP
/// <summary>
/// User could enable or disable EventCounterCollectionModule by setting EnableEventCounterCollectionModule.
/// </summary>
[Theory]
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableEventCounterCollectorModule(string configType, bool isEnable)
{
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableEventCounterCollectionModule = b);
var modules = serviceProvider.GetServices<ITelemetryModule>();
var module = modules.OfType<EventCounterCollectionModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
#endif
/// <summary>
/// User could enable or disable DependencyTrackingTelemetryModule by setting EnableDependencyTrackingTelemetryModule.
/// </summary>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableDependencyCollectorModule(string configType, bool isEnable)
{
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableDependencyTrackingTelemetryModule = b);
var modules = serviceProvider.GetServices<ITelemetryModule>();
var module = modules.OfType<DependencyTrackingTelemetryModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>
/// User could enable or disable QuickPulseCollectorModule by setting EnableQuickPulseMetricStream.
/// </summary>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableQuickPulseCollectorModule(string configType, bool isEnable)
{
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableQuickPulseMetricStream = b);
var modules = serviceProvider.GetServices<ITelemetryModule>();
var module = modules.OfType<QuickPulseTelemetryModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>
/// User could enable or disable AzureInstanceMetadataModule by setting EnableAzureInstanceMetadataTelemetryModule.
/// </summary>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableAzureInstanceMetadataModule(string configType, bool isEnable)
{
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableAzureInstanceMetadataTelemetryModule = b);
var modules = serviceProvider.GetServices<ITelemetryModule>();
var module = modules.OfType<AzureInstanceMetadataTelemetryModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>
/// User could enable or disable RequestTrackingTelemetryModule by setting EnableRequestTrackingTelemetryModule.
/// </summary>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableRequestCounterCollectorModule(string configType, bool isEnable)
{
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableRequestTrackingTelemetryModule = b);
var modules = serviceProvider.GetServices<ITelemetryModule>();
var module = modules.OfType<RequestTrackingTelemetryModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>
/// User could enable or disable AppServiceHeartbeatModule by setting EnableAppServicesHeartbeatTelemetryModule.
/// </summary>
[Theory]
#if !NET46
[InlineData("DefaultConfiguration", true)]
[InlineData("DefaultConfiguration", false)]
[InlineData("SuppliedConfiguration", true)]
[InlineData("SuppliedConfiguration", false)]
#endif
[InlineData("Code", true)]
[InlineData("Code", false)]
public static void UserCanEnableAndDisableAppServiceHeartbeatModule(string configType, bool isEnable)
{
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableAppServicesHeartbeatTelemetryModule = b);
var modules = serviceProvider.GetServices<ITelemetryModule>();
var module = modules.OfType<AppServicesHeartbeatTelemetryModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
}
}

Просмотреть файл

@ -11,8 +11,6 @@
<AssemblyName>Microsoft.ApplicationInsights.AspNetCore.Tests</AssemblyName>
<PackageId>Microsoft.ApplicationInsights.AspNetCore.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
@ -26,43 +24,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="1.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.3.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' OR '$(TargetFramework)' == 'net461' ">
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="1.0.3" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
@ -75,40 +41,10 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Generator>SettingsSingleFileGenerator</Generator>
</None>
<None Update="content\config-all-default.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-all-settings-false.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-all-settings-true.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-connection-string-and-instrumentation-key.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-developer-mode.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-endpoint-address.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-connection-string.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-instrumentation-key-new.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-instrumentation-key.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-req-dep-settings-false.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="content\config-req-dep-settings-true.json">
<None Update="content\**">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

Просмотреть файл

@ -35,6 +35,38 @@ namespace Microsoft.ApplicationInsights.WorkerService.Tests
this.output.WriteLine("Initialized");
}
private static IServiceProvider TestShim(string configType, bool isEnabled, Action<ApplicationInsightsServiceOptions, bool> testConfig)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine(Directory.GetCurrentDirectory(), "content", "config-all-settings-" + isEnabled.ToString().ToLower() + ".json");
if (configType == "Code")
{
filePath = null;
// This will set the property defined in the test.
serviceOptions = o => { testConfig(o, isEnabled); };
}
// ACT
var services = CreateServicesAndAddApplicationinsightsWorker(
jsonPath: filePath,
serviceOptions: serviceOptions,
useDefaultConfig: configType == "DefaultConfiguration" ? true : false);
IServiceProvider serviceProvider = services.BuildServiceProvider();
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
// Verify that Modules were added to DI.
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
return serviceProvider;
}
public static ServiceCollection CreateServicesAndAddApplicationinsightsWorker(string jsonPath, Action<ApplicationInsightsServiceOptions> serviceOptions = null, bool useDefaultConfig = true)
{
IConfigurationRoot config;
@ -488,36 +520,11 @@ namespace Microsoft.ApplicationInsights.WorkerService.Tests
[InlineData("Code", false)]
public static void UserCanEnableAndDisablePerfCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine(Directory.GetCurrentDirectory(), "content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnablePerformanceCounterCollectionModule = b);
if (configType == "Code")
{
serviceOptions = o => { o.EnablePerformanceCounterCollectionModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsWorker(filePath, serviceOptions, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<PerformanceCollectorModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
Type perfModuleType = typeof(PerformanceCollectorModule);
PerformanceCollectorModule perfModule = (PerformanceCollectorModule)modules.FirstOrDefault(m => m.GetType() == perfModuleType);
// Get the PerformanceCollectorModule private field value for isInitialized.
FieldInfo isInitializedField = perfModuleType.GetField("isInitialized", BindingFlags.NonPublic | BindingFlags.Instance);
// PerformanceCollectorModule.isInitialized is set to true when EnablePerformanceCounterCollectionModule is enabled, else it is set to false.
Assert.Equal(isEnable, (bool)isInitializedField.GetValue(perfModule));
var module = modules.OfType<PerformanceCollectorModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>
@ -540,36 +547,11 @@ namespace Microsoft.ApplicationInsights.WorkerService.Tests
[InlineData("Code", false)]
public static void UserCanEnableAndDisableEventCounterCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine(Directory.GetCurrentDirectory(), "content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableEventCounterCollectionModule = b);
if (configType == "Code")
{
serviceOptions = o => { o.EnableEventCounterCollectionModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsWorker(filePath, serviceOptions, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<EventCounterCollectionModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
Type eventCollectorModuleType = typeof(EventCounterCollectionModule);
EventCounterCollectionModule eventCollectorModule = (EventCounterCollectionModule)modules.FirstOrDefault(m => m.GetType() == eventCollectorModuleType);
// Get the EventCounterCollectionModule private field value for isInitialized.
FieldInfo isInitializedField = eventCollectorModuleType.GetField("isInitialized", BindingFlags.NonPublic | BindingFlags.Instance);
// EventCounterCollectionModule.isInitialized is set to true when EnableEventCounterCollectionModule is enabled, else it is set to false.
Assert.Equal(isEnable, (bool)isInitializedField.GetValue(eventCollectorModule));
var module = modules.OfType<EventCounterCollectionModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>
@ -592,36 +574,11 @@ namespace Microsoft.ApplicationInsights.WorkerService.Tests
[InlineData("Code", false)]
public static void UserCanEnableAndDisableDependencyCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableDependencyTrackingTelemetryModule = b);
if (configType == "Code")
{
serviceOptions = o => { o.EnableDependencyTrackingTelemetryModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsWorker(filePath, serviceOptions, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<DependencyTrackingTelemetryModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
Type dependencyModuleType = typeof(DependencyTrackingTelemetryModule);
DependencyTrackingTelemetryModule dependencyModule = (DependencyTrackingTelemetryModule)modules.FirstOrDefault(m => m.GetType() == dependencyModuleType);
// Get the DependencyTrackingTelemetryModule private field value for isInitialized.
FieldInfo isInitializedField = dependencyModuleType.GetField("isInitialized", BindingFlags.NonPublic | BindingFlags.Instance);
// DependencyTrackingTelemetryModule.isInitialized is set to true when EnableDependencyTrackingTelemetryModule is enabled, else it is set to false.
Assert.Equal(isEnable, (bool)isInitializedField.GetValue(dependencyModule));
var module = modules.OfType<DependencyTrackingTelemetryModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>
@ -644,36 +601,11 @@ namespace Microsoft.ApplicationInsights.WorkerService.Tests
[InlineData("Code", false)]
public static void UserCanEnableAndDisableQuickPulseCollectorModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableQuickPulseMetricStream = b);
if (configType == "Code")
{
serviceOptions = o => { o.EnableQuickPulseMetricStream = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsWorker(filePath, serviceOptions, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<QuickPulseTelemetryModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
Type quickPulseModuleType = typeof(QuickPulseTelemetryModule);
QuickPulseTelemetryModule quickPulseModule = (QuickPulseTelemetryModule)modules.FirstOrDefault(m => m.GetType() == quickPulseModuleType);
// Get the QuickPulseTelemetryModule private field value for isInitialized.
FieldInfo isInitializedField = quickPulseModuleType.GetField("isInitialized", BindingFlags.NonPublic | BindingFlags.Instance);
// QuickPulseTelemetryModule.isInitialized is set to true when EnableQuickPulseMetricStream is enabled, else it is set to false.
Assert.Equal(isEnable, (bool)isInitializedField.GetValue(quickPulseModule));
var module = modules.OfType<QuickPulseTelemetryModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>
@ -696,32 +628,11 @@ namespace Microsoft.ApplicationInsights.WorkerService.Tests
[InlineData("Code", false)]
public static void UserCanEnableAndDisableAzureInstanceMetadataModule(string configType, bool isEnable)
{
// ARRANGE
Action<ApplicationInsightsServiceOptions> serviceOptions = null;
var filePath = Path.Combine("content", "config-all-settings-" + isEnable.ToString().ToLower() + ".json");
IServiceProvider serviceProvider = TestShim(configType: configType, isEnabled: isEnable, testConfig: (o, b) => o.EnableAzureInstanceMetadataTelemetryModule = b);
if (configType == "Code")
{
serviceOptions = o => { o.EnableAzureInstanceMetadataTelemetryModule = isEnable; };
filePath = null;
}
// ACT
var services = CreateServicesAndAddApplicationinsightsWorker(filePath, serviceOptions, configType == "DefaultConfiguration" ? true : false);
// VALIDATE
IServiceProvider serviceProvider = services.BuildServiceProvider();
var modules = serviceProvider.GetServices<ITelemetryModule>();
Assert.NotNull(modules);
// Even if a module is disabled its still added to DI.
Assert.NotEmpty(modules.OfType<AzureInstanceMetadataTelemetryModule>());
// Get telemetry client to trigger TelemetryConfig setup.
var tc = serviceProvider.GetService<TelemetryClient>();
AzureInstanceMetadataTelemetryModule azureInstanceMetadataModule = modules.OfType<AzureInstanceMetadataTelemetryModule>().Single();
Assert.Equal(isEnable, azureInstanceMetadataModule.IsInitialized);
var module = modules.OfType<AzureInstanceMetadataTelemetryModule>().Single();
Assert.Equal(isEnable, module.IsInitialized);
}
/// <summary>

136
Readme.md
Просмотреть файл

@ -1,97 +1,93 @@
# Application Insights for .NET Apps
This is the .NET SDK for sending data to [Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/overview) & [Application Insights](https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview).
## Getting Started
Please review our How-to guides to review which packages are appropriate for your project:
- [Console App](https://docs.microsoft.com/azure/azure-monitor/app/console)
- [ASP.NET](https://docs.microsoft.com/azure/azure-monitor/app/asp-net)
- [ASP.NET Core](https://docs.microsoft.com/azure/azure-monitor/app/asp-net-core)
- [ILogger](https://docs.microsoft.com/azure/azure-monitor/app/ilogger)
- [WorkerService](https://docs.microsoft.com/azure/azure-monitor/app/worker-service)
* [Console App](https://docs.microsoft.com/azure/azure-monitor/app/console)
* [ASP.NET](https://docs.microsoft.com/azure/azure-monitor/app/asp-net)
* [ASP.NET Core](https://docs.microsoft.com/azure/azure-monitor/app/asp-net-core)
* [ILogger](https://docs.microsoft.com/azure/azure-monitor/app/ilogger)
* [WorkerService](https://docs.microsoft.com/azure/azure-monitor/app/worker-service)
### Understanding our SDK
We've gathered a list of concepts, code examples, and links to full guides [here](.docs/concepts.md).
## Contributing
We strongly welcome and encourage contributions to this project.
We strongly welcome and encourage contributions to this project.
Please review our [Contributing guide](.github/CONTRIBUTING.md).
## Branches
- [master](https://github.com/Microsoft/ApplicationInsights-dotnet/tree/master) contains the *latest* published release located on [NuGet](https://www.nuget.org/packages/Microsoft.ApplicationInsights).
- [develop](https://github.com/Microsoft/ApplicationInsights-dotnet/tree/develop) contains the code for the *next* release.
* [master](https://github.com/Microsoft/ApplicationInsights-dotnet/tree/master) contains the *latest* published release located on [NuGet](https://www.nuget.org/packages/Microsoft.ApplicationInsights).
* [develop](https://github.com/Microsoft/ApplicationInsights-dotnet/tree/develop) contains the code for the *next* release.
## NuGet packages
The following packages are published from this repository:
| | Nightly Build | Latest Official Release |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Base SDKs** | | |
| - [Microsoft.ApplicationInsights](https://www.nuget.org/packages/Microsoft.ApplicationInsights/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights/) |
| - [Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel/) |
| **Web SDKs** | | |
| - [Microsoft.ApplicationInsights.Web](https://www.nuget.org/packages/Microsoft.ApplicationInsights.Web/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.Web?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.Web) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.Web.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.Web) |
| - [Microsoft.ApplicationInsights.DependencyCollector](https://www.nuget.org/packages/Microsoft.ApplicationInsights.DependencyCollector/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.DependencyCollector?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.DependencyCollector) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.DependencyCollector.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.DependencyCollector) |
| - [Microsoft.ApplicationInsights.EventCounterCollector](https://www.nuget.org/packages/Microsoft.ApplicationInsights.EventCounterCollector) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.EventCounterCollector?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.EventCounterCollector) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.EventCounterCollector.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.EventCounterCollector) |
| - [Microsoft.ApplicationInsights.PerfCounterCollector](https://www.nuget.org/packages/Microsoft.ApplicationInsights.PerfCounterCollector/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.PerfCounterCollector?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.PerfCounterCollector) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.PerfCounterCollector.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.PerfCounterCollector) |
| - [Microsoft.ApplicationInsights.WindowsServer](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.WindowsServer?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.WindowsServer) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.WindowsServer.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer) |
| - [Microsoft.AspNet.ApplicationInsights.HostingStartup](https://www.nuget.org/packages/Microsoft.AspNet.ApplicationInsights.HostingStartup/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.AspNet.ApplicationInsights.HostingStartup?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.AspNet.ApplicationInsights.HostingStartup) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.AspNet.ApplicationInsights.HostingStartup.svg)](https://nuget.org/packages/Microsoft.AspNet.ApplicationInsights.HostingStartup) |
| **NetCore SDKs** | | |
| - [Microsoft.ApplicationInsights.AspNetCore](https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.AspNetCore?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.AspNetCore) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.AspNetCore.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore) |
| - [Microsoft.ApplicationInsights.WorkerService](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WorkerService/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.WorkerService?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.WorkerService) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.WorkerService.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.WorkerService) |
| **Logging Adapters** | | |
| - For ILogger: [Microsoft.Extensions.Logging.ApplicationInsights](https://www.nuget.org/packages/Microsoft.Extensions.Logging.ApplicationInsights/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.Extensions.Logging.ApplicationInsights?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.Extensions.Logging.ApplicationInsights) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.Extensions.Logging.ApplicationInsights.svg)](https://www.nuget.org/packages/Microsoft.Extensions.Logging.ApplicationInsights/) |
| - For NLog: [Microsoft.ApplicationInsights.NLogTarget](http://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.NLogTarget?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.NLogTarget) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.NLogTarget.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget/) |
| - For Log4Net: [Microsoft.ApplicationInsights.Log4NetAppender](http://www.nuget.org/packages/Microsoft.ApplicationInsights.Log4NetAppender/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.Log4NetAppender?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.Log4NetAppender) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.Log4NetAppender.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.Log4NetAppender/) |
| - For System.Diagnostics: [Microsoft.ApplicationInsights.TraceListener](http://www.nuget.org/packages/Microsoft.ApplicationInsights.TraceListener/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.TraceListener?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.TraceListener) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.TraceListener.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.TraceListener/) |
| - [Microsoft.ApplicationInsights.DiagnosticSourceListener](http://www.nuget.org/packages/Microsoft.ApplicationInsights.DiagnosticSourceListener/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.DiagnosticSourceListener?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.DiagnosticSourceListener) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.DiagnosticSourceListener.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.DiagnosticSourceListener/) |
| - [Microsoft.ApplicationInsights.EtwCollector](http://www.nuget.org/packages/Microsoft.ApplicationInsights.EtwCollector/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.EtwCollector?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.EtwCollector) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.EtwCollector.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.EtwCollector/) |
| - [Microsoft.ApplicationInsights.EventSourceListener](http://www.nuget.org/packages/Microsoft.ApplicationInsights.EventSourceListener/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.EventSourceListener?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.EventSourceListener) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.EventSourceListener.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.EventSourceListener/) |
The following packages are published from this repository:
| | Nightly Build | Latest Official Release |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Base SDKs** | | |
| - [Microsoft.ApplicationInsights](https://www.nuget.org/packages/Microsoft.ApplicationInsights/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights/) |
| - [Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel/) |
| **Auto Collectors (Generic)** | | |
| - [Microsoft.ApplicationInsights.DependencyCollector](https://www.nuget.org/packages/Microsoft.ApplicationInsights.DependencyCollector/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.DependencyCollector?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.DependencyCollector) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.DependencyCollector.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.DependencyCollector) |
| - [Microsoft.ApplicationInsights.EventCounterCollector](https://www.nuget.org/packages/Microsoft.ApplicationInsights.EventCounterCollector) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.EventCounterCollector?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.EventCounterCollector) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.EventCounterCollector.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.EventCounterCollector) |
| - [Microsoft.ApplicationInsights.PerfCounterCollector](https://www.nuget.org/packages/Microsoft.ApplicationInsights.PerfCounterCollector/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.PerfCounterCollector?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.PerfCounterCollector) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.PerfCounterCollector.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.PerfCounterCollector) |
| - [Microsoft.ApplicationInsights.WindowsServer](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.WindowsServer?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.WindowsServer) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.WindowsServer.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.WindowsServer) |
| **Auto Collectors (ASP.NET)** | | |
| - [Microsoft.ApplicationInsights.Web](https://www.nuget.org/packages/Microsoft.ApplicationInsights.Web/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.Web?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.Web) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.Web.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.Web) |
| **Auto Collectors (ASP.NET Core)** | | |
| - [Microsoft.ApplicationInsights.AspNetCore](https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.AspNetCore?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.AspNetCore) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.AspNetCore.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore) |
| **Auto Collectors (WorkerService, Console Application, etc.)** | | |
| - [Microsoft.ApplicationInsights.WorkerService](https://www.nuget.org/packages/Microsoft.ApplicationInsights.WorkerService/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.WorkerService?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.WorkerService) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.WorkerService.svg)](https://nuget.org/packages/Microsoft.ApplicationInsights.WorkerService) |
| **Logging Adapters** | | |
| - For `ILogger`: [Microsoft.Extensions.Logging.ApplicationInsights](https://www.nuget.org/packages/Microsoft.Extensions.Logging.ApplicationInsights/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.Extensions.Logging.ApplicationInsights?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.Extensions.Logging.ApplicationInsights) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.Extensions.Logging.ApplicationInsights.svg)](https://www.nuget.org/packages/Microsoft.Extensions.Logging.ApplicationInsights/) |
| - For `NLog`: [Microsoft.ApplicationInsights.NLogTarget](http://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.NLogTarget?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.NLogTarget) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.NLogTarget.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget/) |
| - For `Log4Net`: [Microsoft.ApplicationInsights.Log4NetAppender](http://www.nuget.org/packages/Microsoft.ApplicationInsights.Log4NetAppender/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.Log4NetAppender?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.Log4NetAppender) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.Log4NetAppender.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.Log4NetAppender/) |
| - For `System.Diagnostics`: [Microsoft.ApplicationInsights.TraceListener](http://www.nuget.org/packages/Microsoft.ApplicationInsights.TraceListener/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.TraceListener?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.TraceListener) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.TraceListener.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.TraceListener/) |
| - [Microsoft.ApplicationInsights.DiagnosticSourceListener](http://www.nuget.org/packages/Microsoft.ApplicationInsights.DiagnosticSourceListener/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.DiagnosticSourceListener?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.DiagnosticSourceListener) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.DiagnosticSourceListener.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.DiagnosticSourceListener/) |
| - [Microsoft.ApplicationInsights.EtwCollector](http://www.nuget.org/packages/Microsoft.ApplicationInsights.EtwCollector/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.EtwCollector?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.EtwCollector) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.EtwCollector.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.EtwCollector/) |
| - [Microsoft.ApplicationInsights.EventSourceListener](http://www.nuget.org/packages/Microsoft.ApplicationInsights.EventSourceListener/) | [![Nightly](https://img.shields.io/myget/applicationinsights-dotnet-nightly/v/Microsoft.ApplicationInsights.EventSourceListener?label=)](https://www.myget.org/feed/applicationinsights-dotnet-nightly/package/nuget/Microsoft.ApplicationInsights.EventSourceListener) | [![Nuget](https://img.shields.io/nuget/vpre/Microsoft.ApplicationInsights.EventSourceListener.svg)](https://www.nuget.org/packages/Microsoft.ApplicationInsights.EventSourceListener/) |
Nightly Builds are available on our MyGet feed:
`https://www.myget.org/F/applicationinsights-dotnet-nightly/api/v3/index.json`
These builds come from the develop branch. These are not signed and are not intended for production workloads.
## Release Schedule
The following is our tentative release schedule for 2020.
| **Release Schedule** | | | | |
|----------- |------- |--- |------------ |------------- |
| **2020H1** | | | | |
| January | Early | | 2.13 Beta2 | |
| | Mid | | 2.13 Beta3 | |
| February | Early | | | 2.13 Stable |
| | Mid | | 2.14 Beta1 | |
| March | Early | | 2.14 Beta2 | |
| | Mid | | 2.14 Beta3 | |
| April | Early | | | 2.14 Stable |
| | Mid | | | |
| May | Early | | 2.15 Beta1 | |
| | Mid | | 2.15 Beta2 | |
| June | Early | | | 2.15 Stable |
| | Mid | | 2.16 Beta1 | |
| **2020H2** | | | | |
| July | Early | | 2.16 Beta2 | |
| | Mid | | 2.16 Beta3 | |
| August | Early | | | 2.16 Stable |
| | Mid | | 2.17 Beta1 | |
| September | Early | | 2.17 Beta2 | |
| | Mid | | 2.17 Beta3 | |
| October | Early | | | 2.17 Stable |
| | Mid | | 2.18 Beta1 | |
| November | Early | | 2.18 Beta2 | |
| | Mid | | 2.18 Beta3 | |
| December | Early | | | 2.18 Stable |
| | Mid | | 2.19 Beta1 | |
| **Release Schedule** | | | | |
|--------------------- |-------- | -- |------------ |------------- |
| **2020H1** | | | | |
| January | Early | | 2.13 Beta2 | |
| | Mid | | 2.13 Beta3 | |
| February | Early | | | 2.13 Stable |
| | Mid | | 2.14 Beta1 | |
| March | Early | | 2.14 Beta2 | |
| | Mid | | 2.14 Beta3 | |
| April | Early | | | 2.14 Stable |
| | Mid | | | |
| May | Early | | 2.15 Beta1 | |
| | Mid | | 2.15 Beta2 | |
| June | Early | | | 2.15 Stable |
| | Mid | | 2.16 Beta1 | |
| **2020H2** | | | | |
| July | Early | | 2.16 Beta2 | |
| | Mid | | 2.16 Beta3 | |
| August | Early | | | 2.16 Stable |
| | Mid | | 2.17 Beta1 | |
| September | Early | | 2.17 Beta2 | |
| | Mid | | 2.17 Beta3 | |
| October | Early | | | 2.17 Stable |
| | Mid | | 2.18 Beta1 | |
| November | Early | | 2.18 Beta2 | |
| | Mid | | 2.18 Beta3 | |
| December | Early | | | 2.18 Stable |
| | Mid | | 2.19 Beta1 | |

Просмотреть файл

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- If $(EnlistmentRoot) is not set then Directory.Build.props hasn't been imported yet. Import Microsoft.Common.props to get it included. -->
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="'$(EnlistmentRoot)' == '' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<!-- If $(EnlistmentRoot) is still not set, then import Directory.Build.props directly. This can happen when gitlink tries to build (because it uses MSBuild tools version 4.0 and we can't find Microsoft.Common.props) -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'Directory.Build.props'))\Directory.Build.props" Condition="'$(EnlistmentRoot)' == ''"/>
<PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
<DefineConstants>$(DefineConstants);NET45;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>$(DefineConstants);NETSTANDARD2_0;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.6'">
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
<DefineConstants>$(DefineConstants);NETSTANDARD1_6;NETSTANDARD;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>$(DefineConstants);TRACE;DEBUG;CODE_ANALYSIS;</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<PartitionPropertiesFile>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Partition.props'))\Partition.props</PartitionPropertiesFile>
</PropertyGroup>
<Import Project="$(PartitionPropertiesFile)" Condition="Exists($(PartitionPropertiesFile))" />
</Project>

Просмотреть файл

@ -1,112 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This file (Directory.Build.props) is automatically included by MSBuild into all projects in this solution. -->
<!-- It defines common build paths and infrastructure. -->
<!-- Other products / repositories using the same build pattern will have their own copy of copy this file -->
<!-- This file (Directory.Build.props) is automatically included by MSBuild into all projects in this solution. -->
<!-- It defines common build paths and infrastructure. -->
<!-- Other products / repositories using the same build pattern will have their own copy of copy this file -->
<PropertyGroup>
<!-- The common project structure looks like this: -->
<!-- d:\DDGit\ -->
<!-- ServiceFoo\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- .git\ -->
<!-- .nuget\ -->
<!-- Directory.Build.props (this file) -->
<!-- SomeProjectFolderA\ -->
<!-- NuGet.config -->
<!-- SomeProjectA.sln -->
<!-- ... -->
<!-- SomeProjectFolderB\ -->
<!-- ... -->
<!-- EnlistmentRoot.marker -->
<!-- ServiceBar\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- ... -->
<!-- -->
<!-- The Bin folder contains ALL build output. -->
<!-- The Obj folder contains all intermediate build files (like the obj folder). -->
<!-- The Packages folder contains ALL packages downloaded by NuGet. -->
<!-- The above folders contain NOTHING that is checked in (they are not checked in themselves). -->
<!-- The Src folder contains EVERHYTHNG that is checked in and ALL that is checked in. -->
<!-- No build output or temp files should end up in the Src folder! (barring a few *small* VS temporaries) -->
<!-- -->
<!-- Src MUST contain the EnlistmentRoot.marker file which marks the EnlistmentRoot. -->
<!-- Src also contains the NuGet.config file which ensures that NuGet uses the NuGet.Packages folder. -->
<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'EnlistmentRoot.marker'))</EnlistmentRoot>
<SourceRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'SourceRoot.marker'))</SourceRoot>
<KeysRoot>$(EnlistmentRoot)\.keys</KeysRoot>
<PropsRoot>$(EnlistmentRoot)\.props</PropsRoot>
<RulesetsRoot>$(EnlistmentRoot)\.rulesets</RulesetsRoot>
<TargetsRoot>$(EnlistmentRoot)\.targets</TargetsRoot>
<PublicApiRoot>$(EnlistmentRoot)\.publicApi</PublicApiRoot>
<BinRoot>$(EnlistmentRoot)\..\bin</BinRoot>
<BinRoot>$([System.IO.Path]::GetFullPath( $(BinRoot) ))</BinRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(SourceRoot.Length)))</RelativeOutputPathBase>
<!-- Unit Test projects should be in a separate obj directory to exclude them from SDL scans -->
<BaseIntermediateOutputPath>$(EnlistmentRoot)\..\obj\src\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="$(MSBuildProjectName.Contains('.Tests'))">$(EnlistmentRoot)\..\obj\tests\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(BaseIntermediateOutputPath) ))</BaseIntermediateOutputPath>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<OutputPath>$(BinRoot)\$(Configuration)\$(RelativeOutputPathBase)</OutputPath>
<OutputPath>$([System.IO.Path]::GetFullPath( $(OutputPath) ))\</OutputPath>
<!-- Collect all NuGet packages in the same folder for convenience during testing -->
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)\$(RelativeOutputPathBase)</IntermediateOutputPath>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath( $(IntermediateOutputPath) ))\</IntermediateOutputPath>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>
<PackagesDir>$(EnlistmentRoot)\..\packages</PackagesDir>
<PackagesDir>$([System.IO.Path]::GetFullPath( $(PackagesDir) ))</PackagesDir>
<MyGetPackageSource>https://www.myget.org/F/applicationinsights/api/v2</MyGetPackageSource>
<PowerShellExe Condition=" '$(PowerShellExe)'=='' ">%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellExe>
<NugetVersionFilePath>$(MSBuildThisFileDirectory).nugetVersion</NugetVersionFilePath>
<BuildNugetVersion Condition="Exists($(NugetVersionFilePath))">$([System.IO.File]::ReadAllText($(NugetVersionFilePath)))</BuildNugetVersion>
<!-- Forces EventRegister target to generate ETW manifest file -->
<EtwManifestForceAll>true</EtwManifestForceAll>
<EtwManifestOutDir>$(BinRoot)\$(Configuration)\ETW\</EtwManifestOutDir>
</PropertyGroup>
<PropertyGroup>
<!-- Enable NuGet package restore during build -->
<RestorePackages>true</RestorePackages>
<RequireRestoreConsent>false</RequireRestoreConsent>
<!-- Set the root namespace for all assemblies in this project hierarchy -->
<RootNamespace>Microsoft.ApplicationInsights</RootNamespace>
</PropertyGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<!-- Generate AssemblyFileVersion and AssemblyVersion attributes. -->
<PropertyGroup>
<!-- Turn on dynamic assembly attribute generation -->
<AssemblyAttributesPath>$(IntermediateOutputPath)\AssemblyInfo.g.cs</AssemblyAttributesPath>
<GenerateAdditionalSources>true</GenerateAdditionalSources>
<!-- The common project structure looks like this: -->
<!-- d:\DDGit\ -->
<!-- ServiceFoo\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- .git\ -->
<!-- .nuget\ -->
<!-- Directory.Build.props (this file) -->
<!-- SomeProjectFolderA\ -->
<!-- NuGet.config -->
<!-- SomeProjectA.sln -->
<!-- ... -->
<!-- SomeProjectFolderB\ -->
<!-- ... -->
<!-- EnlistmentRoot.marker -->
<!-- ServiceBar\ -->
<!-- Bin\ -->
<!-- Obj\ -->
<!-- Packages\ -->
<!-- Src\ -->
<!-- ... -->
<!-- -->
<!-- The Bin folder contains ALL build output. -->
<!-- The Obj folder contains all intermediate build files (like the obj folder). -->
<!-- The Packages folder contains ALL packages downloaded by NuGet. -->
<!-- The above folders contain NOTHING that is checked in (they are not checked in themselves). -->
<!-- The Src folder contains EVERHYTHNG that is checked in and ALL that is checked in. -->
<!-- No build output or temp files should end up in the Src folder! (barring a few *small* VS temporaries) -->
<!-- -->
<!-- Src MUST contain the EnlistmentRoot.marker file which marks the EnlistmentRoot. -->
<!-- Src also contains the NuGet.config file which ensures that NuGet uses the NuGet.Packages folder. -->
<SourceRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'SourceRoot.marker'))</SourceRoot>
<RelativeOutputPathBase>$(MSBuildProjectDirectory.Substring($(SourceRoot.Length)))</RelativeOutputPathBase>
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(EnlistmentRoot)\</SolutionDir>
<MyGetPackageSource>https://www.myget.org/F/applicationinsights/api/v2</MyGetPackageSource>
<PowerShellExe Condition=" '$(PowerShellExe)'=='' ">%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellExe>
<NugetVersionFilePath>$(MSBuildThisFileDirectory).nugetVersion</NugetVersionFilePath>
<BuildNugetVersion Condition="Exists($(NugetVersionFilePath))">$([System.IO.File]::ReadAllText($(NugetVersionFilePath)))</BuildNugetVersion>
<!-- Forces EventRegister target to generate ETW manifest file -->
<EtwManifestForceAll Condition="$(OS) == 'Windows_NT'">true</EtwManifestForceAll>
<EtwManifestOutDir>$(BinRoot)\$(Configuration)\ETW\$(TargetFramework)\</EtwManifestOutDir>
</PropertyGroup>
<PropertyGroup>
<!-- Set the root namespace for all assemblies in this project hierarchy -->
<RootNamespace>Microsoft.ApplicationInsights</RootNamespace>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="NetCore-common-properties">
<!-- TODO: I THINK THESE GENERATEASSEMBLY STATEMENTS CAN BE REMOVED-->
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,18 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Test.props'))\Test.props" />
<Import Project="$(PropsRoot)\Test.props" />
<PropertyGroup Label="NetCore-common-properties">
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<AssemblyName>Microsoft.ApplicationInsights.DependencyCollector.NetCore.Tests</AssemblyName>
<AssemblyName>Microsoft.ApplicationInsights.DependencyCollector.Tests</AssemblyName>
<PackageId>Microsoft.AI.DependencyCollector.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
@ -31,9 +22,7 @@
<PackageReference Include="Microsoft.TestPlatform.TestHost" Version="16.2.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
@ -41,20 +30,16 @@
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1' OR '$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
<PackageReference Include="System.Diagnostics.StackTrace" Version="4.3.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.7.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<PackageReference Include="System.Buffers" Version="4.5.1" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Data" />
@ -68,7 +53,6 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

Просмотреть файл

@ -6,6 +6,7 @@ namespace Microsoft.ApplicationInsights.Tests
using System.Data;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.Linq;
@ -23,14 +24,15 @@ namespace Microsoft.ApplicationInsights.Tests
using Microsoft.ApplicationInsights.Web.TestFramework;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Disposing TelemetryConfiguration after each test.")]
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Disposing TelemetryConfiguration after each test.")]
[TestClass]
public sealed class ProfilerSqlProcessingTest
{
private const string DatabaseServer = "ourdatabase.database.windows.net";
private const string DataBaseName = "mydatabase";
private const string MyStoredProcName = "apm.MyFavouriteStoredProcedure";
[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification = "Fake password used for testing.")]
private static readonly string ConnectionString = string.Format(CultureInfo.InvariantCulture, "Server={0};DataBase={1};User=myusername;Password=supersecret", DatabaseServer, DataBaseName);
private static readonly string ExpectedResourceName = DatabaseServer + " | " + DataBaseName + " | " + MyStoredProcName;
private static readonly string ExpectedData = MyStoredProcName;

Просмотреть файл

@ -1,6 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Product.props" />
<Import Project="$(PropsRoot)\Product.props" />
<PropertyGroup>

Просмотреть файл

@ -41,7 +41,7 @@
private ProfilerHttpProcessing httpProcessing;
#endif
private TelemetryConfiguration telemetryConfiguration;
private bool isInitialized = false;
private bool disposed = false;
/// <summary>
@ -101,6 +101,9 @@
[Obsolete("This field has been deprecated. Please set TelemetryConfiguration.Active.ApplicationIdProvider = new ApplicationInsightsApplicationIdProvider() and customize ApplicationInsightsApplicationIdProvider.ProfileQueryEndpoint.")]
public string ProfileQueryEndpoint { get; set; }
/// <summary>Gets a value indicating whether this module has been initialized.</summary>
internal bool IsInitialized { get; private set; } = false;
/// <summary>
/// IDisposable implementation.
/// </summary>
@ -119,11 +122,11 @@
// Temporary fix to make sure that we initialize module once.
// It should be removed when configuration reading logic is moved to Web SDK.
if (!this.isInitialized)
if (!this.IsInitialized)
{
lock (this.lockObject)
{
if (!this.isInitialized)
if (!this.IsInitialized)
{
try
{
@ -175,7 +178,7 @@
PrepareFirstActivity();
this.isInitialized = true;
this.IsInitialized = true;
}
}
}

Просмотреть файл

@ -99,7 +99,7 @@ namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
this.injectLegacyHeaders = injectLegacyHeaders;
this.httpInstrumentationVersion = instrumentationVersion != HttpInstrumentationVersion.Unknown ?
instrumentationVersion :
this.GetInstrumentationVersion();
GetInstrumentationVersion();
this.injectRequestIdInW3CMode = injectRequestIdInW3CMode;
this.subscriber = new HttpCoreDiagnosticSourceSubscriber(
this,
@ -493,6 +493,45 @@ namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
}
}
private static HttpInstrumentationVersion GetInstrumentationVersion()
{
HttpInstrumentationVersion version = HttpInstrumentationVersion.Unknown;
var httpClientAssembly = typeof(HttpClient).GetTypeInfo().Assembly;
var httpClientVersion = httpClientAssembly.GetName().Version;
string httpClientInformationalVersion =
httpClientAssembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ??
string.Empty;
if (httpClientInformationalVersion.StartsWith("3.", StringComparison.Ordinal))
{
version = HttpInstrumentationVersion.V3;
}
else if (httpClientVersion.Major == 4 && httpClientVersion.Minor == 2)
{
// .NET Core 3.0 has the same version of http client lib as 2.*
// but AssemblyInformationalVersionAttribute is different.
version = HttpInstrumentationVersion.V2;
}
else if (httpClientVersion.Major == 4 && httpClientVersion.Minor < 2)
{
version = HttpInstrumentationVersion.V1;
}
else
{
// fallback to V3 assuming unknown SDKs are from future versions
version = HttpInstrumentationVersion.V3;
}
DependencyCollectorEventSource.Log.HttpCoreDiagnosticListenerInstrumentationVersion(
(int)version,
httpClientVersion.Major,
httpClientVersion.Minor,
httpClientInformationalVersion);
return version;
}
private void InjectRequestHeaders(HttpRequestMessage request, string instrumentationKey)
{
try
@ -637,45 +676,6 @@ namespace Microsoft.ApplicationInsights.DependencyCollector.Implementation
}
}
private HttpInstrumentationVersion GetInstrumentationVersion()
{
HttpInstrumentationVersion version = HttpInstrumentationVersion.Unknown;
var httpClientAssembly = typeof(HttpClient).GetTypeInfo().Assembly;
var httpClientVersion = httpClientAssembly.GetName().Version;
string httpClientInformationalVersion =
httpClientAssembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ??
string.Empty;
if (httpClientInformationalVersion.StartsWith("3.", StringComparison.Ordinal))
{
version = HttpInstrumentationVersion.V3;
}
else if (httpClientVersion.Major == 4 && httpClientVersion.Minor == 2)
{
// .NET Core 3.0 has the same version of http client lib as 2.*
// but AssemblyInformationalVersionAttribute is different.
version = HttpInstrumentationVersion.V2;
}
else if (httpClientVersion.Major == 4 && httpClientVersion.Minor < 2)
{
version = HttpInstrumentationVersion.V1;
}
else
{
// fallback to V3 assuming unknown SDKs are from future versions
version = HttpInstrumentationVersion.V3;
}
DependencyCollectorEventSource.Log.HttpCoreDiagnosticListenerInstrumentationVersion(
(int)version,
httpClientVersion.Major,
httpClientVersion.Minor,
httpClientInformationalVersion);
return version;
}
/// <summary>
/// Diagnostic listener implementation that listens for events specific to outgoing dependency requests.
/// </summary>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше