From 14b19965ab3645ff976fb77f2b2baafb122a9b9d Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Wed, 14 Sep 2022 19:32:39 -0700 Subject: [PATCH 1/4] Add User.Segment, and cleanup --- src/Sentry/IEventLike.cs | 7 +- src/Sentry/User.cs | 104 ++++++++++-------- .../ApiApprovalTests.Run.Core3_1.verified.txt | 1 + ...piApprovalTests.Run.DotNet4_8.verified.txt | 1 + ...piApprovalTests.Run.DotNet6_0.verified.txt | 1 + .../Protocol/ScopeExtensionsTests.cs | 40 ++++--- test/Sentry.Tests/Protocol/UserTests.cs | 25 +++-- 7 files changed, 99 insertions(+), 80 deletions(-) diff --git a/src/Sentry/IEventLike.cs b/src/Sentry/IEventLike.cs index 4b61927e68..8cb4e4696a 100644 --- a/src/Sentry/IEventLike.cs +++ b/src/Sentry/IEventLike.cs @@ -98,12 +98,7 @@ public static class EventLikeExtensions /// /// Whether a has been set to the object with any of its fields non null. /// - public static bool HasUser(this IEventLike eventLike) - => eventLike.User.Email is not null - || eventLike.User.Id is not null - || eventLike.User.Username is not null - || eventLike.User.InternalOther?.Count > 0 - || eventLike.User.IpAddress is not null; + public static bool HasUser(this IEventLike eventLike) => eventLike.User.HasAnyData(); /// /// Sets the fingerprint to the object. diff --git a/src/Sentry/User.cs b/src/Sentry/User.cs index 4bf22762e5..c4da0f61f7 100644 --- a/src/Sentry/User.cs +++ b/src/Sentry/User.cs @@ -15,50 +15,55 @@ public sealed class User : IJsonSerializable { internal Action? PropertyChanged { get; set; } + private string? _id; + private string? _username; private string? _email; + private string? _ipAddress; + private string? _segment; + private IDictionary? _other; /// - /// The email address of the user. + /// The unique ID of the user. /// - /// - /// The user's email address. - /// - public string? Email + public string? Id { - get => _email; + get => _id; set { - _email = value; + _id = value; PropertyChanged?.Invoke(this); } } - private string? _id; - /// - /// The unique ID of the user. + /// The username of the user. /// - /// - /// The unique identifier. - /// - public string? Id + public string? Username { - get => _id; + get => _username; set { - _id = value; + _username = value; PropertyChanged?.Invoke(this); } } - private string? _ipAddress; + /// + /// The email address of the user. + /// + public string? Email + { + get => _email; + set + { + _email = value; + PropertyChanged?.Invoke(this); + } + } /// - /// The IP of the user. + /// The IP address of the user. /// - /// - /// The user's IP address. - /// public string? IpAddress { get => _ipAddress; @@ -69,33 +74,30 @@ public string? IpAddress } } - private string? _username; - /// - /// The username of the user. + /// The segment the user belongs to. /// - /// - /// The user's username. - /// - public string? Username + public string? Segment { - get => _username; + get => _segment; set { - _username = value; + _segment = value; PropertyChanged?.Invoke(this); } } - internal IDictionary? InternalOther { get; private set; } - /// /// Additional information about the user. /// public IDictionary Other { - get => InternalOther ??= new Dictionary(); - set => InternalOther = value; + get => _other ??= new Dictionary(); + set + { + _other = value; + PropertyChanged?.Invoke(this); + } } /// @@ -105,9 +107,7 @@ public IDictionary Other public User Clone() { var user = new User(); - CopyTo(user); - return user; } @@ -118,26 +118,36 @@ internal void CopyTo(User? user) return; } - user.Email ??= Email; user.Id ??= Id; user.Username ??= Username; + user.Email ??= Email; user.IpAddress ??= IpAddress; + user.Segment ??= Segment; - user.InternalOther ??= InternalOther?.ToDictionary( + user._other ??= _other?.ToDictionary( entry => entry.Key, entry => entry.Value); } + internal bool HasAnyData() => + Id is not null || + Username is not null || + Email is not null || + IpAddress is not null || + Segment is not null || + _other?.Count > 0; + /// public void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger? _) { writer.WriteStartObject(); - writer.WriteStringIfNotWhiteSpace("email", Email); writer.WriteStringIfNotWhiteSpace("id", Id); - writer.WriteStringIfNotWhiteSpace("ip_address", IpAddress); writer.WriteStringIfNotWhiteSpace("username", Username); - writer.WriteStringDictionaryIfNotEmpty("other", InternalOther!); + writer.WriteStringIfNotWhiteSpace("email", Email); + writer.WriteStringIfNotWhiteSpace("ip_address", IpAddress); + writer.WriteStringIfNotWhiteSpace("segment", Segment); + writer.WriteStringDictionaryIfNotEmpty("other", _other!); writer.WriteEndObject(); } @@ -147,19 +157,21 @@ public void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger? _) /// public static User FromJson(JsonElement json) { - var email = json.GetPropertyOrNull("email")?.GetString(); var id = json.GetPropertyOrNull("id")?.GetString(); - var ip = json.GetPropertyOrNull("ip_address")?.GetString(); var username = json.GetPropertyOrNull("username")?.GetString(); + var email = json.GetPropertyOrNull("email")?.GetString(); + var ip = json.GetPropertyOrNull("ip_address")?.GetString(); + var segment = json.GetPropertyOrNull("segment")?.GetString(); var other = json.GetPropertyOrNull("other")?.GetStringDictionaryOrNull(); return new User { - Email = email, Id = id, - IpAddress = ip, Username = username, - InternalOther = other?.WhereNotNullValue().ToDictionary() + Email = email, + IpAddress = ip, + Segment = segment, + _other = other?.WhereNotNullValue().ToDictionary() }; } } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt index dfa62d5d09..d5fbf3f1ad 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt @@ -935,6 +935,7 @@ namespace Sentry public string? Id { get; set; } public string? IpAddress { get; set; } public System.Collections.Generic.IDictionary Other { get; set; } + public string? Segment { get; set; } public string? Username { get; set; } public Sentry.User Clone() { } public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_8.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_8.verified.txt index 42afa0bb95..5917932d8c 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_8.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_8.verified.txt @@ -934,6 +934,7 @@ namespace Sentry public string? Id { get; set; } public string? IpAddress { get; set; } public System.Collections.Generic.IDictionary Other { get; set; } + public string? Segment { get; set; } public string? Username { get; set; } public Sentry.User Clone() { } public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index dfa62d5d09..d5fbf3f1ad 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -935,6 +935,7 @@ namespace Sentry public string? Id { get; set; } public string? IpAddress { get; set; } public System.Collections.Generic.IDictionary Other { get; set; } + public string? Segment { get; set; } public string? Username { get; set; } public Sentry.User Clone() { } public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { } diff --git a/test/Sentry.Tests/Protocol/ScopeExtensionsTests.cs b/test/Sentry.Tests/Protocol/ScopeExtensionsTests.cs index 2afc4cf11a..4d13fa3b8a 100644 --- a/test/Sentry.Tests/Protocol/ScopeExtensionsTests.cs +++ b/test/Sentry.Tests/Protocol/ScopeExtensionsTests.cs @@ -24,7 +24,7 @@ public void HasUser_DefaultScope_ReturnsFalse() public void HasUser_NullUser_ReturnsFalse() { var sut = _fixture.GetSut(); - sut.User = null; + sut.User = null!; Assert.False(sut.HasUser()); } @@ -52,6 +52,14 @@ public void HasUser_UserWithUserName_ReturnsTrue() Assert.True(sut.HasUser()); } + [Fact] + public void HasUser_UserWithEmail_ReturnsTrue() + { + var sut = _fixture.GetSut(); + sut.User.Email = "test"; + Assert.True(sut.HasUser()); + } + [Fact] public void HasUser_UserWithIpAddress_ReturnsTrue() { @@ -61,10 +69,10 @@ public void HasUser_UserWithIpAddress_ReturnsTrue() } [Fact] - public void HasUser_UserWithEmail_ReturnsTrue() + public void HasUser_UserWithSegment_ReturnsTrue() { var sut = _fixture.GetSut(); - sut.User.Email = "test"; + sut.User.Segment = "test"; Assert.True(sut.HasUser()); } @@ -408,8 +416,8 @@ public void AddBreadcrumb_ValueTuple_AllArgumentsMatch() Assert.Equal(expectedMessage, actual.Message); Assert.Equal(expectedCategory, actual.Category); Assert.Equal(expectedType, actual.Type); - Assert.Equal(expectedData.key, actual.Data.Single().Key); - Assert.Equal(expectedData.value, actual.Data.Single().Value); + Assert.Equal(expectedData.key, actual.Data?.Single().Key); + Assert.Equal(expectedData.value, actual.Data?.Single().Value); Assert.Equal(expectedLevel, actual.Level); } #endif @@ -435,8 +443,8 @@ public void AddBreadcrumb_Dictionary_AllArgumentsMatch() Assert.Equal(expectedMessage, actual.Message); Assert.Equal(expectedCategory, actual.Category); Assert.Equal(expectedType, actual.Type); - Assert.Equal(expectedData.Single().Key, actual.Data.Single().Key); - Assert.Equal(expectedData.Single().Value, actual.Data.Single().Value); + Assert.Equal(expectedData.Single().Key, actual.Data?.Single().Key); + Assert.Equal(expectedData.Single().Value, actual.Data?.Single().Value); Assert.Equal(expectedLevel, actual.Level); } @@ -464,8 +472,8 @@ public void AddBreadcrumb_ImmutableDictionary_AllArgumentsMatch() Assert.Equal(expectedMessage, actual.Message); Assert.Equal(expectedCategory, actual.Category); Assert.Equal(expectedType, actual.Type); - Assert.Equal(expectedData.Single().Key, actual.Data.Single().Key); - Assert.Equal(expectedData.Single().Value, actual.Data.Single().Value); + Assert.Equal(expectedData.Single().Key, actual.Data?.Single().Key); + Assert.Equal(expectedData.Single().Value, actual.Data?.Single().Value); Assert.Equal(expectedLevel, actual.Level); } @@ -510,10 +518,10 @@ public void AddAttachment_AllArgumentsMatch() // Assert var attachment = Assert.Single(scope.Attachments); - Assert.Equal(expectedStream, attachment?.Content.GetStream()); - Assert.Equal(expectedFileName, attachment?.FileName); - Assert.Equal(expectedType, attachment?.Type); - Assert.Equal(expectedContentType, attachment?.ContentType); + Assert.Equal(expectedStream, attachment.Content.GetStream()); + Assert.Equal(expectedFileName, attachment.FileName); + Assert.Equal(expectedType, attachment.Type); + Assert.Equal(expectedContentType, attachment.ContentType); } [Fact] @@ -554,9 +562,9 @@ public void AddAttachment_FromFile_ArgumentsResolvedCorrectly() // Assert var attachment = Assert.Single(scope.Attachments); - using var stream = attachment?.Content.GetStream(); + using var stream = attachment.Content.GetStream(); - Assert.Equal("MyFile.txt", attachment?.FileName); + Assert.Equal("MyFile.txt", attachment.FileName); Assert.Equal(12, stream.Length); } @@ -564,7 +572,7 @@ public void AddAttachment_FromFile_ArgumentsResolvedCorrectly() public void Apply_Null_Target_DoesNotThrow() { var sut = _fixture.GetSut(); - sut.Apply(null); + sut.Apply(null!); } [Fact] diff --git a/test/Sentry.Tests/Protocol/UserTests.cs b/test/Sentry.Tests/Protocol/UserTests.cs index 8e9e021ddc..9c7293b62a 100644 --- a/test/Sentry.Tests/Protocol/UserTests.cs +++ b/test/Sentry.Tests/Protocol/UserTests.cs @@ -17,9 +17,10 @@ public void SerializeObject_AllPropertiesSetToNonDefault_SerializesValidObject() var sut = new User { Id = "user-id", + Username = "user-name", Email = "test@sentry.io", IpAddress = "::1", - Username = "user-name", + Segment = "A1", Other = new Dictionary { { "testCustomValueKey", "testCustomValue" } } }; @@ -27,10 +28,11 @@ public void SerializeObject_AllPropertiesSetToNonDefault_SerializesValidObject() Assert.Equal( "{" + - "\"email\":\"test@sentry.io\"," + "\"id\":\"user-id\"," + - "\"ip_address\":\"::1\"," + "\"username\":\"user-name\"," + + "\"email\":\"test@sentry.io\"," + + "\"ip_address\":\"::1\"," + + "\"segment\":\"A1\"," + "\"other\":{\"testCustomValueKey\":\"testCustomValue\"}" + "}", actual); @@ -45,6 +47,7 @@ public void Clone_CopyValues() Email = "emal@sentry.io", IpAddress = "::1", Username = "user", + Segment = "segment", Other = new Dictionary { {"testCustomValueKey", "testCustomValue"} @@ -54,9 +57,10 @@ public void Clone_CopyValues() var clone = sut.Clone(); Assert.Equal(sut.Id, clone.Id); - Assert.Equal(sut.Email, clone.Email); - Assert.Same(sut.IpAddress, clone.IpAddress); Assert.Equal(sut.Username, clone.Username); + Assert.Equal(sut.Email, clone.Email); + Assert.Equal(sut.IpAddress, clone.IpAddress); + Assert.Equal(sut.Segment, clone.Segment); Assert.Equal(sut.Other, clone.Other); } @@ -65,7 +69,6 @@ public void Clone_CopyValues() public void SerializeObject_TestCase_SerializesAsExpected((User user, string serialized) @case) { var actual = @case.user.ToJsonString(_testOutputLogger); - Assert.Equal(@case.serialized, actual); } @@ -73,14 +76,12 @@ public static IEnumerable TestCases() { yield return new object[] { (new User(), "{}") }; yield return new object[] { (new User { Id = "some id" }, "{\"id\":\"some id\"}") }; + yield return new object[] { (new User { Username = "some username" }, "{\"username\":\"some username\"}") }; yield return new object[] { (new User { Email = "some email" }, "{\"email\":\"some email\"}") }; yield return new object[] { (new User { IpAddress = "some ipAddress" }, "{\"ip_address\":\"some ipAddress\"}") }; - yield return new object[] { (new User { Username = "some username" }, "{\"username\":\"some username\"}") }; - yield return new object[] { (new User {Other = new Dictionary - { - {"testCustomValueKey", "testCustomValue"} - } + yield return new object[] { (new User { Segment = "some segment" }, "{\"segment\":\"some segment\"}") }; - }, "{\"other\":{\"testCustomValueKey\":\"testCustomValue\"}}") }; + var other = new Dictionary {{"testCustomValueKey", "testCustomValue"}}; + yield return new object[] { (new User { Other = other }, "{\"other\":{\"testCustomValueKey\":\"testCustomValue\"}}")}; } } From ac049cde5a791354424a71a7f72d7f5b5b1a7e60 Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Wed, 14 Sep 2022 19:33:53 -0700 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b776ccb4d8..725810bdf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ - `SentryOptions.AttachStackTrace` is now enabled by default. ([#1907](https://github.com/getsentry/sentry-dotnet/pull/1907)) - Update Sentry Android SDK to version 6.4.1 ([#1911](https://github.com/getsentry/sentry-dotnet/pull/1911)) - Update Sentry Cocoa SDK to version 7.24.1 ([#1912](https://github.com/getsentry/sentry-dotnet/pull/1912)) -- Add TransactionNameSource annotation ([#1910](https://github.com/getsentry/sentry-dotnet/pull/1910)) +- Add `TransactionNameSource` annotation ([#1910](https://github.com/getsentry/sentry-dotnet/pull/1910)) +- Add `User.Segment` property ([#1920](https://github.com/getsentry/sentry-dotnet/pull/1920)) ## Fixes From 8f3663fa58bed0af686eb9a36ec56237af3f5573 Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Wed, 14 Sep 2022 20:14:21 -0700 Subject: [PATCH 3/4] Update NLog and Serilog --- src/Sentry.NLog/SentryNLogUser.cs | 5 +++++ src/Sentry.NLog/SentryTarget.cs | 5 +++-- .../ApiApprovalTests.Run.Core3_1.verified.txt | 3 ++- .../ApiApprovalTests.Run.DotNet4_8.verified.txt | 1 + .../ApiApprovalTests.Run.DotNet6_0.verified.txt | 1 + .../IntegrationTests.Simple.verified.txt | 5 +++-- test/Sentry.NLog.Tests/IntegrationTests.cs | 8 ++------ .../IntegrationTests.Simple.verified.txt | 16 ++++++++-------- 8 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/Sentry.NLog/SentryNLogUser.cs b/src/Sentry.NLog/SentryNLogUser.cs index 1bd8b77966..40a642a959 100644 --- a/src/Sentry.NLog/SentryNLogUser.cs +++ b/src/Sentry.NLog/SentryNLogUser.cs @@ -26,6 +26,11 @@ public class SentryNLogUser /// public Layout? IpAddress { get; set; } + /// + /// A used to dynamically specify the segment of a user for a sentry event. + /// + public Layout? Segment { get; set; } + /// /// Additional information about the user /// diff --git a/src/Sentry.NLog/SentryTarget.cs b/src/Sentry.NLog/SentryTarget.cs index 6800eba224..d67161641f 100644 --- a/src/Sentry.NLog/SentryTarget.cs +++ b/src/Sentry.NLog/SentryTarget.cs @@ -449,10 +449,11 @@ private void InnerWrite(LogEventInfo logEvent) var user = new User { - Email = User.Email?.Render(logEvent), Id = User.Id?.Render(logEvent), - IpAddress = User.IpAddress?.Render(logEvent), Username = User.Username?.Render(logEvent), + Email = User.Email?.Render(logEvent), + IpAddress = User.IpAddress?.Render(logEvent), + Segment = User.Segment?.Render(logEvent) }; if (User.Other?.Count > 0) diff --git a/test/Sentry.NLog.Tests/ApiApprovalTests.Run.Core3_1.verified.txt b/test/Sentry.NLog.Tests/ApiApprovalTests.Run.Core3_1.verified.txt index 7beab10bef..18c06cddd4 100644 --- a/test/Sentry.NLog.Tests/ApiApprovalTests.Run.Core3_1.verified.txt +++ b/test/Sentry.NLog.Tests/ApiApprovalTests.Run.Core3_1.verified.txt @@ -1,4 +1,4 @@ -[assembly: System.CLSCompliant(true)] +[assembly: System.CLSCompliant(true)] namespace NLog { public static class ConfigurationExtensions @@ -49,6 +49,7 @@ namespace Sentry.NLog public NLog.Layouts.Layout? IpAddress { get; set; } [NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext?), "other")] public System.Collections.Generic.IList? Other { get; } + public NLog.Layouts.Layout? Segment { get; set; } public NLog.Layouts.Layout? Username { get; set; } } [NLog.Targets.Target("Sentry")] diff --git a/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet4_8.verified.txt b/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet4_8.verified.txt index c502ff32d3..18c06cddd4 100644 --- a/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet4_8.verified.txt +++ b/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet4_8.verified.txt @@ -49,6 +49,7 @@ namespace Sentry.NLog public NLog.Layouts.Layout? IpAddress { get; set; } [NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext?), "other")] public System.Collections.Generic.IList? Other { get; } + public NLog.Layouts.Layout? Segment { get; set; } public NLog.Layouts.Layout? Username { get; set; } } [NLog.Targets.Target("Sentry")] diff --git a/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index c502ff32d3..18c06cddd4 100644 --- a/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.NLog.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -49,6 +49,7 @@ namespace Sentry.NLog public NLog.Layouts.Layout? IpAddress { get; set; } [NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext?), "other")] public System.Collections.Generic.IList? Other { get; } + public NLog.Layouts.Layout? Segment { get; set; } public NLog.Layouts.Layout? Username { get; set; } } [NLog.Targets.Target("Sentry")] diff --git a/test/Sentry.NLog.Tests/IntegrationTests.Simple.verified.txt b/test/Sentry.NLog.Tests/IntegrationTests.Simple.verified.txt index 6d5d0cffbf..b2f337dd95 100644 --- a/test/Sentry.NLog.Tests/IntegrationTests.Simple.verified.txt +++ b/test/Sentry.NLog.Tests/IntegrationTests.Simple.verified.txt @@ -44,10 +44,11 @@ Request: {}, Contexts: {}, User: { - Email: , Id: myId, - IpAddress: , Username: , + Email: , + IpAddress: , + Segment: , Other: { mood: joyous } diff --git a/test/Sentry.NLog.Tests/IntegrationTests.cs b/test/Sentry.NLog.Tests/IntegrationTests.cs index 3d2dd33bb6..ee16093db5 100644 --- a/test/Sentry.NLog.Tests/IntegrationTests.cs +++ b/test/Sentry.NLog.Tests/IntegrationTests.cs @@ -1,9 +1,4 @@ -using NLog; -using NLog.Config; -using NLog.Targets; -using Sentry.Testing; - -namespace Sentry.NLog.Tests; +namespace Sentry.NLog.Tests; [UsesVerify] public class IntegrationTests @@ -31,6 +26,7 @@ public Task Simple() Username = "${scopeproperty:item=username}", Email = "${scopeproperty:item=email}", IpAddress = "${scopeproperty:item=ipAddress}", + Segment = "${scopeproperty:item=segment}", Other = { new TargetPropertyWithContext("mood", "joyous") diff --git a/test/Sentry.Serilog.Tests/IntegrationTests.Simple.verified.txt b/test/Sentry.Serilog.Tests/IntegrationTests.Simple.verified.txt index 566f4e170b..a7e2187dd8 100644 --- a/test/Sentry.Serilog.Tests/IntegrationTests.Simple.verified.txt +++ b/test/Sentry.Serilog.Tests/IntegrationTests.Simple.verified.txt @@ -25,8 +25,8 @@ Request: {}, Contexts: {}, User: { - IpAddress: {{auto}}, - Username: TheUserName + Username: TheUserName, + IpAddress: {{auto}} }, Environment: production, Extra: { @@ -64,8 +64,8 @@ Request: {}, Contexts: {}, User: { - IpAddress: {{auto}}, - Username: TheUserName + Username: TheUserName, + IpAddress: {{auto}} }, Environment: production, Breadcrumbs: [ @@ -109,8 +109,8 @@ Request: {}, Contexts: {}, User: { - IpAddress: {{auto}}, - Username: TheUserName + Username: TheUserName, + IpAddress: {{auto}} }, Environment: production, Breadcrumbs: [ @@ -183,8 +183,8 @@ Request: {}, Contexts: {}, User: { - IpAddress: {{auto}}, - Username: TheUserName + Username: TheUserName, + IpAddress: {{auto}} }, Environment: production, Breadcrumbs: [ From 211a319103bef83d7de057d2443e2cb86d138bfc Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Wed, 14 Sep 2022 21:07:13 -0700 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6059a5a0e..01139af839 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,8 @@ - Update Sentry Android SDK to version 6.4.1 ([#1911](https://github.com/getsentry/sentry-dotnet/pull/1911)) - Update Sentry Cocoa SDK to version 7.24.1 ([#1912](https://github.com/getsentry/sentry-dotnet/pull/1912)) - Add `TransactionNameSource` annotation ([#1910](https://github.com/getsentry/sentry-dotnet/pull/1910)) -- Add `User.Segment` property ([#1920](https://github.com/getsentry/sentry-dotnet/pull/1920)) -- Add TransactionNameSource annotation ([#1910](https://github.com/getsentry/sentry-dotnet/pull/1910)) - Use URL path in transaction names instead of "Unknown Route" ([#1919](https://github.com/getsentry/sentry-dotnet/pull/1919)) +- Add `User.Segment` property ([#1920](https://github.com/getsentry/sentry-dotnet/pull/1920)) ## Fixes