stayallive / wp-sentry

A (unofficial) WordPress plugin reporting PHP and JavaScript errors to Sentry.
https://wordpress.org/plugins/wp-sentry-integration/
MIT License
300 stars 48 forks source link

Session Reply support #152

Closed uhlhosting closed 1 year ago

uhlhosting commented 1 year ago

Hi,

https://docs.sentry.io/platforms/javascript/session-replay/ this is new recently released to self hosted too.

according to the docs to deploy it should be very simple:

Adding Session Replay to your Browser JavaScript project is simple. Make sure you've got these basics down.

Install

For the Session Replay to work, you must have the Sentry browser SDK package, or an equivalent framework SDK (e.g. @sentry/react) installed, minimum version 7.27.0.

Using yarn

yarn add @sentry/browser

Using npm

npm install --save @sentry/browser

Configure

Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set using the integrations constructor. Learn more about configuring Session Replay by reading the configuration docs.

import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "https://3c4201a5f51a433b8605c391aee8d4ef@sentry.uhlhost.net/9",

  // This sets the sample rate to be 10%. You may want this to be 100% while
  // in development and sample at a lower rate in production
  replaysSessionSampleRate: 0.1,
  // If the entire session is not sampled, use the below sample rate to sample
  // sessions when an error occurs.
  replaysOnErrorSampleRate: 1.0,

  integrations: [new Sentry.Replay()],
});
Waiting for this project's first user session
stayallive commented 1 year ago

I'll direct you to #145 for now 👍