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 stores telemetry data in default folder during transient errors in non-windows environments] #1860

Merged
merged 14 commits into from
Jun 11, 2020

Conversation

rajkumar-rangaraj
Copy link
Member

Fix Issue #1792

Proposal

For the application running in Linux or MacOS, ServerTelemetryChannel doesn’t automatically create a local storage folder to keep telemetry temporarily if there are network issues. Channel should be configured to use local folder to avoid telemetry data loss.

To fix this issue in non-windows environment, following folder locations have been identified to create a storage folder automatically to store telemetry data.

  • ${TMPDIR}, if ${TMPDIR} environment variable is set; otherwise,
  • /var/tmp if that exists; otherwise,
  • /tmp if that exists; otherwise no storage folder is used.

In Windows, SDK creates a storage folder in %LOCALAPPDATA% or %TEMP% and restricts access to Current User and Administrators.

But in Non-Windows environment, we don’t manage permissions for storage folder. If your application logs confidential information that cannot be stored in above mentioned location, we strongly recommend using custom folder and restring permission to process identity of an application.

Checklist

  • I ran Unit Tests locally.
  • CHANGELOG.md updated with one line description of the fix, and a link to the original issue if available.

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

  • Design discussion issue #
  • Changes in public surface reviewed

The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.

Notes for authors:

  • FxCop and other analyzers will fail the build. To see these errors yourself, compile localy using the Release configuration.

Notes for reviewers:

  • We support comment build triggers
    • /AzurePipelines run will queue all builds
    • /AzurePipelines run <pipeline-name> will queue a specific build

Copy link
Contributor

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wonder what would happend if multiple dotnetcore apps run in same linux machine under same user? will they store in same folder and cause collision/other issues?

@rajkumar-rangaraj
Copy link
Member Author

I also wonder what would happend if multiple dotnetcore apps run in same linux machine under same user? will they store in same folder and cause collision/other issues?

For application isolation we create folder name with hash of process identity+folder path, so it won't cause collision.

CHANGELOG.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants