Zipy
  • Welcome to Zipy ai
  • Getting Started
    • Install Zipy
    • Installing with Google Tag Manager
    • Supported frameworks
    • Security Overview
    • Sensitive User Data
    • SOC2 Type II
  • Zipy For Mobile
    • React Native Setup
      • Install React Native
      • Input Masking
      • Session Replay
      • Screen Transition Capture
      • Gesture Capturing
      • Unhandled Exception Capture
      • Custom Logging
      • Fetch and XHR Network Calls
      • Profiling
      • Device Information Capture
      • Session URL Retrieval
      • Identify Users
      • Firebase Integration
    • Flutter Setup
      • Install Flutter
      • Session Replay
      • Input Masking & Custom Masking
      • Screen Transition Capture
      • Gesture Capturing
      • Unhandled Exception Capture
      • Custom Logging
      • Http Network Calls
      • Dio Network Calls
      • Profiling
      • Device Information Capture
      • Session URL Retrieval
      • Identify Users
      • Firebase Integration
      • Session Recording Control
      • Data Sanitization
  • iOS Setup
    • Install in an iOS app
    • Identify Users
    • Screen Tracking & Tagging
    • Custom Logging
    • Session URL Retrieval
    • Session Recording Control
    • Input Masking & Custom Masking
  • Chrome Extension
    • Zipy Plug and Play Support
  • Configure
    • Zipy Recording Control
    • Release Version
    • Identifying Users
    • Adding Custom Identifiers
    • Anonymize Users
    • Source Maps
    • Blocking PII data
    • Ignoring Errors/Noise
    • npm Update
    • Support Integration
    • Session Stitching (rootDomain)
  • Product Features
    • Custom Events
    • Session Replay
    • Errors
    • Analytics
    • Time Filters
    • Multiple Filters
    • Clicked Element Filters
    • Manage Teams
    • Stack Trace
    • Console Logs
    • Network Requests
    • Network Headers and Payload
    • Custom Logs
    • Live Users
    • Alerts
      • Slack Alerts
      • Email Alerts
      • Live Alerts
      • Custom Alerts
    • Auto Resolve Errors
    • Zipy Labels Plugin
    • iFrame Support
    • API Performance
    • Heatmaps
    • Page Performance
    • Seen/Unseen Sessions
    • Public Session URL
  • FAQs
    • Install Zipy
    • Session Replay Definition
    • Error Tracking
    • Error Classification
    • Environment Support
    • Impact on your App
    • Performance Impact
    • Mobile Support
    • Network Data Capture
    • API Performance Diagnostic Help
      • High DNS Time
      • High SSL Connection Time
      • High Connection Setup Time
      • Large API Response Size
      • High Response Time
      • Compression Not Enabled
      • Server side API Failures
      • Client side API Failures
      • Insecure Connections
  • Troubleshooting
    • Errors in npm
    • Network header missing in Zipy
    • Can't see user data in sessions
    • No recordings or errors visible
    • No network timing split available
  • Product Videos
    • Ask AI
    • Getting Started
    • Session Replay
    • Multiple Project Creation
    • Team Management
    • Alerting on Slack
    • Time Filters and Daily Alerts
    • Custom Identifiers
    • Ignore Errors
    • Identify Users
    • Dashboard
    • Resolve Errors
    • New Error Digest
    • Jira and Slack
    • Online/Offline Network Status
    • Zipy on Zipy
      • Zipy Product Roadmap
  • Whats new
    • Product Updates
  • Legal & Policy
    • Terms of Service
    • Privacy Policy
    • Fulfillment Policy
    • Cookie Policy
    • Acceptable Usage Policy
    • Zipy Sub Processor List
  • Integration
    • Azure DevOps
    • Factors
    • RB2B
    • Webflow
    • WordPress
    • Amplitude
    • Coralogix
    • DevRev
    • Drift
    • Errorception
    • Freshchat
    • Google Analytics
    • Heap
    • HelpScout
    • Honeybadger
    • Hubspot
    • Intercom
    • Mixpanel
    • New Relic
    • Pendo
    • Raygun
    • Rollbar
    • Segment
    • Sentry
    • Shopify
    • Sumo Logic
    • TrackJS
    • Zendesk
Powered by GitBook
On this page
  • zipy.logMessage(message, [info])
  • zipy.logException(error)
  • zipy.logError(errorType, errorMessage, [category], [errInfo])
  1. Product Features

Custom Logs

How can I send custom logs to Zipy from my app?

In addition to capturing your application’s standard logs, JS exceptions & Network errors, Zipy allows you to log custom messages, JS exceptions and application errors to enable you to capture messages & issues that may be specific to your application.

To enable that, Zipy supports three different methods in its SDK.

  • zipy.logMessage

  • zipy.logException

  • zipy.logError

Let’s look at the method signature, sample usage and Zipy App views for each of these methods to understand how to use them in your application to make your troubleshooting even more effective.

zipy.logMessage(message, [info])

Capture custom messages and report to Zipy with this method.

Following are the Method Parameters:

Name

Type

Description

message

String

Any custom message that you would like Zipy to log

info

JSON object

A JSON object which specifies additional details that you would like to log along with the message. (Optional)

Example usage:

// Script
window.zipy.logMessage("Something went wrong", { 
     module: "Auth module"
})
// NPM
zipy.logMessage("Something went wrong", { 
     module: "Auth module"
});

How can I view custom logged messages in the Zipy App?

All your custom logged messages will be visible in the Zipy App’s Error Context & Session Context screen’s “Zipy Logs” tab in Dev Tools as indicated by this screen grab:

zipy.logException(error)

Log Javascript Exceptions at any point in your application code and report to Zipy

Following are the Method Parameters:

Name

Type

Description

error

Error object

Javascript Error object

Example usage:

A common usage of this method would be after you encounter buggy code in a try...catch block. zipy.logException could be used in the catch block to log the exception that you can

// Script
try {
    buggyCode();
} catch (err) {
    window.zipy.logException(err);
}
// NPM
try {
    buggyCode();
} catch (err) {
    zipy.logException(err);
}

How can I view custom logged exceptions in the Zipy App?

All your custom logged Exceptions will be visible as normal Javascript Exceptions in the Error dashboard as well as the Zipy App’s Error Context & Session Context screen’s “Stack trace” tab in Dev Tools.

How can I search for custom logged exceptions in the Zipy App?

You can use Zipy’s Advanced Filtering to search for custom logged exceptions just like you would search for other Javascript Exceptions.

zipy.logError(errorType, errorMessage, [category], [errInfo])

Log your custom application errors with your custom Error Name and Error Message

Following are the Method Parameters:

Name

Type

Description

errorType

String

Your custom Error Type

errorMessage

String

Your custom Error Message

category

String

One of Frontend (FE) or Network (NE) Defaults to Frontend

(Optional)

errInfo

JSON object

A JSON object with additional information about the error

(Optional)

Example usage:

The usage of this method depends on your application code. You may want to log an error that is not a standard Javascript exception or Network error, but is important for your application.

E.g.: If your application Frontend code has requested a user operation to your Backend via an API call, the Backend might be responding with a 200 OK response, but indicating to the Frontend in the response body that the delete has failed. It would be useful to capture this failure which can be done with the zipy.logError method

// Script
//xhr call to Backend
//check response code
//use zipy.logError
window.zipy.logError("FrontEndIssue", "Grid not rendered", "FE", {
  failed_project_ids: [34, 67, 88]
})
// NPM
//xhr call for delete
//check response code
//use zipy.logError

zipy.logError("APIFailure", "Delete project failed", "NE", {
  failed_project_ids: [34, 67, 88]
})

How can I view custom logged errors in the Zipy App?

All your custom logged Errors will be visible as normal Javascript Exceptions in the Error dashboard as well as the Zipy App’s Error Context & Session Context screen’s “Zipy Logs” tab in Dev Tools a shown by the screen grabs below:

How can I search for custom logged errors in the Zipy App?

You can use Zipy’s Advanced Filtering to search for custom logged errors based on the Error Type and the Error Message that you provided. Use the “Error Type” and “Error Context” filters in the Error filtering to look for your custom Error Type and custom Error Message respectively.

PreviousNetwork Headers and PayloadNextLive Users

Last updated 11 months ago