question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bring back support for including stacktrace

See original GitHub issue

Raven had support for including stacktrace from logging by passing stack parameter. In sentry_sdk it accepts only boolean and it’s not useful in case when logging includes stack trace from other thread.

This is approach used by dogslow to report slow requests. It worked fine with raven but with sentry_sdk the stacktraces are gone, making the reports pretty much useless.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
untitakercommented, Oct 22, 2019

What would be even better is ability to use also scope the from other thread, so that all request related data is collected as well.

If you have control over that thread you’re monitoring you could take Hub.current in that thread and pass it off to your monitoring thread. Then you can call hub.capture_event() on it and all scope data will be included.

The stacktrace thing is tricky though. We have a bunch of stuff in sentry_sdk.utils that you could already cobble together (already used by the logging integration for example), but it’s not stable API.

I wish there was a way to interrupt the monitored thread such that you can run the entire error capturing in the “right” thread.

0reactions
intgrcommented, Jul 20, 2021

FYI I have created a fork of dogslow – dogslow-sentry – which uses Sentry APIs and some traceback trickery to include the full stack trace, and Sentry request context, fingerprint for issue grouping, breadcrumbs etc.

https://github.com/intgr/dogslow-sentry

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - What is a stack trace, and how can I use it to debug my ...
In simple terms, a stack trace is a list of the method calls that the application was in the middle of when an...
Read more >
What is a Java Stack Trace? How to Read & Analyze Traces
The stack trace includes information about program subroutines and can be used to debug or troubleshoot and is often used to create log...
Read more >
Stack trace - Wikipedia
In computing, a stack trace is a report of the active stack frames at a certain point in ... Language supportEdit. Many programming...
Read more >
Understanding and Leveraging the Java Stack Trace - Stackify
Simply put, a stack trace is a representation of a call stack at a certain point in time, with each element representing a...
Read more >
Analyze a stack trace - Android Developers
Open stack traces from external sources · Open your project in Android Studio. Note: Make sure the source code you're viewing is from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found