@blueking/open-telemetry 0.0.23 → 0.0.25
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 +1 -3
- package/dist/bk-rum.global.js +2 -2
- package/dist/bk-rum.global.js.map +1 -1
- package/dist/core/processor.d.ts +2 -2
- package/dist/core/runtime-context.d.ts +4 -0
- package/dist/core/sampling.d.ts +0 -1
- package/dist/index.js +376 -393
- package/dist/index.js.map +1 -1
- package/dist/plugins/common.d.ts +1 -2
- package/dist/plugins/device.d.ts +4 -4
- package/dist/plugins/resource.d.ts +5 -3
- package/dist/plugins/web-vitals.d.ts +0 -5
- package/dist/schema/attributes.d.ts +4 -5
- package/dist/schema/span.d.ts +1 -2
- package/package.json +1 -1
- package/skills/bk-rum-otele/references/api.md +2 -2
- package/skills/bk-rum-otele/references/configuration.md +1 -1
- package/skills/bk-rum-otele/references/data-model.md +2 -3
- package/skills/bk-rum-otele/references/extensions.md +0 -1
- package/skills/bk-rum-otele/references/network.md +4 -1
- package/skills/bk-rum-otele/references/performance.md +0 -1
- package/skills/bk-rum-otele/references/privacy.md +1 -1
- package/skills/bk-rum-otele/references/production.md +0 -2
- package/skills/bk-rum-otele/references/session-context.md +6 -9
- package/skills/bk-rum-otele/references/telemetry-reference.md +58 -81
- package/skills/bk-rum-otele/references/transport-sampling.md +0 -3
package/dist/core/processor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ResolvedBkOTConfig } from './config';
|
|
2
|
-
import type { Attributes, Context } from '@opentelemetry/api';
|
|
2
|
+
import type { Attributes, Context, Span as ApiSpan } from '@opentelemetry/api';
|
|
3
3
|
import type { ReadableSpan, Span, SpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const markSpanDiscarded: (span: ApiSpan) => void;
|
|
5
5
|
/**
|
|
6
6
|
* 给所有 span 固化创建时的运行时上下文,并在 onEnd 阶段过滤自身上报请求和无 RUM 上下文 span。
|
|
7
7
|
*/
|
|
@@ -51,6 +51,8 @@ export declare class RumRuntimeContext {
|
|
|
51
51
|
private readonly queuedViewCommands;
|
|
52
52
|
private recordAssociation;
|
|
53
53
|
private readonly sessionHistory;
|
|
54
|
+
private sampled;
|
|
55
|
+
private readonly samplingHistory;
|
|
54
56
|
private readonly sessionLifecycleListeners;
|
|
55
57
|
private readonly setOptionalAttribute;
|
|
56
58
|
private user;
|
|
@@ -66,6 +68,7 @@ export declare class RumRuntimeContext {
|
|
|
66
68
|
getUser: () => BkOTUserContext;
|
|
67
69
|
getView: () => BkOTViewContext;
|
|
68
70
|
isSessionActive: () => boolean;
|
|
71
|
+
isSessionSampledAt: (timestamp: number) => boolean;
|
|
69
72
|
isViewActive: () => boolean;
|
|
70
73
|
notifySessionLifecycle: (event: BkOTSessionLifecycleEvent) => void;
|
|
71
74
|
onSessionLifecycle: (listener: (event: BkOTSessionLifecycleEvent) => void) => () => boolean;
|
|
@@ -73,6 +76,7 @@ export declare class RumRuntimeContext {
|
|
|
73
76
|
onViewCommand: (listener: (command: BkOTViewCommand) => void) => () => boolean;
|
|
74
77
|
setAttributes: (attributes: Attributes, changedAt?: number) => void;
|
|
75
78
|
setUser: (user: BkOTUserContext) => void;
|
|
79
|
+
setSessionSampled: (sampled: boolean, changedAt?: number) => void;
|
|
76
80
|
setView: (view: BkOTViewContext, changedAt?: number) => void;
|
|
77
81
|
constructor(initialAttributes?: Attributes, user?: BkOTUserContext);
|
|
78
82
|
}
|