rollbar.js
rollbar.js copied to clipboard
Sending metadata/custom payload with my log
Hello!
I am using a Javascript / Browser JS integration of rollbar and would simply like to send custom payload (JS) objects which are not stringified, so I can easily understand it.
Is this possible? I have guessed and checked as well as verified docs (https://docs.rollbar.com/docs/browser-js) but nothing points to it.
The best I can get is stringifying an object but then it prints out very un-pretty so it's difficult to understand.
Similar past issue in rollbar-php -> https://github.com/rollbar/rollbar-php/issues/431#issue-394311186
I have checked that the custom / extra fields do show up in the transform
function but just don't show up in Rollbar when I go to see my logs
Thank you, Mihai
Quick followup:
This looks like what I would like to do but my rollbar instance does not have the function scope
available. I am using the latest version (2.25.2)
And for: Rollbar.info("User logged in", {loginType: "email+password"});
..
The arbitrary
params do not come through the logs for me
Example:

Rollbar logs:

and

After hours of trying to figure out and guessing different commands, I found out that the custom data is passed and viewed in the Occurences tab

Honestly, this is extremely frustrating and also - why not format the data directly into the log timeline itself? at the very least, have a link from the main timeline that suggests where this custom data is because it's critical and it's practically hidden/very very very frustrating...
This also does not appear to be documented anywhere at all.