Skip to content

Commit

Permalink
feat(stacktrace-link): Add source link to stack trace frame (#55407)
Browse files Browse the repository at this point in the history
This PR adds dotnet's source link to the stack trace frame so that it may be used in the case a regular stack trace link cannot be retrieved.
  • Loading branch information
isabellaenriquez authored Aug 31, 2023
1 parent c4e736e commit 7b71d11
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sentry/interfaces/stacktrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def to_python(cls, data, **kwargs):
"platform",
"post_context",
"pre_context",
"source_link",
"symbol",
"symbol_addr",
"trust",
Expand Down Expand Up @@ -187,6 +188,7 @@ def to_json(self):
"lineno": self.lineno,
"colno": self.colno,
"lock": self.lock,
"source_link": self.source_link or None,
}
)

Expand Down Expand Up @@ -217,7 +219,9 @@ def get_api_context(self, is_public=False, pad_addr=None, platform=None):
"trust": self.trust,
"errors": self.errors,
"lock": self.lock,
"sourceLink": self.source_link,
}

if not is_public:
data["vars"] = self.vars

Expand Down Expand Up @@ -279,6 +283,7 @@ def get_meta_context(self, meta, is_public=False, platform=None):
"trust": meta.get("trust"),
"errors": meta.get("errors"),
"lock": meta.get("lock"),
"sourceLink": meta.get("source_link"),
}

def is_url(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down Expand Up @@ -54,6 +55,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down Expand Up @@ -54,6 +55,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down Expand Up @@ -54,6 +55,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down Expand Up @@ -54,6 +55,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand All @@ -47,6 +48,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: Class.myfunc
symbolAddr: null
trust: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down Expand Up @@ -64,6 +65,7 @@ get_api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand All @@ -53,6 +54,7 @@ api_context:
package: null
platform: null
rawFunction: null
sourceLink: null
symbol: null
symbolAddr: null
trust: null
Expand Down

0 comments on commit 7b71d11

Please sign in to comment.