Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Painless and agnostic front-end bug reporting. Collect logs, errors, clicks, and session data easily.

License

NotificationsYou must be signed in to change notification settings

perry-js/perry



Summary

Description

Perry.js is an Agnostic Bug Reporter tool that you can just plug in any website.

It allows you to record bug reports in web applications regardless of how they're built. It supports a programmatic API but also comes with a Preact Widget that can be loaded on the fly (thanks to Webpack Code Splitting).

You can learn more about it's capabilities athttps://perry-js.netlify.com/

Perry.js is still in active development and can be experimented in internal environments.

We still do not recommend Perry for log transporting, but we do recommend giving it a try for QA bug reporting.

You can find some implementation examples in these repo's:

More examples are being built currently too.

You can track these implementations here:#52

Getting started

Using a CDN

Disclaimer: We still didn't deployed Perry into a CDN.

Meanwhile, you can experiment using the current netlify build.

<scriptsrc="https://perry-js.netlify.com/bundle.js"></script><script>/* This is an example plugin for handling perry's report */functionConsoleLogPlugin(reportInfo){console.log("[Perry Report Info]:",reportInfo);console.log("[Perry Report Info]:",["","This was printed by the ConsoleLogPlugin.","It is implemented inline into this test page.","To know more about how to implement a Perry Plugin:","Checkout this page src code or the github repository."].join("\n"));alert(["[Perry Report Info]: Please check your console logs to see the recording report.","Sorry for the alert as well, we'll get rid of it soon! <3"].join("\n"));}/* Initialize Perry.js */constperry=newwindow.Perry({/* Enables log recording */log:true,/* Enables click recording */clicks:true,/* Enables screen recording */enableScreenRecording:true,/* Plugins are ways to handle the bug reporting submission */plugins:[ConsoleLogPlugin]});(async()=>{/* Starts Perry Recorder */awaitperry.start();/* Stops Perry Recorder */awaitperry.stop();/* Submit's Perry Report */awaitperry.submit({title:'test-report',description:'A test report'});/* You can aso render Perry Widget for UI Control */awaitperry.render();})();</script>

Using NPM

Disclaimer: We still didn't deployed Perry into NPM properly.

This documentation is stated here as a demonstration of how it will look like.

Installation

npm install --save perryjs

Usage

importPerryfrom'perryjs';/* This is an example plugin for handling perry's report */functionConsoleLogPlugin(reportInfo){console.log("[Perry Report Info]:",reportInfo);console.log("[Perry Report Info]:",["","This was printed by the ConsoleLogPlugin.","It is implemented inline into this test page.","To know more about how to implement a Perry Plugin:","Checkout this page src code or the github repository."].join("\n"));alert(["[Perry Report Info]: Please check your console logs to see the recording report.","Sorry for the alert as well, we'll get rid of it soon! <3"].join("\n"));}/* Initialize Perry.js */constperry=newPerry({/* Enables log recording */log:true,/* Enables click recording */clicks:true,/* Enables screen recording */enableScreenRecording:true,/* Plugins are ways to handle the bug reporting submission */plugins:[ConsoleLogPlugin]});(async()=>{/* Starts Perry Recorder */awaitperry.start();/* Stops Perry Recorder */awaitperry.stop();/* Submit's Perry Report */awaitperry.submit({title:'test-report',description:'A test report'});/* You can aso render Perry Widget for UI Control */awaitperry.render();})();

API

MethodSignatureDescription
constructornew Perry(options: PerryOptions): PerryReturns an instance of Perry.
notifyperry.notify(error: Error): Promise<void>A programatic API so you can let perry know of errors without it having to catch them. Useful when handling errors.
renderperry.render(): Promise<void>Fetches the Perry Widget component, appends a#perry-widget element into the document body and renders Perry Widget inside of it.
startperry.start(): Promise<void>Tries to start the perry watcher. If something goes wrong, it will stop it and throw an error.
stopperry.stop(): Promise<void>Stops the perry watcher.
submitperry.submit(reportInfo: IPerryReportInfo): Promise<IPerryReport>Aggregates the whole reporting session into the structure defined in theIPerryReport interface, invokes all plugins giving it as an argument and then returns it. Resolves after executing all the plugins configured.

Options

OptionDescriptionTypeDefault
logEnablesconsole.log() calls to be monitoredbooleanfalse
warnEnabledconsole.warn() calls to be monitoredbooleantrue
errorEnabledconsole.error() calls to be monitoredbooleantrue
clicksEnables a listener ondocument.onclick with screen and viewport informationbooleanfalse
cookiesReturns the customer browser cookies in the final reportbooleanfalse
localStorage (WIP)ReturnslocalStorage data in the final reportbooleanfalse
sessionStorage (WIP)ReturnssessionStorage data in the final reportbooleanfalse
clearOnReloadWill clear the perry store everytime you reload it's instancebooleanfalse
clearOnStartWill clear the perry store everytime you start a bug reporting sessionbooleantrue
ignoreScriptErrorsIgnore's external script error messages.booleanfalse
enableScreenRecordingEnables Screen Recording through the MediaDevices and MediaRecorder API's.booleantrue
pluginsAllows you to inject handlers for the reports generated by Perry. (e.g.: You can send data to your API using it).ReadonlyArray<(reportInfo: PerryReportInfo) => void>[]

Contributing

See the CONTRIBUTING.md file.

Collaborators

License

Perry is licensed under MIT.

Releases

No releases published

Packages

No packages published

Contributors7


[8]ページ先頭

©2009-2025 Movatter.jp