Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
monitor-sdk/index.html at master · WebGuardMonitor/monitor-sdk · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
WebGuardMonitor
monitor-sdk
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
monitor-sdk
/
index.html
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
175 lines (152 loc) · 5.49 KB
master
Breadcrumbs
monitor-sdk
/
index.html
Copy path
Top
File metadata and controls
Code
Blame
175 lines (152 loc) · 5.49 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!doctype html
>
<
html
lang
="
en
"
>
<
head
>
<
meta
charset
="
UTF-8
"
/>
<
title
>
Title
</
title
>
<
link
rel
="
stylesheet
"
href
="
index.css
"
/>
<
script
src
="
http://localhost:1024/web.browser.js
"
crossorigin
="
anonymous
"
>
</
script
>
<
script
>
// TraceSdk.init({
// report: 'http://localhost:1024/report',
// appId: 'test',
// // userId: 'test'
// })
// const sdk = new TraceSDK({
// report: 'http://192.168.191.225:3000/monitor',
// appId: 'test',
// // userId: 'test'
// isPageView: false,
// isUniqueVisitor: false,
// isPerformance: false,
// isWebVitals: false,
// isPromiseError: false,
// isClickEvent: false,
// isResource: false,
// isJsError: false,
// isXhr: false,
// isFetch: false,
// isNavigationTiming: true,
// });
TraceSDK
.
init
(
{
dsn
:
'http://192.168.191.225:3000/monitor'
,
app_id
:
'2bd69bee8a891c238048c6f3c6cab928'
}
)
</
script
>
</
head
>
<
body
>
<
p
>
这是一条内容
</
p
>
<
button
onClick
="
logEvent(event)
"
>
点击
</
button
>
<
div
class
="
controls
"
>
<
button
id
="
reload
"
type
="
button
"
>
重新加载
</
button
>
</
div
>
<
div
class
="
event-log
"
>
<
label
for
="
eventLog
"
>
事件日志:
</
label
>
<
textarea
readonly
class
="
event-log-contents
"
rows
="
8
"
cols
="
30
"
id
="
eventLog
"
>
</
textarea
>
</
div
>
<
script
>
function
logEvent
(
event
)
{
// RangeError - 有效范围错误
let
b
=
new
Array
(
-
1
)
;
// ReferenceError - 引用错误
// log(event)
// SyntaxError - SyntaxError
// console.log(event
// TypeError - 类型错误
// let foo = 3;foo();
// URIError
// decodeURIComponent('%');
}
</
script
>
<!-- 资源加载演示 -->
<
img
src
="
https://p3-pc.douyinpic.com/aweme/200x200/aweme-avatar/tos-cn-i-0813_o4RHbAnkMEEA4e9SlCTFnADAgIekCLrQAARgD4.jpeg
"
alt
="
sss
"
/>
<!-- 资源加载演示 -->
<
img
src
="
https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_62b6913c2e645875ab0d4f0698c16754.jg
"
alt
="
sss
"
/>
<
iframe
src
="
base.html
"
width
="
200
"
height
="
300
"
>
</
iframe
>
<
audio
controls
test
="
https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3
"
>
</
audio
>
<
video
controls
width
="
250
"
>
<
source
test
="
https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm
"
type
="
video/webm
"
/>
<!---->
<
source
test
="
https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4
"
type
="
video/mp4
"
/>
</
video
>
<
script
>
// Promise 异常
Promise
.
reject
(
new
Error
(
'dsad'
)
)
fetch
(
'https://hudong.alicdn.com/api/online/data/v3/c45746794e4a4de99af2b9fb4f65e0d2.js?xsa=dsad&dd=casd'
,
{
headers
:
{
origin
:
'alicdn.com'
}
}
)
.
then
(
res
=>
console
.
log
(
res
)
)
// fetch 成功例子
fetch
(
'https://hudong.alicdn.com/api/online/data/v3/c45746794e4a4de99af2b9fb4f65e0d2.js?xsa=dsad&dd=casd'
,
{
headers
:
{
origin
:
'alicdn.com'
}
,
}
)
;
fetch
(
'https://api.feelgood.cn/athena/survey/platform/task/show/'
,
{
method
:
'post'
,
}
)
;
// fetch 抛出 error 异常
fetch
(
'https://www.volcengine.com/api/search/hotWord?Pos=searchBar'
,
{
method
:
'post'
,
}
)
// fetch('https://console.volcengine.com/api/passport/account/currentUser')
// .then(res => res.json())
// .then(res => console.log(res))
// .catch(err => console.error('Error reporting failed:', err));
// fetch !response.ok 异常
fetch
(
'http://localhost:3000/'
)
;
// (() => {
// const xhr = new XMLHttpRequest()
// xhr.open('get', 'https://lf3-beecdn.bytetos.com/obj/ies-fe-bee/bee_prod/biz_610/bee_prod_610_bee_publish_11392.json?&_=1737554312631')
// // xhr.open('post', 'http://192.168.191.225:3000/monitor')
// // xhr.setRequestHeader('Content-Type', 'application/json');
// // xhr.setRequestHeader('s', 'vasdasdjson');
// // xhr.onload = (e) => {
// // console.log('这个是 xml http request 内容', e)
// /
/
}
// // xhr.onerror = ()=> {
// // console.log('这个是 xml error http request 内容', xhr)
// /
/
}
// xhr.send()
// // console.log(xhr)7
// })()
// 延迟 dom 加载
// const log = document.querySelector('.event-log-contents');
// const reload = document.querySelector('#reload');
//
// reload.addEventListener('click', () => {
// log.textContent = '';
// setTimeout(() => {
// window.location.reload(true);
// }, 200);
// });
//
// window.addEventListener('load', (event) => {
// log.textContent += 'load\n';
// });
//
// document.addEventListener('readystatechange', (event) => {
// log.textContent += `readystate: ${document.readyState}\n`;
// });
//
// document.addEventListener('DOMContentLoaded', (event) => {
// log.textContent += 'DOMContentLoaded\n';
// });
// console 模拟
// console.error('模拟 error 记录 ',new Error('sad'))
// console.debug('模拟 debug 记录 ')
// console.warn('模拟 warn 记录 ')
// console.info('模拟 info 记录 ')
// console.assert(false, '模拟 assert 记录 ', new Error('sad'),new TypeError('sasdad'))
// console.trace('模拟 trace 记录 ',new Error('sad'))
// console.dir(document.location)
</
script
>
</
body
>
</
html
>
You can’t perform that action at this time.