@noego/telemetry 0.0.3 → 0.1.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 +6 -0
- package/dist/browser/index.cjs +21 -0
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +6 -5
- package/dist/browser/index.d.ts +6 -5
- package/dist/browser/index.js +21 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/{browser_telemetry_client-BzBPQm4m.d.cts → browser_telemetry_client-ClZl3awO.d.cts} +2 -2
- package/dist/{browser_telemetry_client-Ch_VzwEa.d.ts → browser_telemetry_client-t4dPp8Ku.d.ts} +2 -2
- package/dist/cli/telemetry_bin.cjs +393 -35
- package/dist/cli/telemetry_bin.cjs.map +1 -1
- package/dist/cli/telemetry_bin.js +378 -20
- package/dist/cli/telemetry_bin.js.map +1 -1
- package/dist/cli/telemetry_cli.cjs +393 -35
- package/dist/cli/telemetry_cli.cjs.map +1 -1
- package/dist/cli/telemetry_cli.d.cts +35 -5
- package/dist/cli/telemetry_cli.d.ts +35 -5
- package/dist/cli/telemetry_cli.js +378 -20
- package/dist/cli/telemetry_cli.js.map +1 -1
- package/dist/{client_defaults-B5tC-TgG.d.ts → client_defaults-CZ8PysZX.d.ts} +2 -2
- package/dist/{client_defaults-C9LnSX4j.d.cts → client_defaults-lDbWYWWK.d.cts} +2 -2
- package/dist/core/index.cjs +26 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +15 -12
- package/dist/core/index.d.ts +15 -12
- package/dist/core/index.js +26 -1
- package/dist/core/index.js.map +1 -1
- package/dist/electron/index.cjs +21 -0
- package/dist/electron/index.cjs.map +1 -1
- package/dist/electron/index.d.cts +5 -4
- package/dist/electron/index.d.ts +5 -4
- package/dist/electron/index.js +21 -0
- package/dist/electron/index.js.map +1 -1
- package/dist/{envelope.types-rOLpWXRC.d.cts → envelope.types-DIvZD3xH.d.ts} +2 -6
- package/dist/{envelope.types-rOLpWXRC.d.ts → envelope.types-DyrlRG49.d.cts} +2 -6
- package/dist/{in_memory_batch_transport-DKW9EZnU.d.cts → in_memory_batch_transport-3T6gElXP.d.cts} +1 -1
- package/dist/{in_memory_batch_transport-oOwNxXnA.d.ts → in_memory_batch_transport-DpQU6JqM.d.ts} +1 -1
- package/dist/index.cjs +26 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -12
- package/dist/index.d.ts +14 -12
- package/dist/index.js +26 -1
- package/dist/index.js.map +1 -1
- package/dist/json.types-BqS77fcN.d.cts +7 -0
- package/dist/json.types-BqS77fcN.d.ts +7 -0
- package/dist/{maintenance_coordinator.types-C4ULi4A4.d.cts → maintenance_coordinator.types-Crhx9i9k.d.cts} +3 -3
- package/dist/{maintenance_coordinator.types-ikUrRXmO.d.ts → maintenance_coordinator.types-DprmgpVn.d.ts} +3 -3
- package/dist/metric.types-D8aOAnUm.d.ts +67 -0
- package/dist/metric.types-Dg4eZq6u.d.cts +67 -0
- package/dist/{metric_definition_contract-BYtnODhu.d.ts → metric_definition_contract-C6MERhJs.d.ts} +1 -1
- package/dist/{metric_definition_contract-DfhhmTZ1.d.cts → metric_definition_contract-DoAk7NOw.d.cts} +1 -1
- package/dist/node/index.cjs +38 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +62 -10
- package/dist/node/index.d.ts +62 -10
- package/dist/node/index.js +37 -2
- package/dist/node/index.js.map +1 -1
- package/dist/node/producer/index.cjs +21 -0
- package/dist/node/producer/index.cjs.map +1 -1
- package/dist/node/producer/index.d.cts +5 -4
- package/dist/node/producer/index.d.ts +5 -4
- package/dist/node/producer/index.js +21 -0
- package/dist/node/producer/index.js.map +1 -1
- package/dist/projector/index.cjs +1370 -0
- package/dist/projector/index.cjs.map +1 -0
- package/dist/projector/index.d.cts +246 -0
- package/dist/projector/index.d.ts +246 -0
- package/dist/projector/index.js +1328 -0
- package/dist/projector/index.js.map +1 -0
- package/dist/{query.types-DU5v7vM0.d.ts → query.types-CRqAsGTX.d.cts} +4 -66
- package/dist/{query.types-DuYWbFFe.d.cts → query.types-DnOMYXpC.d.ts} +4 -66
- package/dist/sqlite/index.cjs +5 -1
- package/dist/sqlite/index.cjs.map +1 -1
- package/dist/sqlite/index.d.cts +7 -5
- package/dist/sqlite/index.d.ts +7 -5
- package/dist/sqlite/index.js +5 -1
- package/dist/sqlite/index.js.map +1 -1
- package/dist/{storage.types-k7oElEB3.d.ts → storage.types-BKWoIOHp.d.ts} +3 -2
- package/dist/{storage.types-Bji_pWqr.d.cts → storage.types-DHbAm3j_.d.cts} +3 -2
- package/dist/{telemetry_client-BXw8WH_F.d.ts → telemetry_client-Bg5tbj5E.d.cts} +12 -3
- package/dist/{telemetry_client-CYaPYfOl.d.cts → telemetry_client-DWKgufmc.d.ts} +12 -3
- package/dist/{telemetry_configuration_parser-BZ8Nvnle.d.ts → telemetry_configuration_parser-6BR3_dD_.d.ts} +2 -2
- package/dist/{telemetry_configuration_parser-CgSN7R6A.d.cts → telemetry_configuration_parser-ybeweUPE.d.cts} +2 -2
- package/dist/testing/index.d.cts +7 -5
- package/dist/testing/index.d.ts +7 -5
- package/dist/trace-adapter/index.d.cts +4 -3
- package/dist/trace-adapter/index.d.ts +4 -3
- package/dist/{transport.types-BAl_TRtU.d.cts → transport.types-C2dP-eed.d.cts} +1 -1
- package/dist/{transport.types-DDnZoKWi.d.ts → transport.types-SA8KpLiK.d.ts} +1 -1
- package/migrations/1786100000000_animation_artifacts.down.sql +5 -0
- package/migrations/1786100000000_animation_artifacts.up.sql +41 -0
- package/native/noego_telemetry_native.node +0 -0
- package/package.json +11 -4
package/dist/node/index.d.cts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { T as TelemetryAdmissionPolicy, M as MetadataSnapshotLimits, a as TelemetryClient } from '../telemetry_client-
|
|
2
|
-
import { T as TelemetrySinkPlugin, c as MaintenanceLifecycleEvent, e as TelemetryCollectorRuntime, f as TelemetryCollectorStatus } from '../maintenance_coordinator.types-
|
|
3
|
-
import { S as SqliteTargetConfiguration
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { T as TelemetryAdmissionPolicy, M as MetadataSnapshotLimits, a as TelemetryClient } from '../telemetry_client-Bg5tbj5E.cjs';
|
|
2
|
+
import { T as TelemetrySinkPlugin, c as MaintenanceLifecycleEvent, e as TelemetryCollectorRuntime, f as TelemetryCollectorStatus } from '../maintenance_coordinator.types-Crhx9i9k.cjs';
|
|
3
|
+
import { S as SqliteTargetConfiguration } from '../query.types-CRqAsGTX.cjs';
|
|
4
|
+
import { M as MetricDefinition } from '../metric.types-Dg4eZq6u.cjs';
|
|
5
|
+
import { T as TelemetryStorageTransport, e as TelemetryStorageTarget, a as TelemetryStorageCapabilities } from '../storage.types-DHbAm3j_.cjs';
|
|
6
|
+
import { a as TelemetryBatchValidationLimits, c as TelemetryBatchReceiver } from '../transport.types-C2dP-eed.cjs';
|
|
6
7
|
import { NodeTelemetryProducerOptions } from './producer/index.cjs';
|
|
7
8
|
export { NodeTelemetryProducerHost } from './producer/index.cjs';
|
|
8
9
|
export { SQLiteTelemetryTransport } from '../sqlite/index.cjs';
|
|
9
|
-
export { a as NodeTelemetryConfigurationParseOptions, N as NodeTelemetryConfigurationParser, T as TelemetryConfigurationError, b as TelemetryDurationParser } from '../telemetry_configuration_parser-
|
|
10
|
-
export { D as DEFAULT_METADATA_SNAPSHOT_LIMITS, a as DEFAULT_TELEMETRY_ADMISSION_POLICY } from '../client_defaults-
|
|
11
|
-
import '../
|
|
10
|
+
export { a as NodeTelemetryConfigurationParseOptions, N as NodeTelemetryConfigurationParser, T as TelemetryConfigurationError, b as TelemetryDurationParser } from '../telemetry_configuration_parser-ybeweUPE.cjs';
|
|
11
|
+
export { D as DEFAULT_METADATA_SNAPSHOT_LIMITS, a as DEFAULT_TELEMETRY_ADMISSION_POLICY } from '../client_defaults-lDbWYWWK.cjs';
|
|
12
|
+
import '../json.types-BqS77fcN.cjs';
|
|
13
|
+
import '../envelope.types-DyrlRG49.cjs';
|
|
12
14
|
import '../result.types-171Huujb.cjs';
|
|
13
|
-
import '../metric_definition_contract-
|
|
15
|
+
import '../metric_definition_contract-DoAk7NOw.cjs';
|
|
14
16
|
|
|
15
17
|
type NodeLocalTelemetryProducerOptions = Omit<NodeTelemetryProducerOptions, 'transport'>;
|
|
16
18
|
type NodeTelemetryCollectorOptions = Readonly<{
|
|
@@ -36,6 +38,47 @@ type NodeCombinedTelemetryOptions = Readonly<{
|
|
|
36
38
|
batchValidation?: Partial<TelemetryBatchValidationLimits>;
|
|
37
39
|
observeMaintenance?: (event: MaintenanceLifecycleEvent) => void;
|
|
38
40
|
}>;
|
|
41
|
+
type AnimationRun = Readonly<{
|
|
42
|
+
runUuid: string;
|
|
43
|
+
runCode: number;
|
|
44
|
+
elementCode: number;
|
|
45
|
+
animationCode: number;
|
|
46
|
+
startedUs: number;
|
|
47
|
+
endedUs: number;
|
|
48
|
+
frameCount: number;
|
|
49
|
+
outcome: string;
|
|
50
|
+
maxDrift: number;
|
|
51
|
+
maxResidual: number;
|
|
52
|
+
}>;
|
|
53
|
+
type AnimationDictionaryEntry = Readonly<{
|
|
54
|
+
kind: string;
|
|
55
|
+
code: number;
|
|
56
|
+
identity: string;
|
|
57
|
+
digest: string | null;
|
|
58
|
+
}>;
|
|
59
|
+
type AnimationArtifactManifest = Readonly<{
|
|
60
|
+
artifactId: string;
|
|
61
|
+
records: number;
|
|
62
|
+
startedUs: number;
|
|
63
|
+
endedUs: number;
|
|
64
|
+
reason: string;
|
|
65
|
+
sha256: string;
|
|
66
|
+
sequence: number;
|
|
67
|
+
drops: number;
|
|
68
|
+
overruns: number;
|
|
69
|
+
byteCount: number;
|
|
70
|
+
persistedAt: number;
|
|
71
|
+
conversationId: string | null;
|
|
72
|
+
runs: readonly AnimationRun[];
|
|
73
|
+
dictionary: readonly AnimationDictionaryEntry[];
|
|
74
|
+
}>;
|
|
75
|
+
type AnimationArtifactMetadata = Omit<AnimationArtifactManifest, 'runs' | 'dictionary'>;
|
|
76
|
+
type AnimationArtifactError = Readonly<{
|
|
77
|
+
ok: false;
|
|
78
|
+
error: Readonly<{
|
|
79
|
+
code: string;
|
|
80
|
+
}>;
|
|
81
|
+
}>;
|
|
39
82
|
|
|
40
83
|
declare class NodeTelemetryHost {
|
|
41
84
|
readonly client: TelemetryClient | null;
|
|
@@ -68,7 +111,16 @@ declare class NativeTelemetryHost {
|
|
|
68
111
|
stop(deadlineMs: number): Promise<void>;
|
|
69
112
|
status(): Promise<unknown>;
|
|
70
113
|
collectorStatus(): TelemetryCollectorStatus;
|
|
114
|
+
storeAnimationArtifact(manifest: AnimationArtifactManifest, payload: Buffer): Promise<{
|
|
115
|
+
ok: true;
|
|
116
|
+
artifactId: string;
|
|
117
|
+
} | AnimationArtifactError>;
|
|
118
|
+
getAnimationArtifact(artifactId: string): Promise<Buffer | AnimationArtifactError>;
|
|
119
|
+
listAnimationArtifacts(): Promise<{
|
|
120
|
+
ok: true;
|
|
121
|
+
artifacts: readonly AnimationArtifactMetadata[];
|
|
122
|
+
} | AnimationArtifactError>;
|
|
71
123
|
maintenance(): Promise<unknown>;
|
|
72
124
|
}
|
|
73
125
|
|
|
74
|
-
export { NativeTelemetryHost, type NodeCombinedTelemetryOptions, type NodeLocalTelemetryProducerOptions, type NodeTelemetryCollectorOptions, NodeTelemetryHost, NodeTelemetryProducerOptions };
|
|
126
|
+
export { type AnimationArtifactError, type AnimationArtifactManifest, type AnimationArtifactMetadata, type AnimationDictionaryEntry, type AnimationRun, NativeTelemetryHost, type NodeCombinedTelemetryOptions, type NodeLocalTelemetryProducerOptions, type NodeTelemetryCollectorOptions, NodeTelemetryHost, NodeTelemetryProducerOptions };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { T as TelemetryAdmissionPolicy, M as MetadataSnapshotLimits, a as TelemetryClient } from '../telemetry_client-
|
|
2
|
-
import { T as TelemetrySinkPlugin, c as MaintenanceLifecycleEvent, e as TelemetryCollectorRuntime, f as TelemetryCollectorStatus } from '../maintenance_coordinator.types-
|
|
3
|
-
import { S as SqliteTargetConfiguration
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { T as TelemetryAdmissionPolicy, M as MetadataSnapshotLimits, a as TelemetryClient } from '../telemetry_client-DWKgufmc.js';
|
|
2
|
+
import { T as TelemetrySinkPlugin, c as MaintenanceLifecycleEvent, e as TelemetryCollectorRuntime, f as TelemetryCollectorStatus } from '../maintenance_coordinator.types-DprmgpVn.js';
|
|
3
|
+
import { S as SqliteTargetConfiguration } from '../query.types-DnOMYXpC.js';
|
|
4
|
+
import { M as MetricDefinition } from '../metric.types-D8aOAnUm.js';
|
|
5
|
+
import { T as TelemetryStorageTransport, e as TelemetryStorageTarget, a as TelemetryStorageCapabilities } from '../storage.types-BKWoIOHp.js';
|
|
6
|
+
import { a as TelemetryBatchValidationLimits, c as TelemetryBatchReceiver } from '../transport.types-SA8KpLiK.js';
|
|
6
7
|
import { NodeTelemetryProducerOptions } from './producer/index.js';
|
|
7
8
|
export { NodeTelemetryProducerHost } from './producer/index.js';
|
|
8
9
|
export { SQLiteTelemetryTransport } from '../sqlite/index.js';
|
|
9
|
-
export { a as NodeTelemetryConfigurationParseOptions, N as NodeTelemetryConfigurationParser, T as TelemetryConfigurationError, b as TelemetryDurationParser } from '../telemetry_configuration_parser-
|
|
10
|
-
export { D as DEFAULT_METADATA_SNAPSHOT_LIMITS, a as DEFAULT_TELEMETRY_ADMISSION_POLICY } from '../client_defaults-
|
|
11
|
-
import '../
|
|
10
|
+
export { a as NodeTelemetryConfigurationParseOptions, N as NodeTelemetryConfigurationParser, T as TelemetryConfigurationError, b as TelemetryDurationParser } from '../telemetry_configuration_parser-6BR3_dD_.js';
|
|
11
|
+
export { D as DEFAULT_METADATA_SNAPSHOT_LIMITS, a as DEFAULT_TELEMETRY_ADMISSION_POLICY } from '../client_defaults-CZ8PysZX.js';
|
|
12
|
+
import '../json.types-BqS77fcN.js';
|
|
13
|
+
import '../envelope.types-DIvZD3xH.js';
|
|
12
14
|
import '../result.types-171Huujb.js';
|
|
13
|
-
import '../metric_definition_contract-
|
|
15
|
+
import '../metric_definition_contract-C6MERhJs.js';
|
|
14
16
|
|
|
15
17
|
type NodeLocalTelemetryProducerOptions = Omit<NodeTelemetryProducerOptions, 'transport'>;
|
|
16
18
|
type NodeTelemetryCollectorOptions = Readonly<{
|
|
@@ -36,6 +38,47 @@ type NodeCombinedTelemetryOptions = Readonly<{
|
|
|
36
38
|
batchValidation?: Partial<TelemetryBatchValidationLimits>;
|
|
37
39
|
observeMaintenance?: (event: MaintenanceLifecycleEvent) => void;
|
|
38
40
|
}>;
|
|
41
|
+
type AnimationRun = Readonly<{
|
|
42
|
+
runUuid: string;
|
|
43
|
+
runCode: number;
|
|
44
|
+
elementCode: number;
|
|
45
|
+
animationCode: number;
|
|
46
|
+
startedUs: number;
|
|
47
|
+
endedUs: number;
|
|
48
|
+
frameCount: number;
|
|
49
|
+
outcome: string;
|
|
50
|
+
maxDrift: number;
|
|
51
|
+
maxResidual: number;
|
|
52
|
+
}>;
|
|
53
|
+
type AnimationDictionaryEntry = Readonly<{
|
|
54
|
+
kind: string;
|
|
55
|
+
code: number;
|
|
56
|
+
identity: string;
|
|
57
|
+
digest: string | null;
|
|
58
|
+
}>;
|
|
59
|
+
type AnimationArtifactManifest = Readonly<{
|
|
60
|
+
artifactId: string;
|
|
61
|
+
records: number;
|
|
62
|
+
startedUs: number;
|
|
63
|
+
endedUs: number;
|
|
64
|
+
reason: string;
|
|
65
|
+
sha256: string;
|
|
66
|
+
sequence: number;
|
|
67
|
+
drops: number;
|
|
68
|
+
overruns: number;
|
|
69
|
+
byteCount: number;
|
|
70
|
+
persistedAt: number;
|
|
71
|
+
conversationId: string | null;
|
|
72
|
+
runs: readonly AnimationRun[];
|
|
73
|
+
dictionary: readonly AnimationDictionaryEntry[];
|
|
74
|
+
}>;
|
|
75
|
+
type AnimationArtifactMetadata = Omit<AnimationArtifactManifest, 'runs' | 'dictionary'>;
|
|
76
|
+
type AnimationArtifactError = Readonly<{
|
|
77
|
+
ok: false;
|
|
78
|
+
error: Readonly<{
|
|
79
|
+
code: string;
|
|
80
|
+
}>;
|
|
81
|
+
}>;
|
|
39
82
|
|
|
40
83
|
declare class NodeTelemetryHost {
|
|
41
84
|
readonly client: TelemetryClient | null;
|
|
@@ -68,7 +111,16 @@ declare class NativeTelemetryHost {
|
|
|
68
111
|
stop(deadlineMs: number): Promise<void>;
|
|
69
112
|
status(): Promise<unknown>;
|
|
70
113
|
collectorStatus(): TelemetryCollectorStatus;
|
|
114
|
+
storeAnimationArtifact(manifest: AnimationArtifactManifest, payload: Buffer): Promise<{
|
|
115
|
+
ok: true;
|
|
116
|
+
artifactId: string;
|
|
117
|
+
} | AnimationArtifactError>;
|
|
118
|
+
getAnimationArtifact(artifactId: string): Promise<Buffer | AnimationArtifactError>;
|
|
119
|
+
listAnimationArtifacts(): Promise<{
|
|
120
|
+
ok: true;
|
|
121
|
+
artifacts: readonly AnimationArtifactMetadata[];
|
|
122
|
+
} | AnimationArtifactError>;
|
|
71
123
|
maintenance(): Promise<unknown>;
|
|
72
124
|
}
|
|
73
125
|
|
|
74
|
-
export { NativeTelemetryHost, type NodeCombinedTelemetryOptions, type NodeLocalTelemetryProducerOptions, type NodeTelemetryCollectorOptions, NodeTelemetryHost, NodeTelemetryProducerOptions };
|
|
126
|
+
export { type AnimationArtifactError, type AnimationArtifactManifest, type AnimationArtifactMetadata, type AnimationDictionaryEntry, type AnimationRun, NativeTelemetryHost, type NodeCombinedTelemetryOptions, type NodeLocalTelemetryProducerOptions, type NodeTelemetryCollectorOptions, NodeTelemetryHost, NodeTelemetryProducerOptions };
|
package/dist/node/index.js
CHANGED
|
@@ -452,11 +452,15 @@ var MetricDefinitionContract = class {
|
|
|
452
452
|
if (!eventSelector || !bracket) {
|
|
453
453
|
return { ok: false, error: `Invalid metric selector ${selector}` };
|
|
454
454
|
}
|
|
455
|
+
const groupBy = bracket === "*" ? [] : bracket.split(",").map((field) => field.trim());
|
|
456
|
+
if (groupBy.some((field) => field.length === 0)) {
|
|
457
|
+
return { ok: false, error: `Invalid metric selector ${selector}` };
|
|
458
|
+
}
|
|
455
459
|
return {
|
|
456
460
|
ok: true,
|
|
457
461
|
value: {
|
|
458
462
|
selector: eventSelector,
|
|
459
|
-
groupBy
|
|
463
|
+
groupBy,
|
|
460
464
|
wildcardUngrouped: bracket === "*"
|
|
461
465
|
}
|
|
462
466
|
};
|
|
@@ -5692,6 +5696,14 @@ var BoundedMetadataSnapshotter = class {
|
|
|
5692
5696
|
};
|
|
5693
5697
|
|
|
5694
5698
|
// src/core/telemetry_client.ts
|
|
5699
|
+
var TELEMETRY_LEVEL_RANKS = Object.freeze({
|
|
5700
|
+
trace: 0,
|
|
5701
|
+
debug: 1,
|
|
5702
|
+
info: 2,
|
|
5703
|
+
warn: 3,
|
|
5704
|
+
error: 4,
|
|
5705
|
+
fatal: 5
|
|
5706
|
+
});
|
|
5695
5707
|
var TelemetryClient = class {
|
|
5696
5708
|
constructor(options) {
|
|
5697
5709
|
this.options = options;
|
|
@@ -5754,6 +5766,10 @@ var TelemetryClient = class {
|
|
|
5754
5766
|
return { kind: "dropped", producerId: this.options.producerId, sequence, reason: "invalid-label" };
|
|
5755
5767
|
}
|
|
5756
5768
|
const priority = this.priorityFor(input.level);
|
|
5769
|
+
if (!this.meetsMinimumLevel(input.level)) {
|
|
5770
|
+
this.incrementDrop("sampled", priority);
|
|
5771
|
+
return { kind: "dropped", producerId: this.options.producerId, sequence, reason: "below-minimum-level" };
|
|
5772
|
+
}
|
|
5757
5773
|
if (!this.isSampled(priority)) {
|
|
5758
5774
|
this.incrementDrop("sampled", priority);
|
|
5759
5775
|
return { kind: "dropped", producerId: this.options.producerId, sequence, reason: "sampled" };
|
|
@@ -6134,6 +6150,15 @@ var TelemetryClient = class {
|
|
|
6134
6150
|
const sampleRate = this.options.admission.sampleRates[priority];
|
|
6135
6151
|
return sampleRate >= 1 || this.options.random() < sampleRate;
|
|
6136
6152
|
}
|
|
6153
|
+
meetsMinimumLevel(level) {
|
|
6154
|
+
const minimum = this.options.admission.minimumLevel;
|
|
6155
|
+
if (minimum === void 0) {
|
|
6156
|
+
return true;
|
|
6157
|
+
}
|
|
6158
|
+
const normalized = level.trim().toLowerCase();
|
|
6159
|
+
const rank = TELEMETRY_LEVEL_RANKS[normalized] ?? TELEMETRY_LEVEL_RANKS.info;
|
|
6160
|
+
return rank >= TELEMETRY_LEVEL_RANKS[minimum];
|
|
6161
|
+
}
|
|
6137
6162
|
isValidLabel(label) {
|
|
6138
6163
|
return /^[A-Za-z0-9][A-Za-z0-9_.:-]*$/.test(label) && label.length <= 256;
|
|
6139
6164
|
}
|
|
@@ -6446,6 +6471,16 @@ var NativeTelemetryHost = class _NativeTelemetryHost {
|
|
|
6446
6471
|
collectorStatus() {
|
|
6447
6472
|
return this.transport.status();
|
|
6448
6473
|
}
|
|
6474
|
+
async storeAnimationArtifact(manifest, payload) {
|
|
6475
|
+
return JSON.parse(await this.native.storeAnimationArtifact(JSON.stringify(manifest), payload));
|
|
6476
|
+
}
|
|
6477
|
+
async getAnimationArtifact(artifactId) {
|
|
6478
|
+
const result = await this.native.getAnimationArtifact(artifactId);
|
|
6479
|
+
return Buffer.isBuffer(result) ? result : JSON.parse(result);
|
|
6480
|
+
}
|
|
6481
|
+
async listAnimationArtifacts() {
|
|
6482
|
+
return JSON.parse(await this.native.listAnimationArtifacts());
|
|
6483
|
+
}
|
|
6449
6484
|
async maintenance() {
|
|
6450
6485
|
return JSON.parse(await this.native.maintenance());
|
|
6451
6486
|
}
|
|
@@ -6550,7 +6585,7 @@ var NativeTelemetryTransport = class {
|
|
|
6550
6585
|
}
|
|
6551
6586
|
};
|
|
6552
6587
|
function loadNativeModule() {
|
|
6553
|
-
const require2 = createRequire(
|
|
6588
|
+
const require2 = createRequire(typeof __filename === "string" ? __filename : import.meta.url);
|
|
6554
6589
|
const packageRoot = dirname2(require2.resolve("@noego/telemetry/package.json"));
|
|
6555
6590
|
const modulePath = resolve3(packageRoot, "native", "noego_telemetry_native.node");
|
|
6556
6591
|
const loaded = require2(modulePath);
|