# Rollbar

<figure><img src="https://3440602746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcCYilc27NCELgnKQNPVF%2Fuploads%2F2X5nvD9xs89yXP9SxBoN%2Fimage.png?alt=media&#x26;token=61cd3abc-7025-4807-967c-d21f0688c43b" 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="https://3440602746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcCYilc27NCELgnKQNPVF%2Fuploads%2FKvQ1cQW4lfsKXEqjJ1Tf%2Fimage.png?alt=media&#x26;token=4167a29c-6980-48e0-89bb-22e1d2fca803" 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zipy.ai/integration/rollbar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
