sentry-dotnet
sentry-dotnet copied to clipboard
Capture data for Mono server side symbolication
#578 added parsing of Mono stacktraces. Part of the data it reads can be used to symbolicate frames with pdb
s. But until Sentry adds support to it, there's no where to add it to the event.
https://github.com/getsentry/sentry-dotnet/pull/578/files#diff-591366d18813202fbdb64620c836b9f60442259c02a5e44d20e71895eef0c513R56
Platform = "mono", // needs to be agreed with the backend
ModuleVersionId = f.Mvid,
AotId = f.Aotid,
MethodIndex = f.MethodIndex.ToString("x4"),
IsILOffset = f.IsILOffset,
https://github.com/getsentry/sentry-dotnet/pull/578/files#diff-001afbb90f9f04a40a0eb9edcce5ac4a00b22e5d94a4622244d7901bee4cafbbR147
Protocol needs:
/// Module Version Id.
/// </summary>
/// <remarks>Used by the Mono AOT compiler</remarks>
[DataMember(Name = "mvid", EmitDefaultValue = false)]
public string? ModuleVersionId { get; set; }
/// <summary>
/// AOT Id.
/// </summary>
/// <remarks>Used by the Mono AOT compiler</remarks>
[DataMember(Name = "aotid", EmitDefaultValue = false)]
public string? AotId { get; set; }
/// <summary>
/// Method Index.
/// </summary>
/// <remarks>Used by the Mono AOT compiler</remarks>
[DataMember(Name = "method_index", EmitDefaultValue = false)]
public string? MethodIndex { get; set; }
/// <summary>
/// Is IL offset.
/// </summary>
/// <remarks>Used by the Mono AOT compiler</remarks>
[DataMember(Name = "is_il_offset", EmitDefaultValue = false)]
public bool? IsILOffset { get; set; }
@jan-auer this is what I was referring to in terms of protocol change.
related to #1740
@bruno-garcia - Was this for a different use case than we implemented recently (with #2050)?
The whole StackFrameData
class appears to be unused, BTW.
However, it is the only place we have an AotId
- so I wonder if that's what we need to help resolve #2180...
Ok, after diving in further, I'm pretty sure that we can delete StackFrameData
as dead code. It was used as part of MonoSentryStackTraceFactory
, which was deleted in #2050. Basically, it's just for parsing info from the exception.StackTrace
string that mono added when running with -debug
(not debug configuration, but the mono debugging flag). We don't need to do that any more, as we have the ppdb support. which gets most of the same data, directly from the symbol files.
It doesn't help with #2180, as there is no pre-made exception.StackTrace
string to parse there.
Closing this issue, as it was handled by #2050 and corresponding Symbolic changes.