Skip to content

Commit 34d07ab

Browse files
author
MS-TimothyMothra
authored
Merge pull request #634 from Microsoft/develop
merge develop to master (prep 2.5.0 beta1)
2 parents 9d8df42 + b727a67 commit 34d07ab

File tree

555 files changed

+16671
-11097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

555 files changed

+16671
-11097
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,6 @@ $RECYCLE.BIN/
165165
*.wrn
166166
*.vsix
167167
Web/PerformanceTests_Instrumented/
168-
StyleCop.Cache
168+
[Ss]tyle[Cc]op.*
169+
170+
coverage.xml

ApplicationInsightsSDKRules.ruleset

Lines changed: 173 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RuleSet Name="ApplicationInsights SDK Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects. These include a combination of Microsoft Managed Recommended Rules and DevDivRuleSet for Microbuild." ToolsVersion="14.0">
2+
<RuleSet Name="ApplicationInsights SDK Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects. These include a combination of Microsoft Managed Recommended Rules and DevDivRuleSet for Microbuild." ToolsVersion="15.0">
33
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
44
<Name Resource="ApplicationInsightsSDKRules_Name" />
55
<Description Resource="ApplicationInsightsSDKRules_Description" />
@@ -449,4 +449,176 @@
449449
<Rule Id="C6995" Action="Warning" />
450450
<Rule Id="C6997" Action="Warning" />
451451
</Rules>
452+
<Rules AnalyzerId="PublicApiAnalyzer" RuleNamespace="PublicApiAnalyzer">
453+
<Rule Id="RS0016" Action="Error" />
454+
<Rule Id="RS0017" Action="Error" />
455+
<Rule Id="RS0022" Action="Error" />
456+
<Rule Id="RS0024" Action="Error" />
457+
<Rule Id="RS0025" Action="Error" />
458+
</Rules>
459+
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
460+
<Rule Id="SA1000" Action="Error" />
461+
<Rule Id="SA1001" Action="Error" />
462+
<Rule Id="SA1002" Action="Error" />
463+
<Rule Id="SA1003" Action="Error" />
464+
<Rule Id="SA1004" Action="Error" />
465+
<Rule Id="SA1005" Action="Error" />
466+
<Rule Id="SA1006" Action="Error" />
467+
<Rule Id="SA1007" Action="Error" />
468+
<Rule Id="SA1008" Action="Error" />
469+
<Rule Id="SA1009" Action="Error" />
470+
<Rule Id="SA1010" Action="Error" />
471+
<Rule Id="SA1011" Action="Error" />
472+
<Rule Id="SA1012" Action="Error" />
473+
<Rule Id="SA1013" Action="Error" />
474+
<Rule Id="SA1014" Action="Error" />
475+
<Rule Id="SA1015" Action="Error" />
476+
<Rule Id="SA1016" Action="Error" />
477+
<Rule Id="SA1017" Action="Error" />
478+
<Rule Id="SA1018" Action="Error" />
479+
<Rule Id="SA1019" Action="Error" />
480+
<Rule Id="SA1020" Action="Error" />
481+
<Rule Id="SA1021" Action="Error" />
482+
<Rule Id="SA1022" Action="Error" />
483+
<Rule Id="SA1023" Action="Error" />
484+
<Rule Id="SA1024" Action="Error" />
485+
<Rule Id="SA1025" Action="Error" />
486+
<Rule Id="SA1026" Action="Error" />
487+
<Rule Id="SA1027" Action="Error" />
488+
<Rule Id="SA1028" Action="None" />
489+
<Rule Id="SA1100" Action="Error" />
490+
<Rule Id="SA1101" Action="Error" />
491+
<Rule Id="SA1102" Action="Error" />
492+
<Rule Id="SA1103" Action="Error" />
493+
<Rule Id="SA1104" Action="Error" />
494+
<Rule Id="SA1105" Action="Error" />
495+
<Rule Id="SA1106" Action="Error" />
496+
<Rule Id="SA1107" Action="Error" />
497+
<Rule Id="SA1108" Action="Error" />
498+
<Rule Id="SA1110" Action="Error" />
499+
<Rule Id="SA1111" Action="Error" />
500+
<Rule Id="SA1112" Action="Error" />
501+
<Rule Id="SA1113" Action="None" />
502+
<Rule Id="SA1114" Action="None" />
503+
<Rule Id="SA1115" Action="Error" />
504+
<Rule Id="SA1116" Action="None" />
505+
<Rule Id="SA1117" Action="None" />
506+
<Rule Id="SA1118" Action="None" />
507+
<Rule Id="SA1119" Action="Error" />
508+
<Rule Id="SA1120" Action="Error" />
509+
<Rule Id="SA1121" Action="None" />
510+
<Rule Id="SA1122" Action="Error" />
511+
<Rule Id="SA1123" Action="Error" />
512+
<Rule Id="SA1124" Action="None" />
513+
<Rule Id="SA1125" Action="Error" />
514+
<Rule Id="SA1127" Action="None" />
515+
<Rule Id="SA1128" Action="None" />
516+
<Rule Id="SA1129" Action="None" />
517+
<Rule Id="SA1130" Action="Error" />
518+
<Rule Id="SA1131" Action="None" />
519+
<Rule Id="SA1132" Action="None" />
520+
<Rule Id="SA1133" Action="Error" />
521+
<Rule Id="SA1134" Action="None" />
522+
<Rule Id="SA1200" Action="Error" />
523+
<Rule Id="SA1201" Action="Error" />
524+
<Rule Id="SA1202" Action="Error" />
525+
<Rule Id="SA1203" Action="Error" />
526+
<Rule Id="SA1204" Action="Error" />
527+
<Rule Id="SA1205" Action="Error" />
528+
<Rule Id="SA1206" Action="Error" />
529+
<Rule Id="SA1207" Action="Error" />
530+
<Rule Id="SA1208" Action="Error" />
531+
<Rule Id="SA1209" Action="Error" />
532+
<Rule Id="SA1210" Action="Error" />
533+
<Rule Id="SA1211" Action="Error" />
534+
<Rule Id="SA1212" Action="Error" />
535+
<Rule Id="SA1213" Action="Error" />
536+
<Rule Id="SA1214" Action="Error" />
537+
<Rule Id="SA1216" Action="Error" />
538+
<Rule Id="SA1217" Action="Error" />
539+
<Rule Id="SA1300" Action="Error" />
540+
<Rule Id="SA1302" Action="Error" />
541+
<Rule Id="SA1303" Action="Error" />
542+
<Rule Id="SA1304" Action="Error" />
543+
<Rule Id="SA1306" Action="Error" />
544+
<Rule Id="SA1307" Action="Error" />
545+
<Rule Id="SA1308" Action="Error" />
546+
<Rule Id="SA1309" Action="Error" />
547+
<Rule Id="SA1310" Action="Error" />
548+
<Rule Id="SA1311" Action="Error" />
549+
<Rule Id="SA1312" Action="Error" />
550+
<Rule Id="SA1313" Action="Error" />
551+
<Rule Id="SA1400" Action="Error" />
552+
<Rule Id="SA1401" Action="None" />
553+
<Rule Id="SA1402" Action="Error" />
554+
<Rule Id="SA1403" Action="Error" />
555+
<Rule Id="SA1404" Action="Error" />
556+
<Rule Id="SA1405" Action="Error" />
557+
<Rule Id="SA1406" Action="Error" />
558+
<Rule Id="SA1407" Action="Error" />
559+
<Rule Id="SA1408" Action="Error" />
560+
<Rule Id="SA1410" Action="Error" />
561+
<Rule Id="SA1411" Action="Error" />
562+
<Rule Id="SA1500" Action="Error" />
563+
<Rule Id="SA1501" Action="Error" />
564+
<Rule Id="SA1502" Action="Error" />
565+
<Rule Id="SA1503" Action="Error" />
566+
<Rule Id="SA1504" Action="Error" />
567+
<Rule Id="SA1505" Action="Error" />
568+
<Rule Id="SA1506" Action="Error" />
569+
<Rule Id="SA1507" Action="Error" />
570+
<Rule Id="SA1508" Action="Error" />
571+
<Rule Id="SA1509" Action="Error" />
572+
<Rule Id="SA1510" Action="Error" />
573+
<Rule Id="SA1511" Action="Error" />
574+
<Rule Id="SA1512" Action="None" />
575+
<Rule Id="SA1513" Action="Error" />
576+
<Rule Id="SA1514" Action="Error" />
577+
<Rule Id="SA1515" Action="None" />
578+
<Rule Id="SA1516" Action="Error" />
579+
<Rule Id="SA1517" Action="Error" />
580+
<Rule Id="SA1518" Action="Error" />
581+
<Rule Id="SA1519" Action="Error" />
582+
<Rule Id="SA1520" Action="Error" />
583+
<Rule Id="SA1600" Action="None" />
584+
<Rule Id="SA1601" Action="Error" />
585+
<Rule Id="SA1602" Action="Error" />
586+
<Rule Id="SA1604" Action="Error" />
587+
<Rule Id="SA1605" Action="Error" />
588+
<Rule Id="SA1606" Action="Error" />
589+
<Rule Id="SA1607" Action="Error" />
590+
<Rule Id="SA1608" Action="Error" />
591+
<Rule Id="SA1610" Action="Error" />
592+
<Rule Id="SA1611" Action="None" />
593+
<Rule Id="SA1612" Action="Error" />
594+
<Rule Id="SA1613" Action="Error" />
595+
<Rule Id="SA1614" Action="Error" />
596+
<Rule Id="SA1615" Action="None" />
597+
<Rule Id="SA1616" Action="Error" />
598+
<Rule Id="SA1617" Action="Error" />
599+
<Rule Id="SA1618" Action="None" />
600+
<Rule Id="SA1619" Action="Error" />
601+
<Rule Id="SA1620" Action="Error" />
602+
<Rule Id="SA1621" Action="Error" />
603+
<Rule Id="SA1622" Action="Error" />
604+
<Rule Id="SA1623" Action="Error" />
605+
<Rule Id="SA1624" Action="Error" />
606+
<Rule Id="SA1625" Action="Error" />
607+
<Rule Id="SA1626" Action="Error" />
608+
<Rule Id="SA1627" Action="Error" />
609+
<Rule Id="SA1633" Action="None" />
610+
<Rule Id="SA1634" Action="Error" />
611+
<Rule Id="SA1635" Action="Error" />
612+
<Rule Id="SA1636" Action="None" />
613+
<Rule Id="SA1637" Action="Error" />
614+
<Rule Id="SA1638" Action="Error" />
615+
<Rule Id="SA1640" Action="Error" />
616+
<Rule Id="SA1641" Action="Error" />
617+
<Rule Id="SA1642" Action="None" />
618+
<Rule Id="SA1643" Action="Error" />
619+
<Rule Id="SA1648" Action="Error" />
620+
<Rule Id="SA1649" Action="Error" />
621+
<Rule Id="SA1651" Action="Error" />
622+
<Rule Id="SA1652" Action="Error" />
623+
</Rules>
452624
</RuleSet>

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
This changelog will be used to generate documentation on [release notes page](http://azure.microsoft.com/en-us/documentation/articles/app-insights-release-notes-dotnet/).
44

5+
## Version 2.5.0-beta1
6+
- Method `Sanitize` on classes implementing `ITelemetry` no longer modifies the `TelemetryContext` fields. Serialized event json and ETW event will still have context tags sanitized.
7+
- Application Insights SDK supports multiple telemetry sinks. You can configure more than one channel for telemetry now.
8+
- New method `DeepClone` on `ITelemetry` interface. Implemented by all supported telemetry items.
9+
- Server telemetry channel NuGet support a netstandard1.3 target with fixed rate sampling and adaptive sampling telemetry processors.
10+
- Instrumentation key is no longer required for TelemetryClient to send data to channel(s). This makes it easier to use the SDK with channels other than native Application Insights channels.
11+
- .NET 4.0 targets were removed. Please use the version 2.4.0 if you cannot upgrade your application to the latest framework version.
12+
- Removed `wp8`, `portable-win81+wpa81` and `uap10.0` targets.
13+
514
## Version 2.4.0
615
- Updated version of DiagnosticSource to 4.4.0 stable
716

CodeCov.ps1

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
#Run code coverage tests to generate report
2-
..\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user "-target:C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "-targetargs:..\bin\Release\Test\CoreSDK.Test\Net40\Microsoft.ApplicationInsights.Core.Net40.Tests.dll ..\bin\Release\Test\CoreSDK.Test\Net45\Microsoft.ApplicationInsights.Core.Net45.Tests.dll ..\bin\Release\Test\CoreSDK.Test\Net46\Microsoft.ApplicationInsights.Core.Net46.Tests.dll ..\bin\Release\Test\ServerTelemetryChannel.Test\TelemetryChannel.Nuget.Tests\TelemetryChannel.Nuget.Tests.dll ..\bin\Release\Test\ServerTelemetryChannel.Test\Net40.Tests\Microsoft.ApplicationInsights.TelemetryChannel.Net40.Tests.dll ..\bin\Release\Test\ServerTelemetryChannel.Test\Net45.Tests\Microsoft.ApplicationInsights.TelemetryChannel.Net45.Tests.dll /logger:trx" "-filter:+[Microsoft.ApplicationInsights*]* +[Microsoft.AI*]* -[*Tests]* -[*TestFramework*]*" -hideskipped:All -output:.\coverage.xml
2+
.\nuget.exe install "OpenCover" -Version "4.6.519"
3+
4+
$assemblies = get-childitem "..\bin\Release" -Filter *Tests.dll -Exclude *netcoreapp11.Tests.dll -recurse | foreach-object { $_.FullName }
5+
6+
foreach ($assembly in $assemblies)
7+
{
8+
Write-Host "==========================================="
9+
Write-Host "Running tests for $assembly"
10+
Write-Host "==========================================="
11+
..\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe `
12+
-register:user `
13+
"-target:${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" `
14+
"-targetargs:$assembly /logger:trx" `
15+
"-filter:+[Microsoft.ApplicationInsights*]* +[Microsoft.AI*]* -[*Tests]* -[*TestFramework*]*" `
16+
-hideskipped:All `
17+
-output:.\coverage.xml `
18+
-mergeoutput
19+
}
20+
21+
$netcoreassemblies = get-childitem "..\bin\Release" -Filter *netcoreapp11.Tests.dll -recurse | foreach-object { $_.FullName }
22+
23+
foreach ($assembly in $netcoreassemblies)
24+
{
25+
Write-Host "==========================================="
26+
Write-Host "Running tests for $assembly"
27+
Write-Host "==========================================="
28+
# Net Core tests should be run by a different version of vstest.console.exe
29+
..\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe `
30+
-register:user `
31+
"-target:${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" `
32+
"-targetargs:$assembly /logger:trx /Framework:FrameworkCore10" `
33+
"-filter:+[Microsoft.ApplicationInsights*]* +[Microsoft.AI*]* -[*Tests]* -[*TestFramework*]*" `
34+
-hideskipped:All `
35+
-output:.\coverage.xml `
36+
-mergeoutput
37+
}
338

439
#Download report uploader
540
(New-Object System.Net.WebClient).DownloadFile("https://codecov.io/bash", ".\CodecovUploader.sh")

Common.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
1818
</PropertyGroup>
1919

20+
<PropertyGroup>
21+
<CodeAnalysisRuleSet>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'ApplicationInsightsSDKRules.ruleset'))\ApplicationInsightsSDKRules.ruleset</CodeAnalysisRuleSet>
22+
</PropertyGroup>
23+
2024
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
2125
<DebugType>pdbonly</DebugType>
2226
<Optimize>true</Optimize>
23-
<CodeAnalysisRuleSet>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'ApplicationInsightsSDKRules.ruleset'))\ApplicationInsightsSDKRules.ruleset</CodeAnalysisRuleSet>
2427
<RunCodeAnalysis>true</RunCodeAnalysis>
2528
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
26-
<StyleCopEnabled>True</StyleCopEnabled>
27-
<StyleCopTreatErrorsAsWarnings>False</StyleCopTreatErrorsAsWarnings>
2829
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2930
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
3031
</PropertyGroup>

Directory.Build.props

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858

5959
<!-- Collect all NuGet packages in the same folder for convenience during testing -->
6060
<PackageOutputDir>$(BinRoot)\$(Configuration)\NuGet</PackageOutputDir>
61+
<PackageOutputPath>$(PackageOutputDir)</PackageOutputPath>
6162

6263
<AppxPackageDir>$(OutputPath)</AppxPackageDir>
6364

@@ -71,16 +72,13 @@
7172

7273
<!-- Forces EventRegister target to generate ETW manifest file -->
7374
<EtwManifestForceAll>true</EtwManifestForceAll>
74-
<EtwManifestOutDir>$(BinRoot)\$(Configuration)\ETW\</EtwManifestOutDir>
75+
<EtwManifestOutDir>$(BinRoot)\$(Configuration)\ETW\$(TargetFramework)\</EtwManifestOutDir>
7576
</PropertyGroup>
7677

7778
<PropertyGroup>
7879
<!-- Enable NuGet package restore during build -->
7980
<RestorePackages>true</RestorePackages>
8081
<RequireRestoreConsent>false</RequireRestoreConsent>
81-
82-
<!-- Disable StyleCop by default to prevent StyleCop.MSBuild package from slowing down the debug build -->
83-
<StyleCopEnabled>false</StyleCopEnabled>
8482
</PropertyGroup>
8583

8684
<!-- Generate AssemblyFileVersion and AssemblyVersion attributes. -->

GlobalStaticVersion.props

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
Update for every public release.
77
-->
88
<SemanticVersionMajor>2</SemanticVersionMajor>
9-
<SemanticVersionMinor>4</SemanticVersionMinor>
9+
<SemanticVersionMinor>5</SemanticVersionMinor>
1010
<SemanticVersionPatch>0</SemanticVersionPatch>
11-
<PreReleaseMilestone></PreReleaseMilestone>
11+
<PreReleaseMilestone>beta1</PreReleaseMilestone>
1212
<!--
1313
Date when Semantic Version was changed.
1414
Update for every public release.
@@ -17,8 +17,13 @@
1717
as it will restart file versions so 2.4.0-beta1 may have higher
1818
file version (like 2.4.0.2222) than 2.4.0-beta2 (like 2.4.0.1111)
1919
-->
20-
<SemanticVersionDate>2017-03-08</SemanticVersionDate>
20+
<SemanticVersionDate>2017-07-03</SemanticVersionDate>
2121

2222
<PreReleaseVersion Condition="'$(PreReleaseVersion)'==''">$([MSBuild]::Divide($([System.DateTime]::Now.Subtract($([System.DateTime]::Parse($(SemanticVersionDate)))).TotalMinutes), 5).ToString('F0'))</PreReleaseVersion>
2323
</PropertyGroup>
24+
25+
<PropertyGroup Condition="'$(PackageVersion)'==''">
26+
<PackageVersion>$(SemanticVersionMajor).$(SemanticVersionMinor).$(SemanticVersionPatch)-$(PreReleaseMilestone)</PackageVersion>
27+
<PackageVersion Condition="'$(StableRelease)' != 'True'">$(PackageVersion)-build$(PreReleaseVersion)</PackageVersion>
28+
</PropertyGroup>
2429
</Project>

0 commit comments

Comments
 (0)