@arvoretech/bug-jar 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -4
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.global.js +6 -6
- package/dist/index.js +8 -8
- package/dist/index.mjs +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ opens it in the real app, and the encrypted package is uploaded to S3. See
|
|
|
34
34
|
<script src="https://unpkg.com/@arvoretech/bug-jar"></script>
|
|
35
35
|
<script>
|
|
36
36
|
BugJar.init({
|
|
37
|
-
debugSessionEndpoint: 'https://
|
|
37
|
+
debugSessionEndpoint: 'https://livros.arvore.com.br/debug-sessions',
|
|
38
38
|
})
|
|
39
39
|
</script>
|
|
40
40
|
```
|
|
@@ -67,7 +67,7 @@ init({
|
|
|
67
67
|
onCapture: (report) => console.log(report),
|
|
68
68
|
|
|
69
69
|
// Debug session
|
|
70
|
-
debugSessionEndpoint: 'https://
|
|
70
|
+
debugSessionEndpoint: 'https://livros.arvore.com.br/debug-sessions',
|
|
71
71
|
// debugToken is read automatically from the ?debug=<token> query param
|
|
72
72
|
})
|
|
73
73
|
```
|
|
@@ -101,7 +101,7 @@ private S3 bucket via a presigned URL. No AWS credentials ever reach the browser
|
|
|
101
101
|
<script src="https://unpkg.com/@arvoretech/bug-jar"></script>
|
|
102
102
|
<script>
|
|
103
103
|
BugJar.init({
|
|
104
|
-
debugSessionEndpoint: 'https://
|
|
104
|
+
debugSessionEndpoint: 'https://livros.arvore.com.br/debug-sessions',
|
|
105
105
|
// debugToken is read automatically from the ?debug=<token> query param
|
|
106
106
|
})
|
|
107
107
|
</script>
|
|
@@ -124,7 +124,7 @@ Flow:
|
|
|
124
124
|
to `debug/<token>/<pageId>/meta.json` (`POST /debug-sessions/:token/meta`).
|
|
125
125
|
4. Staff reconstructs the session offline:
|
|
126
126
|
```bash
|
|
127
|
-
BUG_JAR_API=https://
|
|
127
|
+
BUG_JAR_API=https://livros.arvore.com.br/debug-sessions \
|
|
128
128
|
BUG_JAR_API_TOKEN=<admin-jwt> \
|
|
129
129
|
node scripts/decrypt-session.cjs <token> ./out
|
|
130
130
|
```
|
|
@@ -133,6 +133,21 @@ Flow:
|
|
|
133
133
|
per-page stream, and writes `<pageId>/data.jsonl`, `<pageId>/video.webm`,
|
|
134
134
|
`<pageId>/meta.json`.
|
|
135
135
|
|
|
136
|
+
## Speed test
|
|
137
|
+
|
|
138
|
+
At the start of each page, Bug Jar runs a fast.com-style network speed test
|
|
139
|
+
against the Árvore backend and stores the result in that page's `meta.json`:
|
|
140
|
+
|
|
141
|
+
- **latency** — minimum and jitter from repeated `GET /speedtest/ping`
|
|
142
|
+
- **download (Mbps)** — 8 MB pulled across 4 parallel streams
|
|
143
|
+
(`GET /speedtest/download?bytes=N`)
|
|
144
|
+
- **upload (Mbps)** — 4 MB sent to `POST /speedtest/upload` (server discards it)
|
|
145
|
+
|
|
146
|
+
It measures the real end-to-end throughput between the user and our
|
|
147
|
+
infrastructure (which is exactly what we want when debugging "the app is slow").
|
|
148
|
+
The test runs once per page and is best-effort — failures leave the fields null
|
|
149
|
+
without blocking the session.
|
|
150
|
+
|
|
136
151
|
## Encryption
|
|
137
152
|
|
|
138
153
|
Each stream (data and video, per page) is encrypted with libsodium
|
package/dist/index.d.mts
CHANGED
|
@@ -17,6 +17,7 @@ interface BugJarConfig {
|
|
|
17
17
|
onCapture?: (report: BugReport) => void;
|
|
18
18
|
debugToken?: string;
|
|
19
19
|
debugSessionEndpoint?: string;
|
|
20
|
+
ignoreUrls?: string[];
|
|
20
21
|
}
|
|
21
22
|
interface NetworkEntry {
|
|
22
23
|
id: string;
|
|
@@ -157,6 +158,7 @@ declare class BugJar {
|
|
|
157
158
|
private videoUploader;
|
|
158
159
|
private pageId;
|
|
159
160
|
private dataInterval;
|
|
161
|
+
private lastFlushTs;
|
|
160
162
|
private finalized;
|
|
161
163
|
private started;
|
|
162
164
|
constructor(config?: Partial<BugJarConfig>);
|
|
@@ -171,6 +173,7 @@ declare class BugJar {
|
|
|
171
173
|
private startDataStreaming;
|
|
172
174
|
private registerFlushHandlers;
|
|
173
175
|
private finalizePage;
|
|
176
|
+
private runSpeedtest;
|
|
174
177
|
endDebugSession(): void;
|
|
175
178
|
}
|
|
176
179
|
declare function init(config?: Partial<BugJarConfig>): BugJar;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface BugJarConfig {
|
|
|
17
17
|
onCapture?: (report: BugReport) => void;
|
|
18
18
|
debugToken?: string;
|
|
19
19
|
debugSessionEndpoint?: string;
|
|
20
|
+
ignoreUrls?: string[];
|
|
20
21
|
}
|
|
21
22
|
interface NetworkEntry {
|
|
22
23
|
id: string;
|
|
@@ -157,6 +158,7 @@ declare class BugJar {
|
|
|
157
158
|
private videoUploader;
|
|
158
159
|
private pageId;
|
|
159
160
|
private dataInterval;
|
|
161
|
+
private lastFlushTs;
|
|
160
162
|
private finalized;
|
|
161
163
|
private started;
|
|
162
164
|
constructor(config?: Partial<BugJarConfig>);
|
|
@@ -171,6 +173,7 @@ declare class BugJar {
|
|
|
171
173
|
private startDataStreaming;
|
|
172
174
|
private registerFlushHandlers;
|
|
173
175
|
private finalizePage;
|
|
176
|
+
private runSpeedtest;
|
|
174
177
|
endDebugSession(): void;
|
|
175
178
|
}
|
|
176
179
|
declare function init(config?: Partial<BugJarConfig>): BugJar;
|