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

@dynatrace/react-native-session-replay

v0.351.1

Published

Session Replay for Dynatrace React Native Plugin

Readme

Dynatrace Session Replay for React Native

Session Replay records what users see in your React Native app, so you can replay their sessions in Dynatrace. It is an add-on to @dynatrace/react-native-plugin. Full documentation: Configure Session Replay for React Native.

Preview. Session Replay for React Native is available as a preview. Register for the preview program to use it. It is not available for RUM Classic or Dynatrace Managed; the preview is available with the latest Dynatrace and DPS licensing. In 0.x versions, any minor version can contain breaking changes. npm's default ^0.x.y range only takes patch updates, so move to a new minor version by hand.

Requirements

  • Dynatrace version 1.303 or newer, registered for the Session Replay for React Native preview program
  • @dynatrace/react-native-plugin 2.349.1 or newer, set up and working in your app
  • React Native 0.67 or newer, React 16.11 or newer
  • Android API level 23 or newer, iOS 15 or newer

Installation

  1. Turn on Session Replay for your app in Dynatrace: Experience Vitals > Overview > Mobile > your frontend > Settings > Enablement and cost control.
  2. Add the package. On iOS, also run CocoaPods:
npm install @dynatrace/react-native-session-replay
cd ios && pod install

The native agent versions come from the installed @dynatrace/react-native-plugin, so both packages always use the same agent.

Usage

Session Replay starts with the native agent and records when the native configuration enables it (Session Replay turned on for your app in Dynatrace, and the user's privacy settings allow it).

Installing the package is enough. The Dynatrace Babel plugin loads it for your app when it is installed, so navigation and list reloads (FlatList, SectionList) are captured without any import or setup code.

The plugin decides this while Metro transforms React Native, and Metro caches the result. After you install or remove this package, restart Metro with --reset-cache (for example npx react-native start --reset-cache). The package must also be reachable from react-native (in a monorepo, hoisted next to it); otherwise it is not loaded automatically and you need the explicit import below.

Older @dynatrace/react-native-plugin versions do not load the package for you. Add import '@dynatrace/react-native-session-replay'; to your entry file (for example index.js) so it loads at startup. You need an explicit import anyway when you use SessionReplay.setMaskingConfiguration(), DTMask or DTWithMask, as shown below.

SessionReplay.configure() is no longer needed. Existing calls keep working but have no effect, so you can delete them.

configure({ enabled: false }) no longer opts out. It used to stop the JS-driven captures (navigation, list reloads) and JS events, though never native recording. It is now ignored. To stop recording, use the privacy options (screenRecordOptedIn in Dynatrace.applyUserPrivacyOptions), or leave Session Replay off in the native configuration.

Masking

There are three masking levels:

  • Safest: all editable text fields, images, labels, WebViews and switches are masked.
  • Safe: all editable text fields and WebViews are masked.
  • Custom: starts like Safest, then you choose which view types are masked.

Until you set a level, the native agent's masking defaults apply. Set it with SessionReplay.setMaskingConfiguration(). You can call it at any time, including at startup: it is applied as soon as the native agent is up.

import { SessionReplay, MaskingConfiguration, MaskableView } from '@dynatrace/react-native-session-replay';

SessionReplay.setMaskingConfiguration(MaskingConfiguration.Safest());

// Mask only TextInput fields
SessionReplay.setMaskingConfiguration(
    MaskingConfiguration.Custom()
        .removeAllMaskedViews()
        .addMaskedViews([MaskableView.TextInput])
);

MaskableView covers TextInput, Text, Image, WebView and Switch. TextInput components with secureTextEntry are always masked.

To mask one component regardless of the level, wrap it in DTMask, or create a masked version with DTWithMask:

import { Text, TextInput } from 'react-native';
import { DTMask, DTWithMask } from '@dynatrace/react-native-session-replay';

<DTMask>
    <Text>Sensitive data</Text>
</DTMask>;

const MaskedTextInput = DTWithMask(TextInput);

Custom events

Navigation and list reloads (FlatList, SectionList) are captured automatically. To capture another moment, track a custom event:

SessionReplay.trackCustomEvent('User logged in');

Logs

Session Replay logs are part of the @dynatrace/react-native-plugin logs. To turn on debug logs, set react: { debug: true } in dynatrace.config.js.

Changelog

0.351.1

  • SessionReplay.configure() is deprecated and has no effect. Session Replay is enabled by the native configuration alone, and no JavaScript setup is needed.
  • Behavior change: SessionReplay.configure({ enabled: false }) is now ignored and no longer stops the JS-driven captures. Use the privacy options (screenRecordOptedIn) to stop recording.
  • The Dynatrace Babel plugin loads the package when it is installed, so no import is needed (requires a @dynatrace/react-native-plugin release that includes this change). Restart Metro with --reset-cache after installing or removing the package.
  • The startup log line now says the package is loaded instead of enabled; whether replay records is decided by the native agent.
  • SessionReplay.setMaskingConfiguration() is no longer ignored before configure(); it is applied once the native agent is up.

0.349.1

  • First public preview release