@blueking/open-telemetry 0.0.8 → 0.0.10
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 +424 -112
- package/dist/bk-rum.global.js +2 -2
- package/dist/bk-rum.global.js.map +1 -1
- package/dist/core/config.d.ts +44 -87
- package/dist/core/telemetry-attributes.d.ts +3 -0
- package/dist/core/url.d.ts +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +636 -658
- package/dist/index.js.map +1 -1
- package/dist/plugins/action.d.ts +5 -2
- package/dist/plugins/blank-screen.d.ts +7 -2
- package/dist/plugins/common.d.ts +1 -1
- package/dist/plugins/csp-violation.d.ts +1 -2
- package/dist/plugins/device.d.ts +4 -2
- package/dist/plugins/error.d.ts +5 -2
- package/dist/plugins/http-body.d.ts +2 -2
- package/dist/plugins/long-task.d.ts +4 -2
- package/dist/plugins/page-view.d.ts +1 -2
- package/dist/plugins/resource.d.ts +1 -2
- package/dist/plugins/route-timing.d.ts +1 -2
- package/dist/plugins/session.d.ts +6 -2
- package/dist/plugins/web-vitals.d.ts +1 -2
- package/dist/plugins/websocket.d.ts +1 -2
- package/package.json +2 -1
package/dist/plugins/action.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export
|
|
2
|
+
export type BkOTActionEventName = 'click' | 'input' | 'keydown' | 'pointerdown' | 'scroll' | 'submit';
|
|
3
|
+
export interface BkOTActionPluginOptions {
|
|
4
|
+
eventNames?: BkOTActionEventName[];
|
|
5
|
+
}
|
|
6
|
+
export declare const createActionPlugin: (options?: BkOTActionPluginOptions) => BkOTPlugin;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export
|
|
2
|
+
export interface BkOTBlankScreenPluginOptions {
|
|
3
|
+
checkDelay?: number;
|
|
4
|
+
ignoreSelectors?: string[];
|
|
5
|
+
rootSelector?: string;
|
|
6
|
+
threshold?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const createBlankScreenPlugin: (options?: BkOTBlankScreenPluginOptions) => BkOTPlugin;
|
package/dist/plugins/common.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { BkOTInstrumentationsConfig } from '../core/config';
|
|
2
2
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export declare const createCommonInstrumentationsPlugin: (option
|
|
3
|
+
export declare const createCommonInstrumentationsPlugin: (option?: BkOTInstrumentationsConfig) => BkOTPlugin;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
2
|
/**
|
|
4
3
|
* CSP 违规事件采集插件,通过监听 `securitypolicyviolation` 事件捕获被 CSP 策略拦截的脚本/资源,
|
|
@@ -16,4 +15,4 @@ import type { BkOTPlugin } from '../core/plugin';
|
|
|
16
15
|
* - `blockedURI` / `sourceFile` 中的 URL 类值会经 `redactUrl` 脱敏。
|
|
17
16
|
* - `blockedURI` 是 'inline' / 'eval' 等 CSP 关键字时直接保留,不调用 redactUrl。
|
|
18
17
|
*/
|
|
19
|
-
export declare const createCspViolationPlugin: (
|
|
18
|
+
export declare const createCspViolationPlugin: () => BkOTPlugin;
|
package/dist/plugins/device.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
2
|
+
export interface BkOTDevicePluginOptions {
|
|
3
|
+
storageKey?: string;
|
|
4
|
+
}
|
|
3
5
|
/**
|
|
4
6
|
* 设备元数据采集插件,把"设备级"信息写入 SDK 的 runtimeAttributes,
|
|
5
7
|
* 让所有 log/span 都自动带上这些维度。
|
|
@@ -20,4 +22,4 @@ import type { BkOTPlugin } from '../core/plugin';
|
|
|
20
22
|
*
|
|
21
23
|
* 与 session 插件的关系:device 跨会话持久(终身),session 有过期与续期(连续访问语义)。
|
|
22
24
|
*/
|
|
23
|
-
export declare const createDevicePlugin: (
|
|
25
|
+
export declare const createDevicePlugin: (options?: BkOTDevicePluginOptions) => BkOTPlugin;
|
package/dist/plugins/error.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export
|
|
2
|
+
export interface BkOTErrorPluginOptions {
|
|
3
|
+
maxPerWindow?: number;
|
|
4
|
+
windowMs?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const createErrorPlugin: (options?: BkOTErrorPluginOptions) => BkOTPlugin;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BkOTHttpBodyConfig } from '../core/config';
|
|
2
2
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export declare const createHttpBodyPlugin: (
|
|
3
|
+
export declare const createHttpBodyPlugin: (options?: BkOTHttpBodyConfig) => BkOTPlugin;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
2
|
+
export interface BkOTLongTaskPluginOptions {
|
|
3
|
+
threshold?: number;
|
|
4
|
+
}
|
|
3
5
|
/**
|
|
4
6
|
* Long Task 监控插件,通过 PerformanceObserver 捕获主线程上 >= threshold(默认 50ms)的长任务,
|
|
5
7
|
* 上报为 metric(counter + duration histogram),用于评估页面卡顿趋势。
|
|
@@ -12,4 +14,4 @@ import type { BkOTPlugin } from '../core/plugin';
|
|
|
12
14
|
* - 仅在 PerformanceObserver 与 `supportedEntryTypes` 包含 `longtask` 的浏览器上启用,否则 init 直接 return;
|
|
13
15
|
* Firefox 当前不支持 longtask,会自动跳过。
|
|
14
16
|
*/
|
|
15
|
-
export declare const createLongTaskPlugin: (
|
|
17
|
+
export declare const createLongTaskPlugin: (options?: BkOTLongTaskPluginOptions) => BkOTPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export declare const createPageViewPlugin: (
|
|
2
|
+
export declare const createPageViewPlugin: () => BkOTPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export declare const createResourcePlugin: (
|
|
2
|
+
export declare const createResourcePlugin: () => BkOTPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export declare const createRouteTimingPlugin: (
|
|
2
|
+
export declare const createRouteTimingPlugin: () => BkOTPlugin;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export
|
|
2
|
+
export interface BkOTSessionPluginOptions {
|
|
3
|
+
inactivityMs?: number;
|
|
4
|
+
maxLifetimeMs?: number;
|
|
5
|
+
storageKey?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const createSessionPlugin: (options?: BkOTSessionPluginOptions) => BkOTPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export declare const createWebVitalsPlugin: (
|
|
2
|
+
export declare const createWebVitalsPlugin: () => BkOTPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { ResolvedRumPluginConfig } from '../core/config';
|
|
2
1
|
import type { BkOTPlugin } from '../core/plugin';
|
|
3
|
-
export declare const createWebSocketPlugin: (
|
|
2
|
+
export declare const createWebSocketPlugin: () => BkOTPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueking/open-telemetry",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "OpenTelemetry browser SDK for BK RUM",
|
|
5
5
|
"author": "TencentCloud Real User Monitoring",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
48
48
|
"@vue/test-utils": "^2.4.6",
|
|
49
49
|
"@vue/tsconfig": "^0.9.0",
|
|
50
|
+
"oxc-minify": "^0.133.0",
|
|
50
51
|
"vite": "^8.0.2",
|
|
51
52
|
"vite-bundle-analyzer": "^1.3.2",
|
|
52
53
|
"vitepress": "2.0.0-alpha.16",
|