Welcome to Highlight
Getting Started
Overview
Backend / Server
Client / Frontend
Fullstack Frameworks
Tips
Content-Security-Policy
Local Development
Monkey Patches
Performance Impact
Proxying Highlight
Session Search Deep Linking
Troubleshooting
Upgrading Highlight
Session Replay
Console Messages
HTML iframe Recording
Identifying Users
Live Mode
Network DevTools
Privacy
Rage Clicks
Recording Network Requests and Responses
Session Sharing
Session Shortcut
Tracking Events
Versioning Sessions
Error Monitoring
Grouping Errors
Sourcemaps
Versioning Errors
Product Features
Alerts
Analytics
Canvas
Comments
Environments
Frontend Observability
Keyboard Shortcuts
Performance Data
Segments
Session Search
Team Management
User Feedback
Web Vitals
WebGL
Integrations
Amplitude Integration
Clearbit Integration
Electron Integration
Front Plugin
Intercom Integration
Linear Integration
Mixpanel Integration
React.js Integration
Segment Integration
Sentry Integration
Slack Integration
Vercel Integration
highlight.run Changelog
5.0.0
5.0.1
5.1.0
5.1.1
5.1.2
5.1.3
5.1.4
5.1.5
Menu

Local Development

Disable Highlight

Highlight will not run if H.init() is not called or projectId is undefined. For most people, you don't want to record sessions from localhost

Here's an example of disabling Highlight while developing locally with H.init():

if (process.env.ENVIRONMENT !== 'dev') { H.init('<YOUR_PROJECT_ID') }
Copy

Here's an example of disabling Highlight while developing locally with environment variables:

H.init(process.env.HIGHLIGHT_PROJECT_ID) // process.env.HIGHLIGHT_PROJECT_ID is undefined.
Copy
Console Log Messages

Highlight monkey patches the browser's console methods in order to record console messages. A side effect of this is that all the console messages' initiators will point to Highlight. This can make debugging hard because you can't see where console messages are coming from.

To prevent this from happening, you can:

  1. Don't run Highlight locally

  2. Disable console message recording locally

Here's an example of how you disable console message recording locally.

H.init('<YOUR_PROJECT_ID', { disableConsoleRecording: process.env.ENVIRONMENT === 'dev', })
Copy