Skip to content
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

Refactor: move DebugImage and DebugMeta to Sentry.Protocol #2815

Merged
merged 2 commits into from Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 🚫 The changelog entry seems to be part of an already released section ## 4.0.0.
    Consider moving the entry to the ## Unreleased section, please.


### 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