Fixing errors is much easier when you know how they occurred, but this may not always be the case. Once the software is delivered, you're at the mercy of your customers, who may not always report crashes.
When your code crashes, you log the error in a log file, continuing the process of developers tracking the occurrence of the error by looking at the log file. Guessing the root cause of a crash from the log files can cost you a lot of valuable time.
Is there an easier way to troubleshoot the cause of errors in software applications? Raygun provides an interesting set of solutions for keeping an eye on errors when they occur in your web and mobile applications.
According to official documentation, Raygun provides:
Complete understanding of user issues and workflow tools to resolve them quickly as a team.
Raygun provides four tools that make it easier for you to handle errors and crashes in your applications:
Raygun crash reporting tool helps you monitor and replicate every crash and error that occurs in your application.
Real user monitoring tools help capture each user session and other relevant information to measure user experience.
User tracking tool helps classify crashes and bugs based on app users.
Raygun Deployment Tracking Tool makes it easier for you to track each release and shows you how it affects the overall performance of your software application.
In this tutorial, you will learn how to integrate the Raygun tool with your web application to monitor and track errors. In this tutorial, you will integrate the Raygun tool with an Angular web application.
Raygun Getting Started
You can use Raygun with a variety of programming languages and frameworks. In this tutorial, we will see how to start using Raygun with Angular web applications.
First, you need to create an account on Raygun. After creating your account, you will see a screen to select your preferred language or framework.
In this tutorial, you will learn how to start using Raygun on your Angular web application.
Using Angular with Raygun
From the list of frameworks, select the Angular framework. You will see a screen where you can choose Angular (v2 ) or Angular1.x.
Since you will learn how to integrate Raygun with Angular 4, keep an eye on the tab Angular (v2) .
Before integrating Raygun with Angular, you need to create an Angular application. Let's start creating an Angular application.
First, you need to install Angular CLI globally.
npm install -g @angular/cli
Create Angular applications using Angular CLI.
ng new AngularRaygun
You will create an Angular application and install the required dependencies.
Navigate to the project directory and start the application.
cd AngularRaygun
npm start
You will run the application on http://localhost:4200/.
Install the raygun4js library using Node Package Manager (npm). 图>
npm install raygun4js --save
In the src/config folder, create a file named app.raygun.setup.ts.
Copy the setup code from step 2 of <code class="inline">Angular (v2) and paste it into the app.raygun.setup.ts file.
Import
RaygunErrorHandler inside the Angular application in the app.module.ts file and add the custom error handler. Here is what the app.module.ts file looks like:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { ErrorHandler } from '@angular/core';
import { RaygunErrorHandler } from '../config/app.raygun.setup';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule
],
providers: [{
provide: ErrorHandler,
useClass: RaygunErrorHandler
}],
bootstrap: [AppComponent]
})
export class AppModule { }
Now you have added a custom error handler
RaygunErrorHandler which will handle errors.
Let's add some code to create the error. Import
Router in the app.component.ts file.
import { Router } from '@angular/router';
Modify the construction method as follows:
constructor(private router: Router) {}
The above code will throw an error when you run the application because it has not been imported into the AppModule. Let’s see how Raygun catches errors. Save the above changes and restart the application.
Point your browser to http://localhost:4200. Check the browser console and you will get errors logged.
Raygun Dashboard
When you run the application, an error will be logged in the browser console.
The above is the detailed content of Raygun: Enhance web and mobile applications with error and performance monitoring. For more information, please follow other related articles on the PHP Chinese website!
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.
Python and JavaScript have their own advantages and disadvantages in terms of community, libraries and resources. 1) The Python community is friendly and suitable for beginners, but the front-end development resources are not as rich as JavaScript. 2) Python is powerful in data science and machine learning libraries, while JavaScript is better in front-end development libraries and frameworks. 3) Both have rich learning resources, but Python is suitable for starting with official documents, while JavaScript is better with MDNWebDocs. The choice should be based on project needs and personal interests.
The shift from C/C to JavaScript requires adapting to dynamic typing, garbage collection and asynchronous programming. 1) C/C is a statically typed language that requires manual memory management, while JavaScript is dynamically typed and garbage collection is automatically processed. 2) C/C needs to be compiled into machine code, while JavaScript is an interpreted language. 3) JavaScript introduces concepts such as closures, prototype chains and Promise, which enhances flexibility and asynchronous programming capabilities.
Different JavaScript engines have different effects when parsing and executing JavaScript code, because the implementation principles and optimization strategies of each engine differ. 1. Lexical analysis: convert source code into lexical unit. 2. Grammar analysis: Generate an abstract syntax tree. 3. Optimization and compilation: Generate machine code through the JIT compiler. 4. Execute: Run the machine code. V8 engine optimizes through instant compilation and hidden class, SpiderMonkey uses a type inference system, resulting in different performance performance on the same code.
JavaScript's applications in the real world include server-side programming, mobile application development and Internet of Things control: 1. Server-side programming is realized through Node.js, suitable for high concurrent request processing. 2. Mobile application development is carried out through ReactNative and supports cross-platform deployment. 3. Used for IoT device control through Johnny-Five library, suitable for hardware interaction.
I built a functional multi-tenant SaaS application (an EdTech app) with your everyday tech tool and you can do the same.
First, what’s a multi-tenant SaaS application?
Multi-tenant SaaS applications let you serve multiple customers from a sing
This article demonstrates frontend integration with a backend secured by Permit, building a functional EdTech SaaS application using Next.js. The frontend fetches user permissions to control UI visibility and ensures API requests adhere to role-base
JavaScript is the core language of modern web development and is widely used for its diversity and flexibility. 1) Front-end development: build dynamic web pages and single-page applications through DOM operations and modern frameworks (such as React, Vue.js, Angular). 2) Server-side development: Node.js uses a non-blocking I/O model to handle high concurrency and real-time applications. 3) Mobile and desktop application development: cross-platform development is realized through ReactNative and Electron to improve development efficiency.
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.