Skip to content

Commit

Permalink
Refactor: move DebugImage and DebugMeta to Sentry.Protocol (#2815)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Nov 13, 2023
1 parent 83d8b4e commit f661d07
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 62 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -79,6 +79,7 @@ Additionally, we're dropping support for some of the old target frameworks, plea
- `DebugImage.ImageAddress` changed to `long?`. ([#2725](https://github.com/getsentry/sentry-dotnet/pull/2725))
- Contexts now inherits from `IDictionary` rather than `ConcurrentDictionary`. The specific dictionary being used is an implementation detail. ([#2729](https://github.com/getsentry/sentry-dotnet/pull/2729))
- Transaction names for ASP.NET Core are now consistently named `HTTP-VERB /path` (e.g. `GET /home`). Previously the leading forward slash was missing for some endpoints. ([#2808](https://github.com/getsentry/sentry-dotnet/pull/2808))
- `DebugImage` and `DebugMeta` moved to `Sentry.Protocol` namespace. ([#2815](https://github.com/getsentry/sentry-dotnet/pull/2815))

### Fixes

Expand Down
1 change: 1 addition & 0 deletions src/Sentry/Internal/DebugStackTrace.cs
Expand Up @@ -2,6 +2,7 @@
using Sentry.Extensibility;
using Sentry.Native;
using Sentry.Internal.ILSpy;
using Sentry.Protocol;

namespace Sentry.Internal;

Expand Down
1 change: 1 addition & 0 deletions src/Sentry/Internal/Extensions/PEReaderExtensions.cs
@@ -1,4 +1,5 @@
using Sentry.Extensibility;
using Sentry.Protocol;

namespace Sentry.Internal.Extensions;

Expand Down
1 change: 1 addition & 0 deletions src/Sentry/Internal/ILSpy/SingleFileApp.cs
@@ -1,5 +1,6 @@
using Sentry.Extensibility;
using Sentry.Internal.Extensions;
using Sentry.Protocol;

namespace Sentry.Internal.ILSpy;

Expand Down
1 change: 1 addition & 0 deletions src/Sentry/Platforms/Native/CFunctions.cs
@@ -1,5 +1,6 @@
using Sentry.Extensibility;
using Sentry.Internal.Extensions;
using Sentry.Protocol;

namespace Sentry.Native;

Expand Down
@@ -1,7 +1,7 @@
using Sentry.Extensibility;
using Sentry.Internal.Extensions;

namespace Sentry;
namespace Sentry.Protocol;

/// <summary>
/// The Sentry Debug Meta Images interface.
Expand Down
@@ -1,7 +1,7 @@
using Sentry.Extensibility;
using Sentry.Internal.Extensions;

namespace Sentry;
namespace Sentry.Protocol;

/// <summary>
/// The Sentry Debug Meta interface.
Expand Down
30 changes: 15 additions & 15 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt
Expand Up @@ -97,20 +97,6 @@ namespace Sentry
Managed = 0,
ManagedBackgroundThread = 1,
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
[System.Flags]
public enum DeduplicateMode
{
Expand Down Expand Up @@ -517,7 +503,7 @@ namespace Sentry
public SentryEvent(System.Exception? exception) { }
public System.Collections.Generic.IReadOnlyCollection<Sentry.Breadcrumb> Breadcrumbs { get; }
public Sentry.Contexts Contexts { get; set; }
public System.Collections.Generic.List<Sentry.DebugImage>? DebugImages { get; set; }
public System.Collections.Generic.List<Sentry.Protocol.DebugImage>? DebugImages { get; set; }
public string? Distribution { get; set; }
public string? Environment { get; set; }
public Sentry.SentryId EventId { get; }
Expand Down Expand Up @@ -1502,6 +1488,20 @@ namespace Sentry.Protocol
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { }
public static Sentry.Protocol.Browser FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.Protocol.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class Device : Sentry.IJsonSerializable
{
public const string Type = "device";
Expand Down
30 changes: 15 additions & 15 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt
Expand Up @@ -97,20 +97,6 @@ namespace Sentry
Managed = 0,
ManagedBackgroundThread = 1,
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
[System.Flags]
public enum DeduplicateMode
{
Expand Down Expand Up @@ -517,7 +503,7 @@ namespace Sentry
public SentryEvent(System.Exception? exception) { }
public System.Collections.Generic.IReadOnlyCollection<Sentry.Breadcrumb> Breadcrumbs { get; }
public Sentry.Contexts Contexts { get; set; }
public System.Collections.Generic.List<Sentry.DebugImage>? DebugImages { get; set; }
public System.Collections.Generic.List<Sentry.Protocol.DebugImage>? DebugImages { get; set; }
public string? Distribution { get; set; }
public string? Environment { get; set; }
public Sentry.SentryId EventId { get; }
Expand Down Expand Up @@ -1502,6 +1488,20 @@ namespace Sentry.Protocol
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { }
public static Sentry.Protocol.Browser FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.Protocol.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class Device : Sentry.IJsonSerializable
{
public const string Type = "device";
Expand Down
30 changes: 15 additions & 15 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
Expand Up @@ -97,20 +97,6 @@ namespace Sentry
Managed = 0,
ManagedBackgroundThread = 1,
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
[System.Flags]
public enum DeduplicateMode
{
Expand Down Expand Up @@ -517,7 +503,7 @@ namespace Sentry
public SentryEvent(System.Exception? exception) { }
public System.Collections.Generic.IReadOnlyCollection<Sentry.Breadcrumb> Breadcrumbs { get; }
public Sentry.Contexts Contexts { get; set; }
public System.Collections.Generic.List<Sentry.DebugImage>? DebugImages { get; set; }
public System.Collections.Generic.List<Sentry.Protocol.DebugImage>? DebugImages { get; set; }
public string? Distribution { get; set; }
public string? Environment { get; set; }
public Sentry.SentryId EventId { get; }
Expand Down Expand Up @@ -1502,6 +1488,20 @@ namespace Sentry.Protocol
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { }
public static Sentry.Protocol.Browser FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.Protocol.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class Device : Sentry.IJsonSerializable
{
public const string Type = "device";
Expand Down
30 changes: 15 additions & 15 deletions test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
Expand Up @@ -97,20 +97,6 @@ namespace Sentry
Managed = 0,
ManagedBackgroundThread = 1,
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
[System.Flags]
public enum DeduplicateMode
{
Expand Down Expand Up @@ -516,7 +502,7 @@ namespace Sentry
public SentryEvent(System.Exception? exception) { }
public System.Collections.Generic.IReadOnlyCollection<Sentry.Breadcrumb> Breadcrumbs { get; }
public Sentry.Contexts Contexts { get; set; }
public System.Collections.Generic.List<Sentry.DebugImage>? DebugImages { get; set; }
public System.Collections.Generic.List<Sentry.Protocol.DebugImage>? DebugImages { get; set; }
public string? Distribution { get; set; }
public string? Environment { get; set; }
public Sentry.SentryId EventId { get; }
Expand Down Expand Up @@ -1500,6 +1486,20 @@ namespace Sentry.Protocol
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { }
public static Sentry.Protocol.Browser FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.Protocol.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class Device : Sentry.IJsonSerializable
{
public const string Type = "device";
Expand Down

0 comments on commit f661d07

Please sign in to comment.