npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@grafana/faro-instrumentation-replay

v2.2.2

Published

Faro instrumentation for session replay with rrweb

Downloads

9,279

Readme

@grafana/faro-instrumentation-replay

Faro instrumentation for session replay with rrweb.

Installation

npm install @grafana/faro-instrumentation-replay

Usage

import { ReplayInstrumentation } from '@grafana/faro-instrumentation-replay';
import { getWebInstrumentations, initializeFaro } from '@grafana/faro-web-sdk';

initializeFaro({
  url: 'https://your-faro-endpoint.com',
  instrumentations: [
    ...getWebInstrumentations(),
    new ReplayInstrumentation({
      maskInputOptions: {
        password: true,
        email: true,
      },
      maskAllInputs: false,
      recordCrossOriginIframes: false,
    }),
  ],
});

Configuration Options

Privacy & Masking Options

  • maskAllInputs (default: false): Whether to mask all input elements
  • maskInputOptions (default: { password: true }): Fine-grained control over which input types to mask. Available options:
    • password - Password inputs
    • text - Text inputs
    • email - Email inputs
    • tel - Telephone inputs
    • number - Number inputs
    • search - Search inputs
    • url - URL inputs
    • date, datetime-local, month, week, time - Date/time inputs
    • color - Color inputs
    • range - Range inputs
    • textarea - Textarea elements
    • select - Select dropdowns
  • maskTextSelector: Custom CSS selector to mask specific elements
  • blockSelector: CSS selector to completely block elements from recording
  • ignoreSelector: CSS selector to ignore specific elements

Recording Options

  • recordCrossOriginIframes (default: false): Whether to record cross-origin iframes
  • recordCanvas (default: false): Whether to record canvas elements
  • collectFonts (default: false): Whether to collect font files
  • inlineImages (default: false): Whether to inline images in the recording
  • inlineStylesheet (default: false): Whether to inline stylesheets

Hooks

  • beforeSend: Custom function to transform or filter events before they are sent. Return the modified event or null/undefined to skip sending

Privacy and Security

This instrumentation records user interactions on your website. Make sure to:

  1. Enable appropriate masking options - By default, only password inputs are masked. Configure maskInputOptions to mask additional sensitive fields
  2. Use CSS selectors - Use maskTextSelector to mask sensitive content, blockSelector to completely exclude elements
  3. Implement filtering - Use the beforeSend hook to filter or transform events before sending
  4. Review your privacy policy - Ensure you have proper user consent for session recording
  5. Test your configuration - Verify no sensitive information is captured in recordings

Example: Advanced Privacy Configuration

new ReplayInstrumentation({
  // Mask all text and email inputs, but allow number inputs
  maskInputOptions: {
    password: true,
    text: true,
    email: true,
    tel: true,
    textarea: true,
  },
  // Mask elements with specific CSS classes
  maskTextSelector: '.sensitive-data, .pii',
  // Block elements completely from recording
  blockSelector: '.payment-form, .credit-card-info',
  // Ignore certain elements (won't be recorded at all)
  ignoreSelector: '.analytics-widget',
  // Filter or transform events before sending
  beforeSend: (event) => {
    // Example: Skip events that might contain sensitive data
    if (event.type === 3 && event.data?.source === 'CanvasMutation') {
      return null; // Skip this event
    }
    return event; // Send the event as-is
  },
});