Coralogix

Get Zipy session url against error in Coralogix

1. Include Zipy session url in the metadata.

Put below code in the <head> tag of your site.

<script>
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 => {
  window.CoralogixRum.setUserContext({
    user_metadata: {
      zipySessionUrl : zipySessionUrl
    }
  })
})
.catch((e) => {
    console.log(e);
});
</script>

After adding this code in your site you should be able to send Zipy session in Coralogix.

2. Find Zipy session url in Coralogix

Go to Logs screen and select SEVERITY from the panel. Then click on Columns from the toolbar at top.

A pop up will be opened, find the Zipy session url metadata field there by typing 'zipy' in input area. Then drag the zipy session url metadata field from Available Fields to In Use. Then click on Apply button.

Now you should be able to see to Zipy session url in your Coralogix Logs screen.

Last updated