-
Notifications
You must be signed in to change notification settings - Fork 3
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
Expose mechanism to hide from stack trace #59
Expose mechanism to hide from stack trace #59
Conversation
Codecov Report
@@ Coverage Diff @@
## main #59 +/- ##
=========================================
Coverage 94.40% 94.40%
Complexity 52 52
=========================================
Files 13 13
Lines 125 125
Branches 8 8
=========================================
Hits 118 118
Misses 6 6
Partials 1 1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@@ -13,6 +13,7 @@ internal object StackTraceTagGenerator : TagGenerator { | |||
private val stackTraceLineMatcher = Regex("""^\s{4}at (\w+)\..*$""") | |||
|
|||
override fun getTag(): String { | |||
// FIXME: This should implement support for [HideFromStackTrace] instead of hard-coding a known depth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably get this working before we do a release, right?
If so, it is likely deserving of a ticket so we can mark it with a milestone (to make sure we don't miss it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now this can't be fixed, because the JS stack trace is 1) slightly different for different browsers, and 2) does not provide full package names on any of them (are packages even a concept in JS?). Regardless, the net effect is that we need support from the Kotlin compiler.
After this is merged I'll file an issue so we can at least track it. We can also discuss workarounds in that as a thread. Either way, I don't think this is a release blocker.
Exposes a mechanism to hide a class from the automatic tag stack trace on JVM. As an example of where this is useful, a library might make a custom
Log
object that automatically adds metadata to every call. By providing this interface, doing so will not come at the cost of ruining the tag associated with the call.