Skip to content

Commit

Permalink
merge develop to master for 2.5.0-beta2 (#668)
Browse files Browse the repository at this point in the history
* apply patches from source build

* remove legacy file

* Fix null check to use string.IsNullOrEmpty. Even though unlikely, if a string.empty is passed as input it will result in an infinite loop.

* increase the version to 2.5.0-beta2

* The issue with compareNetObject got resolved

* Update Microsoft.ApplicationInsights.netcoreapp11.Tests.csproj

* GH items updated

* dirs.proj to do solution restore.

* Remove sampling score on telemetry items related to Context.User.Id

Issue #625

* Update Changelog

* Add link to CHANGELOG regarding issue

* Update PULL_REQUEST_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* Test implementation for Linux vs Windows

* ApplicationFolderProvider modified to work better in non-windows.
API Surface updated.

* Minor renaming, build fixes.

* UnitTest fix and addition of new tests

* Error messages updated

* Enable building on mac

* disabled non-netstandard targets

* clean up projects

* clean up projects

* fix it back

* sln from dirs

* test task

* renamings

* Smaller changes and updating GH templates

* remove public api changes. code change to follow this.

* PR suggestion incorporated - removed flg to override storage behaviour

* Minor

* Correctmessage

* Documentation

* better error messages.

* readyonly IIdentityProvider

* update changelog

* changelog details

* Revert references to MetricManager.
Not ready for public use.

* Proposed fix for issue microsoft/ApplicationInsights-dotnet-server#756.

-Add an internal constructor to `SamplingTelemetryProcessor` that gives it a next processor for sampled, and a next processor for unsampled items.
- In the `AdaptiveSamplingTelemetryProcessor`, give the `SamplingPercentageEstimatorTelemetryProcessor` as well as the actual next `ITelemetryProcessor` in the pipeline to the `SamplingTelemetryProcessor`'s internal constructor.
- Add property `SamplingTelemetryProcessor.UnsampledNext` to send to the next `ITelemetryProcessor` in the pipeline, bypassing the estimator which usually comes immediately next in the chain.
- Enhance constructor for `SamplingTelemetryProcessor` to set the `Next` and `UnsampledNext` fields based on which constructor was called. (`UnsampledNext` == `Next` when calling the public constructor only).
- `SamplingTelemetryProcessor.Process(ITelemetry item)` updated to call the appropriate `Next`/`UnsampledNext` property.
- Remove an unused using.
- Update CHANGELOG.md with the fix info

* PR Suggestions and further fix

- Renamed Next to SampledNext
- Unnecessary constructor logic removed
- Comments fixed up (remove unnecessary commenting)
- Early exit from processing removed when SampledNext != UnsampledNext, leaving original intent intact

* Add a few tests to ensure assumptions during AdaptiveSampling are maintained

- Ensure Process sends telemetry items to the correct '...Next' method while being passed through the SamplingTelemetryProcessor

- Ensure past behaviour on the standalone (not part of Adaptive sampling chain) SamplingTelemetryProcessor is maintained

* Initial PR for HealthHeartbeat (#636)

Add Heartbeat feature to Application Insights SDK

- [x] Changes in public surface reviewed
- [x] Design discussion issue #628  
- [x] CHANGELOG.md updated

- Add all unit tests necessary to comform to the current stated feature spec
- Add API updates to the Unshipped txt file
- Add remark (still with TODO as I have yet to implement) about all default payload members
- Changes in design from polling providers that will extend heartbeat payloads to expecting consumers of the SDK to 'push' state changes as necessary.
- Add/Set methods to handle field collision management
- Expose new property 'IsHeartbeatEnabled' to turn on/off heartbeats
- Changelog updated for beta2
- create HeartbeatProvider with DiagnosticsTelemetryProvider to enable simpler initialization / logic requirements
- Increase default heartbeat interval to 15 minutes
- Documentation on how to extend Heartbeat properties

* Update Changelog, prep for 2.5.0-beta2 (#664)
  • Loading branch information
TimothyMothra authored Dec 4, 2017
1 parent 34d07ab commit 81276cc
Show file tree
Hide file tree
Showing 279 changed files with 3,236 additions and 416 deletions.
15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,18 @@

If you're interested in contributing, take a look at the general [contributer's guide](https://github.com/Microsoft/ApplicationInsights-Home/blob/master/CONTRIBUTING.md) first.

## Build and Unit Test

To successfully build the sources on your machine, make sure you've installed the following prerequisites:
* Visual Studio 2017 Community or Enterprise
* .NET 4.6

Once you've installed the prerequisites execute either ```buildDebug.cmd``` or ```buildRelease.cmd``` script in the repository root to build the project locally..
```buildRelease.cmd``` also runs StlyeCop checks, and is required before merging any pull requests.

You can also open the solutions in Visual Studio and build directly from there.
The following solution contains the product code and unit tests
"\Microsoft.ApplicationInsights.sln"


Once built, all unit tests can be run from Visual Studio itself.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
If you are reporting bug/issue, please provide detailed Repro instructions.

## Repro Steps
1.
2.

## Actual Behavior


## Expected Behavior


## Version Info
SDK Version :
.NET Version :
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) :
OS :
Hosting Info (IIS/Azure WebApps/ etc) :
7 changes: 5 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Fix # .
Fix Issue # .
<Short description of the fix.>

- [ ] I ran [Unit Tests](https://github.com/Microsoft/ApplicationInsights-dotnet/blob/develop/.github/CONTRIBUTING.md) locally.

For significant contributions please make sure you have completed the following items:

- [ ] Design discussion issue #
- [ ] Changes in public surface reviewed
- [ ] CHANGELOG.md updated
- [ ] CHANGELOG.md updated with one line description of the fix, and a link to the original issue.
- [ ] The PR will trigger build, unit test, and functional tests automatically. If your PR was submitted from fork - mention one of committers to initiate the build for you.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,7 @@ $RECYCLE.BIN/
Web/PerformanceTests_Instrumented/
[Ss]tyle[Cc]op.*

coverage.xml
coverage.xml

bondcodegen.done
bonddefaultcodegen.in
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Test/Microsoft.ApplicationInsights.Test/netcoreapp11/bin/Debug/netcoreapp1.1/Microsoft.ApplicationInsights.netcoreapp11.Tests.dll",
"args": [],
"cwd": "${workspaceFolder}/Test/Microsoft.ApplicationInsights.Test/netcoreapp11",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "msbuild",
"args": [
"${workspaceRoot}/Microsoft.ApplicationInsights.sln",
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build"
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "always"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test",
"type": "shell",
"command": "dotnet",
"args": [
"test",
"Test/ServerTelemetryChannel.Test/NetCore.Tests/TelemetryChannel.NetCore.Tests.csproj;Test/Microsoft.ApplicationInsights.Test/netcoreapp11/Microsoft.ApplicationInsights.netcoreapp11.Tests.csproj"
],
"group": "test",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "always"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
//dotnet test Test/ServerTelemetryChannel.Test/NetCore.Tests/TelemetryChannel.NetCore.Tests.csproj
}
]
}
2 changes: 1 addition & 1 deletion AddXmlLanguage.targets
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</Task>
</UsingTask>

<Target Name="FixXmlDocumentation" AfterTargets="AfterBuild" DependsOnTargets="AfterBuild">
<Target Name="FixXmlDocumentation" AfterTargets="AfterBuild" DependsOnTargets="AfterBuild" Condition="$(OS) == 'Windows_NT'">
<InjectXmlLanguage InputFiles="$(DocumentationFile)" />
</Target>
</Project>
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

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/).

## Version 2.5.0-beta2
- Remove calculation of sampling-score based on Context.User.Id [Issue #625](https://github.com/Microsoft/ApplicationInsights-dotnet/issues/625)
- New sdk-driven "heartbeat" functionality added which sends health status at pre-configured intervals. See [extending heartbeat properties doc for more information](./docs/ExtendingHeartbeatProperties.md)
- Fixes a bug in ServerTelemetryChannel which caused application to crash on non-windows platforms.
[Details on fix and workaround #654] (https://github.com/Microsoft/ApplicationInsights-dotnet/issues/654)
Original issue (https://github.com/Microsoft/ApplicationInsights-aspnetcore/issues/551)
- [Fixed a bug with the `AdaptiveSamplingTelemetryProcessor` that would cause starvation over time. Issue #756 (dotnet-server)](https://github.com/Microsoft/ApplicationInsights-dotnet-server/issues/756)
- Updated solution to build on Mac!

## Version 2.5.0-beta1
- Method `Sanitize` on classes implementing `ITelemetry` no longer modifies the `TelemetryContext` fields. Serialized event json and ETW event will still have context tags sanitized.
- Application Insights SDK supports multiple telemetry sinks. You can configure more than one channel for telemetry now.
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<PackagesDir>$([System.IO.Path]::GetFullPath( $(PackagesDir) ))</PackagesDir>

<!-- Forces EventRegister target to generate ETW manifest file -->
<EtwManifestForceAll>true</EtwManifestForceAll>
<EtwManifestForceAll Condition="$(OS) == 'Windows_NT'">true</EtwManifestForceAll>
<EtwManifestOutDir>$(BinRoot)\$(Configuration)\ETW\$(TargetFramework)\</EtwManifestOutDir>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion GlobalStaticVersion.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<SemanticVersionMajor>2</SemanticVersionMajor>
<SemanticVersionMinor>5</SemanticVersionMinor>
<SemanticVersionPatch>0</SemanticVersionPatch>
<PreReleaseMilestone>beta1</PreReleaseMilestone>
<PreReleaseMilestone>beta2</PreReleaseMilestone>
<!--
Date when Semantic Version was changed.
Update for every public release.
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.ApplicationInsights.sln
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Shared.Tests", "Test\Server
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelemetryChannel.Nuget.Tests", "Test\ServerTelemetryChannel.Test\TelemetryChannel.Nuget.Tests\TelemetryChannel.Nuget.Tests.csproj", "{21CB9A8A-F25B-4DEB-92CB-ACB6920EB8BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ApplicationInsights", "src\Microsoft.ApplicationInsights\Managed\Microsoft.ApplicationInsights.csproj", "{E9ECEE96-DD50-42F6-9F33-0978CDFA15ED}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ApplicationInsights", "src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj", "{E9ECEE96-DD50-42F6-9F33-0978CDFA15ED}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ApplicationInsights.Isolated.Tests", "Test\Microsoft.ApplicationInsights.Test\Standalone\Microsoft.ApplicationInsights.Isolated.Tests.csproj", "{2759BC71-7F47-44DA-8579-AE2D8C8C684D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelemetryChannel", "src\ServerTelemetryChannel\Managed\TelemetryChannel.csproj", "{3273D899-D9B3-44FE-B3AB-578E18B2EF90}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelemetryChannel", "src\ServerTelemetryChannel\TelemetryChannel.csproj", "{3273D899-D9B3-44FE-B3AB-578E18B2EF90}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ApplicationInsights.netcoreapp11.Tests", "Test\Microsoft.ApplicationInsights.Test\netcoreapp11\Microsoft.ApplicationInsights.netcoreapp11.Tests.csproj", "{178F87BF-CCCA-48DE-B171-4482E8CBD060}"
EndProject
Expand Down
14 changes: 1 addition & 13 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,8 @@
<configuration>
<!-- This file belongs into the EnlistmentRoot folder next to EnlistmentRoot.marker. -->
<!-- See the comments in Directory.Build.props for explanations. -->
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<config>
<add key="repositoryPath" value="..\packages" />
</config>
<activePackageSource>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</activePackageSource>
<packageSources>
<clear/>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
</configuration>
78 changes: 0 additions & 78 deletions Package.targets

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.AddHealthProperty(string propertyName, string propertyValue, bool isHealthy) -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.ExcludedHeartbeatProperties.get -> System.Collections.Generic.IList<string>
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.HeartbeatInterval.get -> System.TimeSpan
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.HeartbeatInterval.set -> void
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.IsHeartbeatEnabled.get -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.IsHeartbeatEnabled.set -> void
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.SetHealthProperty(string propertyName, string propertyValue = null, bool? isHealthy = null) -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.AddHealthProperty(string propertyName, string propertyValue, bool isHealthy) -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.ExcludedHeartbeatProperties.get -> System.Collections.Generic.IList<string>
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.HeartbeatInterval.get -> System.TimeSpan
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.HeartbeatInterval.set -> void
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.IsHeartbeatEnabled.get -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.IsHeartbeatEnabled.set -> void
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.SetHealthProperty(string propertyName, string propertyValue = null, bool? isHealthy = null) -> bool
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.AddHealthProperty(string propertyName, string propertyValue, bool isHealthy) -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.ExcludedHeartbeatProperties.get -> System.Collections.Generic.IList<string>
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.HeartbeatInterval.get -> System.TimeSpan
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.HeartbeatInterval.set -> void
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.IsHeartbeatEnabled.get -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.IsHeartbeatEnabled.set -> void
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule.SetHealthProperty(string propertyName, string propertyValue = null, bool? isHealthy = null) -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.AddHealthProperty(string propertyName, string propertyValue, bool isHealthy) -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.ExcludedHeartbeatProperties.get -> System.Collections.Generic.IList<string>
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.HeartbeatInterval.get -> System.TimeSpan
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.HeartbeatInterval.set -> void
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.IsHeartbeatEnabled.get -> bool
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.IsHeartbeatEnabled.set -> void
Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager.SetHealthProperty(string propertyName, string propertyValue = null, bool? isHealthy = null) -> bool
Loading

0 comments on commit 81276cc

Please sign in to comment.