You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No designated place for traceback in message item #471
report a message item Rollbar::log(Level::INFO, 'Message from app');
Expected result
The trace back should be visible in the Rollbar item details page just as when reporting an exception.
Result
The trace back is not visible in the Rollbar item details page. It's under body.message.backtrace in unformatted and hard to read in occurrence details.
Impact across SDKs
This is a problem that will appear across other SDKs as well as currently we just don't support backtrace for message items. Support for that needs to be implemented.
@ArturMoczulski FWIW: at the API level, the current idea for these is that "message" items that contain tracebacks would be reported as tracebacks containing an explicit message. In those the message goes in trace.exception.description.
+1 Please, this would be really great and I personally need it to go alongside SQL errors that I catch, and can only get the backtrace to appear in occurrences as @ArturMoczulski mentions
Glad I'm not the only one suffering this issue, but so sad to see it's been like this for 4+ years!? I don't understand why the backtrace can't be used identically to what happens when there's an exception thrown? Is there any movement on this from the Rollbar PHP maintainers?
As a stopgap, are there any tools that can prettify the data contained in the backtrace field? I thought it was PHP serialized, but I'm unable to deserialize it, so I must be missing something.
The Rollbar backend is designed to accept different types of items. Typically, if you were to send a log message you would do something like this...
Rollbar::log(Level::INFO, 'Message from app');
However, what you send determines the "type" of item that is sent to the Rollbar backend by the SDK. If an exception is the item being sent a full stack trace is included by default.
This sends a log that contains a full stack trace...
Rollbar::log(Level::INFO, newException('Message from app'));
The main downside is that this shows up labeled "Exception: Message from app". This is probably not the ideal way to identify a "log" from your app. But this is also easy to change.
/** * Not intended for throwing, just for sending to Rollbar. */class BacktraceLog extends Exception {}
Rollbar::log(Level::INFO, newBacktraceLog('Message from app'));
This now creates a new item in Rollbar titled "BacktraceLog: Message from app". It includes a full stack trace and message that was logged.
Activity
brianr commentedon Sep 30, 2019
@ArturMoczulski FWIW: at the API level, the current idea for these is that "message" items that contain tracebacks would be reported as tracebacks containing an explicit message. In those the message goes in
trace.exception.description.zanderwar commentedon Apr 8, 2020
+1 Please, this would be really great and I personally need it to go alongside SQL errors that I catch, and can only get the backtrace to appear in occurrences as @ArturMoczulski mentions
zanderwar commentedon Apr 8, 2020
This is good enough for me atm
troygilbert commentedon Sep 5, 2023
Glad I'm not the only one suffering this issue, but so sad to see it's been like this for 4+ years!? I don't understand why the backtrace can't be used identically to what happens when there's an exception thrown? Is there any movement on this from the Rollbar PHP maintainers?
danielmorell commentedon Sep 15, 2023
Let me see if I can get this in either v4.1 or v4.2. For now, I will aim at v4.1.
troygilbert commentedon Jan 3, 2024
Any movement on this?
As a stopgap, are there any tools that can prettify the data contained in the backtrace field? I thought it was PHP serialized, but I'm unable to deserialize it, so I must be missing something.
danielmorell commentedon Oct 16, 2026
I was thinking about this and have a few ideas.
The Rollbar backend is designed to accept different types of items. Typically, if you were to send a log message you would do something like this...
However, what you send determines the "type" of item that is sent to the Rollbar backend by the SDK. If an exception is the item being sent a full stack trace is included by default.
This sends a log that contains a full stack trace...
The main downside is that this shows up labeled "Exception: Message from app". This is probably not the ideal way to identify a "log" from your app. But this is also easy to change.
This now creates a new item in Rollbar titled "BacktraceLog: Message from app". It includes a full stack trace and message that was logged.
danielmorell commentedon Nov 6, 2026
After an internal conversation we have determined to make this something supported by the core SDK. It will be resolved in v4.3.0.