> For the complete documentation index, see [llms.txt](https://docs.zipy.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zipy.ai/integration/rollbar.md).

# Rollbar

<figure><img src="/files/zf10fPg9C7hJ1WnB4cvE" alt=""><figcaption></figcaption></figure>

Add a Zipy session URL to every Rollbar exception report.

```javascript
const getCurrentZipySessionURL = async () => {
  return await new Promise(function(resolve, reject) {
      let i = 0;
      const _interval = setInterval(() => {
          let zipySessionUrl = (window)?.zipy?.getCurrentSessionURL();
          
          if(zipySessionUrl){
              resolve(zipySessionUrl);
              clearInterval(_interval);
          }
          else{
              i++;
              if(i >= 4){
                reject("Some problem occured while loading zipy.");
                clearInterval(_interval);
              }
          }
      },1500);
  });
}

getCurrentZipySessionURL()
.then(zipySessionUrl => {
    Rollbar.configure({
        transform: function (obj) {
            obj.zipySessionUrl = zipySessionUrl;
        },
    });
})
.catch((e) => {
    console.log(e);
});
```

This code waits for zipy to get initialized and then adds zipy session url in Rollbar configuration so that when a error occurs zipy session url gets attached with error data and can be seen in rollbar error context as the value of `zipySessionURL` .

<figure><img src="/files/hoAZmxWossEkIQN879C2" alt=""><figcaption><p>Zipy session url in Rollbar</p></figcaption></figure>

Zipy session url inside rollbar can be useful for associating errors with specific user sessions or other contextual information that is not captured by default. By adding a custom property like `zipySessionURL` to the error payload, you can make it easier to track down and diagnose errors that are specific to certain user sessions or contexts.
