Star us on GitHub
Star
Menu

Filtering Sessions

highlight.io allows you to filter sessions that you don't want to see in your session feed. This is useful for sessions that you know are not relevant to your application, or that are not actionable.

Filtered sessions do not count towards your billing quota.

Set up ingestion filters

You can set up ingestion filters by product to limit the number of data points recorded. You can filter sessions, errors, logs, or traces in the following ways:

  • Sample a percentage of all data. For example, you may configure ingestion of 1% of all sessions. For each session we receive, we will make a randomized decision that will result in storing only 1% of those. The random decision is based on the identifier of that product model for consistency. With traces, the Trace ID is used to make sure all children of the same trace are also ingested.
  • Rate limit the maximum number of data points ingested in a 1 minute window. For example, you may configure a rate limit of 100 sessions per minute. This will allow you to limit the number of sessions recorded in case of a significant spike in usage of your product.
  • Set up an exclusion query. For example, you may configure an exclusion query of environment: development. This will avoid ingesting all sessions tagged with the development environment.

With these filters, we will only bill you for data actually retained. For instance, setting up ingestion of only 1% of all sessions will mean that you will be billed only for 1% of all sessions (as measured by our definition of a session). You can configure the filters on your project settings page in highlight.

Filter sessions by user identifier

In some cases, you may want to filter sessions from a specific user. You can do this by adding the user identifier to the "Filtered Sessions" input under the "Session Replay" tab in your project settings. Please note that we use the identifier (or first argument) sent in your H.identify method to filter against (SDK docs here).

Filtering sessions without an error

If you're using Highlight mostly for error monitoring, customize the ingest filters in your project settings to only record sessions with an error by setting the Has Error: false filter.

Filtering sessions using custom logic

If you'd like to filter sessions based on custom logic (e.g. filtering sessions from users who have not logged in), use the manualStart flag in your H.init configuration. This will allow you to start and stop a session at your discretion.

H.init({ manualStart: true, // ... other options })
Copy

Then you can manually start a session by calling H.start:

useEffect(() => { if (userIsLoggedIn) { H.start() } }, [userIsLoggedIn])
Copy
Disable all session recording

If you're interested in using Highlight for the error monitoring or logging products without session replay, use the follow setting:

import { H } from 'highlight.run'; H.init('<YOUR_PROJECT_ID>', { disableSessionRecording: true, // ... });
Copy
Want to filter something else?

If you'd like an easier way to filter specific types of sessions, we're open to feedback. Please reach out to us in our discord community.