日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
Sentry 開發(fā)者貢獻(xiàn)指南 - JavaScript SDK Minimal

簡(jiǎn)介

Sentry JavaScript SDK Minimal

站在用戶的角度思考問題,與客戶深入溝通,找到棲霞網(wǎng)站設(shè)計(jì)與棲霞網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:做網(wǎng)站、成都網(wǎng)站設(shè)計(jì)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、域名申請(qǐng)、網(wǎng)站空間、企業(yè)郵箱。業(yè)務(wù)覆蓋棲霞地區(qū)。

  • ??https://github.com/getsentry/sentry-javascript/tree/master/packages/minimal??

用法

要使用 ??minimal???,您不必初始化 ??SDK???。這應(yīng)該由您庫的用戶處理。而是直接使用 ??@sentry/minimal?? 的導(dǎo)出函數(shù)添加面包屑或捕獲事件:

import * as Sentry from '@sentry/minimal';

// 為未來的事件添加面包屑
Sentry.addBreadcrumb({
message: 'My Breadcrumb',
// ...
});

// 捕獲異常、消息或手動(dòng)事件
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
message: 'Manual',
stacktrace: [
// ...
],
});

請(qǐng)注意,雖然嚴(yán)格可行,但不鼓勵(lì)干擾事件上下文。如果由于某種原因您的庫需要注入上下文信息,請(qǐng)注意這可能會(huì)覆蓋用戶的上下文值:

// 設(shè)置用戶信息、標(biāo)簽和其他附加信息
Sentry.configureScope(scope => {
scope.setExtra('battery', 0.7);
scope.setTag('user_mode', 'admin');
scope.setUser({ id: '4711' });
// scope.clear();
});

測(cè)試用例

PASS  test/lib/minimal.test.ts
Minimal
Clear Scope (1ms)
returns undefined before binding a client (1ms)
returns the bound client (1ms)
Calls function on the client (1ms)
does not throw an error when pushing different clients (1ms)
does not throw an error when pushing same clients
custom carrier (1ms)
withScope (2ms)
setExtras (1ms)
setTags (1ms)
setExtra (1ms)
setTag
setUser (1ms)
setContext (1ms)
Capture
Return an event_id (4ms)
Exception (1ms)
Exception with explicit scope (1ms)
Message (1ms)
Message with explicit scope (1ms)
Message with custom level (2ms)
Event (1ms)
configureScope
User Context (2ms)
Extra Context (1ms)
Tags Context (1ms)
Fingerprint
Level (1ms)

分享標(biāo)題:Sentry 開發(fā)者貢獻(xiàn)指南 - JavaScript SDK Minimal
標(biāo)題路徑:http://www.5511xx.com/article/dpdodij.html