-
Notifications
You must be signed in to change notification settings - Fork 772
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
Allow viewing the log file for SelfDiagnostics for .NET Framework #1693
Merged
cijothomas
merged 12 commits into
open-telemetry:main
from
xiang17:xiang17/FixBugInSelfDiagnostics_FileShareStatus
Jan 28, 2021
Merged
Allow viewing the log file for SelfDiagnostics for .NET Framework #1693
cijothomas
merged 12 commits into
open-telemetry:main
from
xiang17:xiang17/FixBugInSelfDiagnostics_FileShareStatus
Jan 28, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…mework and .NET Core for SelfDiagnostics
(cherry picked from commit 9fe60757c4254b67c1d166fc5f42eb795d424bf9)
…hare status" This reverts commit 1007ffe.
Codecov Report
@@ Coverage Diff @@
## main #1693 +/- ##
==========================================
+ Coverage 82.46% 83.15% +0.69%
==========================================
Files 250 250
Lines 6803 6823 +20
==========================================
+ Hits 5610 5674 +64
+ Misses 1193 1149 -44
|
xiang17
changed the title
Fix different FileShare behavior in MemoryMappedFile between .NET Framework and .NET Core for SelfDiagnostics
Allow viewing the log file for SelfDiagnostics for .NET Framework
Jan 13, 2021
…only by others while being used by SelfDiagnosticsModule
cijothomas
reviewed
Jan 20, 2021
cijothomas
reviewed
Jan 20, 2021
test/OpenTelemetry.Tests/Internal/SelfDiagnosticsConfigRefresherTest.cs
Outdated
Show resolved
Hide resolved
please add this to changelog as well. |
Added. |
@xiang17 please resolve confloicts. change look good for me. |
Done. |
cijothomas
approved these changes
Jan 28, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes Bug#2 in #1689. When running with .NET Framework, the log file cannot be opened as read-only, caused by default FileShare behavior in MemoryMappedFile in .NET Framework.
.NET Framework opens the file in FileShare.None mode but .NET Core opens the file in FileShare.Read mode.
Changes
Use the FileStream version of
MemoryMappedFile.CreateFromFile
instead of the string version, because the the string version opens the file in different FileShare mode for .NET Framework and .NET Core.Tested manually:
using (var activity = MyActivitySource.StartActivity("SayHello"))
block in docs/trace/getting-started/Program.cs withwhile (true)
loop.