Conversation
… `Sentry.AspNetCore` and `Sentry.Maui` (#4193) * feat(logs): initial experiment * feat(logs): basic Logger Module API shape * style(logs): consolidate * ref(logs): remove generic WriteSerializable overload * ref(logs): consolidate experimental Diagnostic-ID * feat(logs): add experimental options * ref(logs): remove custom polyfills now provided through Polyfill * Format code * ref(logs): move types out of Experimental namespace * feat(logs): change 'integer' from Int32 to Int64 * ref(logs): refine API surface area * ref(logs): match SeverityLevel to OTel spec * ref(logs): rename SentrySeverity to LogSeverityLevel * Format code * ref(logs): hide underlying Dictionary`2 for Attributes * ref(logs): restructure attributes * ref(logs): extract TraceId and ParentSpanId methods * ref(logs): remove `SentryOptions.LogsSampleRate` * feat(logs): support ISystemClock abstraction * ref(logs): disambiguate SentryLogger names * ref(logs): consolidate names of Log-Methods * ref(logs): rename LogSeverityLevel to SentryLogLevel * ref(logs): re-rename new logger type * ref(logs): move Logger instances to Hubs * test(logs): add tests * Format code * fix(logs): incorrectly serializing attributes * fix(logs): do not capture log when template/parameters are invalid * fix(logs): do not capture log on user callback exceptions * ref(logs): move new public types to root namespace * ref(logs): rework sample * ref(logs): ensure that DisabledHub dues not capture logs * ref(logs): allow out-of-range Log-Level * docs(logs): add XML comments indicating that logs will be ignored on delegate exceptions * docs(logs): add to changelog * fix(logs): add to Bindable-Options * fix(logs): add to ApiApprovalTests * test(logs): add missing net48 ApiApproval * test(logs): fix line endings on Windows * Update src/Sentry/Protocol/Envelopes/Envelope.cs Co-authored-by: Bruno Garcia <[email protected]> * Update SentryLog.cs Co-Authored-By: Bruno Garcia <[email protected]> * test(logs): fix floating-point ToString expectation for .NET Framework * ref(logs): remove some using declarations * test(ci): trying to work around floating-point formatter on .NET Framework * test(logs): skip failing tests on Mono (non-Windows) * test(log): fix Skip.If missing SkippableFact * try: fix floating-point formatting on Windows * feat(logs): Sentry.Extensions.Logging * feat(logs): Sentry.AspNetCore * feat(logs): Sentry.Maui * fix(logs): Logging Filter * Format code * feat(logs): add CHANGELOG entry * release: 5.8.0-alpha.0 * ref: make SentryStructuredLogger abstract * docs: add comment to sample usage of SetBeforeSendLog Co-authored-by: Bruno Garcia <[email protected]> * ref: clarify intent of usages of Debug.Assert * docs: improve XML comments * test: range of Severity-Number specification * test: GetValuesAsUnderlyingType of the new enum * ref: move Log options to Experimental section * ref: move Logger to Experimental section of SDK * test: add Hub tests * test: update verified public API * docs: update CHANGELOG.md * ref: move Log-rerelated Options to Experimental sub-section * ref: reuse Disabled-Instance when Structured-Logging is not enabled * ref: remove Enabled-checks on Default-Logger * ref: rename DisabledSentryStructuredLogger to NoOpSentryStructuredLogger * ref: make `BindableSentryOptions.Experimental` internal Co-authored-by: James Crosswell <[email protected]> * Revert "ref: make `BindableSentryOptions.Experimental` internal" This reverts commit 45b8687. * docs: Update CHANGELOG.md Co-authored-by: Bruno Garcia <[email protected]> * Revert "ref: rename DisabledSentryStructuredLogger to NoOpSentryStructuredLogger" This reverts commit c0a1cd5. * ref: replace use of ScopeManager with TraceHeader * test: remove Skip as we no longer test net48 against non-Windows * feat: support more numeric types * feat: support char attributes * fix: build error targeting .NET Standard 2.0 and .NET Framework * fix: exception when passing null as message parameter * test: add Attributes-To-Json test * fix: missing type on .NET Framework * feat: support Attribute-Types from spec * ref: clarify internal identifiers * test: update approved API * test: fix incorrect expectation * feat: use "wrapping" SDK's Name and Version * fix: Get-Attribute-API * docs: update CHANGELOG * docs: update CHANGELOG * test: change options to Experimental section * docs: merge CHANGELOG * ref/fix: M.E.L integrations * fix: M.E.L. formatter may throw when CA2017 is violated * fix: Logger uses .NET MAUI SDK name * fix: send log timestamp with milliseconds * perf: avoid redundant array copy * Update CHANGELOG.md * ref(docs): remove ExperimentalAttribute on internal types and members * style(logs): use Recursive Pattern Matching Co-authored-by: James Crosswell <[email protected]> * test(logs): add coverage for missing message --------- Co-authored-by: Sentry Github Bot <[email protected]> Co-authored-by: Bruno Garcia <[email protected]> Co-authored-by: Bruno Garcia <[email protected]> Co-authored-by: getsentry-bot <[email protected]> Co-authored-by: getsentry-bot <[email protected]> Co-authored-by: James Crosswell <[email protected]>
Contributor
|
jamescrosswell
approved these changes
Aug 7, 2025
Collaborator
There was a problem hiding this comment.
Looks like we're 95% there (once it's passing CI).
@Flash0ver and I discussed merging this logger with our other logger, so that we can elegantly handle things like ILogger.BeginScope but this is already pretty solid for an experimental feature so let's get it out there and get some feedback while we work on those other things.
Nice work Stefan! ❤️ 🚀
This was referenced Aug 8, 2025
This was referenced Sep 2, 2025
This was referenced Sep 12, 2025
This was referenced Sep 22, 2025
This was referenced Oct 2, 2025
This was referenced Oct 15, 2025
This was referenced Nov 3, 2025
This was referenced Dec 8, 2025
This was referenced Dec 15, 2025
This was referenced Jan 18, 2026
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.
Add support, API and integrations for Sentry Logs
Integration branch / PR of
Sentry.Extensions.Loggingand integrations forSentry.AspNetCoreandSentry.Maui#4193