-
Notifications
You must be signed in to change notification settings - Fork 280
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
Telemetry loss on network/server errors in non-windows environment #1792
Comments
Some principles I could think of:
|
In general, I'm not a fan of adding new Environment Variables. |
IIS worker process runs under application pool identity which could either be service or user account. These accounts will not have access to the folder location |
This proposal is just adding ability to get No changes to permissions models in this proposal. Retain the current behavior as is.
This proposal makes 2b better, by allowing users to configure There is a request from the team in Azure which provisions Linux machines - they can create a folder with right permissions, and set an Environment variable pointing to this. And SDK picks it up automatically. This saves user the trouble of creating the folder, and configuring it via code. This issue is not addressing a permanent solution to the local storage issue. That needs a separate issue, with inputs from privacy team. |
Name of environment variable - lets align with
I don't think this is the reason SDK sets permissions. SDK runs under the mentioned identity and has permissions even to set permissions. So definitely has permissions to write.
Permissions are set to prevent information exposure when a host running different app pools. So app pools will not be able to access telemetry saved by another app. |
@SergeyKanzhelev we don't have the trademark on "AppInsights". all new Environment variables are using the "ApplicationInsights" name. |
@TimothyMothra sure, definitely go with ApplicationInsights than. I'm happy this was fixed =) |
Issue
ServerTelemetryChannel
channel retries sending telemetry if transient errors occur. This channel uses local disk storage to keep items on disk during network outages or high telemetry volumes. In Windows, either%LOCALAPPDATA%
or%TEMP%
is used if no custom path is specified explicitly. In environments other than Windows, custom folder location should be provided or telemetry won't be stored to local disk.Below trace information is logged to Application Insights, if storage location is not specified in non-windows environments like Linux or MacOS
In Windows, SDK creates a storage folder in
%LOCALAPPDATA%
or%TEMP%
and restricts access toCurrent User
andAdministrators
. Restricting permissions in non-windows environment won’t work as there are no .NET APIs available to change permissions in Linux or MacOS. SDK does not add permission when custom folder name is used, hence providing customer folder name is the only solution to use StorageFolder in Linux or MacOS environment. Providing custom storage location requires code change and not a viable option for production applications.Related Issue: #1067
Microsoft Doc: StorageFolder - Linux/MacOS
Proposal
Modify
ServerTelemetryChannel
to readStorageFolder
from an environment variable namedAPPLICATIONINSIGHTS_SERVERCHANNEL_STORAGEFOLDER
. When this specific environment variable is present, consider the case as same of custom folder and avoid setting permission on it.The text was updated successfully, but these errors were encountered: