boostcamp-2020 / project11-a-web-fe-performance-monitoring-sdk Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
특정 에러의 위험도를 설정한다. 세팅에서 규정한 위험도보다 높을 때 메일이나 슬랙으로 알림을 보낸다.
unhandled rejection handling 기능 추가
catch 하지 않은 promise error 리포트 해줄 수 있도록 unhandled rejection handling 추가
에러가 발생했을 경우 해당 에러를 서버쪽으로 전송한다.
바닐라
express
react
try {
aFunctionThatMightFail();
} catch (err) {
Sentry.captureException(err);
}
// sentry-clone.js
let token; // <--
export default {
...
captureMessage: (error, level = 5) => {
axios.post(
'error 메세지 받는 URL',
{ error, level },
{ header: `Bearer ${token}`}
);
}
}
로그를 따로 기록하는 함수
// ~ YourCode ex) 로그인 기능코드 ~ //
Sentry.captureMessage(`${user.nickname}님이 로그인 하였습니다.`);
// ~ YourCode ~ //
export default {
...
captureMessage: (message, type = 'default') => {
if(!typeList.includes(type)){
throw new Error("지정되지 않은 타입입니다.")
}
axios.post(
'로그 메세지 받는 URL',
{ message, level },
{ header: `Bearer ${token}`}
);
}
}
웹 페이지를 사용하는 유저에 대한 정보를 전송한다.
- [ ] 접속한 유저의 os와 버전 ( 쳐내기 )
유저가 에러나 메세지를 보낼 때 까지 기록된 정보를 보낸다.
5주차 해도 되지만, 우리도 이쁘게 로고도 넣고 사용법도 넣읍시다.
NPM 배포에 관한 이슈
SDK 초기설정을 위한 함수
ProjectID, Public Key 등을 argument로 받으며, 기본 백엔드 주소 설정
uncaught exception handling 기능 추가
잡히지 않은 exception을 리포트 해줄 수 있는 uncaught exception 추가
One paragraph description of the feature.
할일
할일2
req, res 정보를 저장하여 서버로 전송한다.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.