-
Notifications
You must be signed in to change notification settings - Fork 26
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
How to log arbitrary messages? #43
Comments
+1, I'd be happy to get the ball rolling with this as well. More specific implementation details: https://docs.rollbar.com/reference
|
@ash14 thanks for the +1. I'm thinking maybe we expand Would love to hear from someone at CircleCI about this as well. |
After looking at the docs a bit closer, these arbritrary messages can have arbritrary data as well. So it looks like the user-facing API should support either of these forms: (rollcage/error r err)
; "trace_chain": [{...}] (rollcage/warn r "Request over threshold of 10 seconds")
; "message": {
; "body": "Request over threshold of 10 seconds"
; } (rollcage/warn r "Request over threshold of 10 seconds" {:route "home#index"
:time_elapsed 15.23})
; "message": {
; "body": "Request over threshold of 10 seconds",
; "route": "home#index",
; "time_elapsed": 15.23
; } This adds some complication though... I'd start with getting a Protocols sound like a suitable implementation, yeah. |
+1 context params are extremely important and useful |
The Rollbar PHP SDK (just as an example) allows for logging arbitrary messages to Rollbar:
This is really useful for certain kinds of remote debugging situations, e.g. when you haven't been able to reproduce a production error yet and need more contextual information.
What I'd like to be able to do in Clojure is something like:
As far as I can tell, though, this would require a change to the API of the
core/notify
fn, which always expects aThrowable
. I think it makes sense to have the Rollcage internals know what to do withThrowable
instances when it sees them, but the current API seems to preclude certain valid use-cases of the wider Rollbar API. Or maybe I'm missing something?Edit: to be clear, I'm happy to submit a PR for widening the API, but I thought it would be best to discuss what that wider API would look first. Thoughts?
Thanks!
The text was updated successfully, but these errors were encountered: