-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support capturing stack trace #2163
Support capturing stack trace #2163
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2163 +/- ##
=====================================
Coverage 72.7% 72.8%
=====================================
Files 177 177
Lines 12126 12151 +25
=====================================
+ Hits 8825 8852 +27
+ Misses 3062 3060 -2
Partials 239 239
|
@Aneurysm9 @MrAlias Any pointers on how to expand this support for |
It strikes me that the decision to record a stack trace or not ought to be part of SDK configuration, not an instrumentation API. It's a lot like verbosity selection in the logging domain. It's on the same level as choosing your Histogram aggregator buckets in metrics, or sampler configuration to determine which spans record and which do not. |
@jmacd I think it might be both. I can see why an end user would want a simple way to manually trigger a stack trace. The At the same time, I agree with Josh that there probably needs to be a way to trigger stack trace collection from contrib/instrumentation packages, as there is no way for the end user/operator to control that behavior by writing code. Like Josh mentioned, controlling these features feels kind of similar to the rules-based methods we've been discussing for controlling sampling and creating views - "when you see this pattern, adjust what you are collecting." In general, it's hard to know in advance where you want to record a stack trace, so allowing an operator to control this type of behavior through a configuration language would probably be very valuable. |
I have added |
@Aneurysm9 @MrAlias @pellared addressed most comments! Have a look again. Thanks! |
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Add
WithStackTrace
option to add a stack trace when usingspan.RecordError
or when panic is handled inspan.End
.