Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServerTelemetryChannel for .Net Core Apps #654

Closed
cijothomas opened this issue Nov 20, 2017 · 0 comments
Closed

ServerTelemetryChannel for .Net Core Apps #654

cijothomas opened this issue Nov 20, 2017 · 0 comments

Comments

@cijothomas
Copy link
Contributor

cijothomas commented Nov 20, 2017

ServerTelemetryChannel was enabled for .NET Core Applications starting 2.5.0-beta1 (https://github.com/Microsoft/ApplicationInsights-dotnet/releases/tag/v2.5.0-beta1)
This enabled .NET Core apps to use full functionalities provided by ServerTelemetryChannel including persistent storage, retries, adaptive sampling etc.
However, for non-windows users, this release caused an issue. (microsoft/ApplicationInsights-aspnetcore#551)

ServerTelemetryChannel relied on windows specific mechanisms to determine (and secure) local storage folder where telemetry items are stored when it cannot be sent to Application Insights due to temporary network issues. A workaround is currently made (#655).
With the above fix in place, starting with beta2 following is the way for Non-Windows users to fully use persistent storage capabilities.

  1. Create a local storage folder manually, and specify this in ServerTelemetryChannel.StorageFolder. Please make sure that the process running your application has write access to this folder, but also make sure this folder is protected from other users to avoid telemetry being read by unintended users.
    Following code snippet in ConfigureServices() method in you Startup.cs class shows how to use channel with custom storage folder.
services.AddSingleton(typeof(ITelemetryChannel), new ServerTelemetryChannel () {StorageFolder = "/tmp/myfolder"});

If the above is not done, telemetry will still be collected and sent, but in case of network issues, items will get dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants