Category: Application Performance Management
This integration is only available for Web projects
What to expect
This integration will allow you to investigate Sentry sessions in Contentsquare.
What we collect
Dynamic Variables
| Key | Value | Data Type |
|
APM_ST_SessionID
|
{sessionID} | Text |
|
APM_ST_Insights Link
|
{Insights URL} | Text |
|
APM_ST_Issue Link
|
{Issue URL} | Text |
What we send
Session replay
To properly make use of the replay feature you need to either have 100% collection ratio or ETR (Event Triggered replay), please talk to your CSM about this.
Requirements
Implementation
Implementation Steps
Please go to the section How to request an integration to see the instructions to enable this integration. You can then return here once completed.
If you have already completed the step above then continue below.
If you have a self hosted version of Sentry then please provide your Sentry instance domain to our support team or inform your CSQ CSM to please pass it on to our support team to configure in your project. For example: customsentrydomain.com If you are using the sentry hosted domain then no need to configure it.
The above will be used to generate links from CSQ to your Sentry instance. See usage instructions below the following text.
Depending on which version of Sentry SDK you have installed, will determine whether you need to configure the rest of the code below or not.
To determine whether to configure the code below, please open your website to where you have a Sentry tag running and in the console of the site please check for the following to both be true:
Copy and paste this into the console and press enter
!!window.Sentry
Repeat the same for this also
typeof Sentry.addEventProcessor === "function"
You should see this
If the 2nd check above does not return true the you need to configure the code below as it means you have an older unsupported version of the SDK. If the 1st check above returns false then it means you don't have the Sentry Javascript tag there at all so will need to see the requirements near the start of this document.
If you have an outdated version of the Sentry SDK then resume below.
You will need to add code to your existing Sentry Javascript tag that is injected into your site. Specifically in the Sentry.init function.
Note that the code below is something you should already have but you will need to perhaps add the beforeSend function and then inside it simply add the Contentsquare part of the code.
Sentry.init({
dsn: "--DSN--",
tracesSampleRate: 1.0,
beforeSend(event, hint) {
/*
* Name: Sentry / Contentsquare Integration
*Version: 2.0.0
*/
const evt = new window.CustomEvent("Contentsquare_Sentry_Integration", {
detail: event,
});
window.dispatchEvent(evt);
//End Contentsquare Integration
return event;
},
});
Verifying it works
You can use the chrome extension to check the results are sent to CS
- Note that you will only see a replay link for those users who had replays created by Contentsquare.
- The % depends on the ratio your account has, you can have that increased by talking to your CSM.
Go to Issues then find any random issue you see and click on it. You can also find this in the Performance section if you have that enabled.
Inside the details of the issue you will see Contentsquare ReplayLink and SessionID.