Update PortablePdbReader.cs#4
Merged
jamescrosswell merged 5 commits intogetsentry:mainfrom Apr 24, 2024
Merged
Conversation
jamescrosswell
added a commit
that referenced
this pull request
Dec 18, 2023
Applied fix from #4 in our local fork of the module.
jamescrosswell
added a commit
to getsentry/sentry-dotnet
that referenced
this pull request
Dec 18, 2023
Member
|
CI is failing with:
Might need some fixing too (drop support for example?) |
bruno-garcia
approved these changes
Dec 20, 2023
Member
|
Worth opening a PR upstream on https://github.com/benaadams/Ben.Demystifier too |
bruno-garcia
added a commit
to getsentry/sentry-dotnet
that referenced
this pull request
Jan 8, 2024
* Added basic metric types * Moved Metric classes * Added Increment aggregator * Implemented Gauge metric * Implemented Distribution and Set aggregations * Added Metrics to ISentryClient API * Update Hub.cs * Verify tests * Basic flush loop (no tests yet) * Implemented statsd serialization * Update CHANGELOG.md * Split tests for Aggregagtor and BucketHelper * Update MetricBucketHelperTests.cs * Integrated review feedback * Create MetricTests.verify.cs * Updated verify tests * Added Timing * Added a (commented out) test to check if the aggregator is threadsafe * Fixed concurrency issue (could still make this more performant) * Reduced the scope of the lock for updating metrics * Fixed unit tests * Update MetricAggregator.cs * Initial implementation of Code Locations * Update Program.cs * Updated solution filters * Update CHANGELOG.md * Changed Flush to FlushAsync * Metrics now get flushed properly when disposing of the Hub * Fixed serialization for code locations * Update Timing.cs * Clear stale seen periods at the end of each day * Update CodeLocations.cs * Fixed stacklevel when calling one of the two Timing constructors * Removed IAsyncDisposable from MetricAggregator * Cherry picked getsentry/Ben.Demystifier#4 * Update Ben.Demystifier * Get line numbers with stack traces without enhanced stack traces * Update Ben.Demystifier * Reversed changes to AspNetCore.Basic sample (unrelated to this PR) * Update Program.cs * Improved the lock when incrementing/adding to existing metrics * Tweaking docs * Update CHANGELOG.md Co-authored-by: Bruno Garcia <bruno@brunogarcia.com> * Integrating review feedback * Source generated RegEx in metric helper * Update Envelope.cs * Review feedback * Integrating review feedback * More performant string delimited tags used in the bucket key * Integrating review feedback * Integrated review feedback * Removed unused private field --------- Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
jamescrosswell
commented
Jan 10, 2024
| stackTrace = LineEndingsHelper.RemoveLineEndings(stackTrace); | ||
| var trace = string.Join(string.Empty, stackTrace.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)); | ||
|
|
||
| #if (NETFRAMEWORK && !DEBUG) |
Collaborator
Author
There was a problem hiding this comment.
This appears unrelated to the changes in this PR btw... I suspect something obscure changed in the .NET Framework such that this is now required.
jamescrosswell
added a commit
that referenced
this pull request
Apr 24, 2024
Applied fix from #4 in our local fork of the module. --------- Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
This file contains hidden or 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
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 an issue in
PortablePdbReader.GetMetadataReader.This method is supposed to return a value from the cache (if one exists) and otherwise try to create one from the assemblyPath.
The previous code only ever did any work or added anything to the cache if the following condition was satisfied:
So if it couldn't find anything from the cache and also, if that thing it didn't find isn't null (which would never be possible - if it couldn't find anything, the out value will always be null).