@noego/telemetry 0.0.1 → 0.0.3
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/dist/cli/telemetry_bin.cjs +57 -57
- package/dist/cli/telemetry_bin.cjs.map +1 -1
- package/dist/cli/telemetry_bin.js +57 -57
- package/dist/cli/telemetry_bin.js.map +1 -1
- package/dist/cli/telemetry_cli.cjs +57 -57
- package/dist/cli/telemetry_cli.cjs.map +1 -1
- package/dist/cli/telemetry_cli.d.cts +3 -3
- package/dist/cli/telemetry_cli.d.ts +3 -3
- package/dist/cli/telemetry_cli.js +57 -57
- package/dist/cli/telemetry_cli.js.map +1 -1
- package/dist/core/index.d.cts +5 -5
- package/dist/core/index.d.ts +5 -5
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/{maintenance_coordinator.types-B-bZUNvw.d.cts → maintenance_coordinator.types-C4ULi4A4.d.cts} +2 -2
- package/dist/{maintenance_coordinator.types-CBA5y74b.d.ts → maintenance_coordinator.types-ikUrRXmO.d.ts} +2 -2
- package/dist/{metric_definition_contract-l4i4SaAp.d.ts → metric_definition_contract-BYtnODhu.d.ts} +1 -1
- package/dist/{metric_definition_contract-BR6a_GzF.d.cts → metric_definition_contract-DfhhmTZ1.d.cts} +1 -1
- package/dist/node/index.cjs +57 -57
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +5 -5
- package/dist/node/index.d.ts +5 -5
- package/dist/node/index.js +57 -57
- package/dist/node/index.js.map +1 -1
- package/dist/{query.types-DySoqYop.d.ts → query.types-DU5v7vM0.d.ts} +7 -0
- package/dist/{query.types-Bntwh6KF.d.cts → query.types-DuYWbFFe.d.cts} +7 -0
- package/dist/sqlite/index.cjs +34 -57
- package/dist/sqlite/index.cjs.map +1 -1
- package/dist/sqlite/index.d.cts +3 -3
- package/dist/sqlite/index.d.ts +3 -3
- package/dist/sqlite/index.js +34 -57
- package/dist/sqlite/index.js.map +1 -1
- package/dist/{storage.types-DjuUMinz.d.cts → storage.types-Bji_pWqr.d.cts} +1 -1
- package/dist/{storage.types-BTCGVxOM.d.ts → storage.types-k7oElEB3.d.ts} +1 -1
- package/dist/{telemetry_configuration_parser-C7Et_gwG.d.ts → telemetry_configuration_parser-BZ8Nvnle.d.ts} +3 -2
- package/dist/{telemetry_configuration_parser-R-niZQRZ.d.cts → telemetry_configuration_parser-CgSN7R6A.d.cts} +3 -2
- package/dist/testing/index.d.cts +2 -2
- package/dist/testing/index.d.ts +2 -2
- package/migrations/1785073006031_raw_events_level_index.down.sql +1 -0
- package/migrations/1785073006031_raw_events_level_index.up.sql +5 -0
- package/native/noego_telemetry_native.node +0 -0
- package/package.json +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { M as MetadataSnapshotLimits, d as MetadataSnapshot } from '../telemetry_client-CYaPYfOl.cjs';
|
|
2
2
|
export { c as MetadataRedactionRule, e as MetadataSnapshotStats, T as TelemetryAdmissionPolicy, f as TelemetryAdmissionPriority, b as TelemetryAdmissionResult, a as TelemetryClient, g as TelemetryClientOptions, h as TelemetryClientStatus } from '../telemetry_client-CYaPYfOl.cjs';
|
|
3
|
-
export { M as MetricDefinitionContract } from '../metric_definition_contract-
|
|
3
|
+
export { M as MetricDefinitionContract } from '../metric_definition_contract-DfhhmTZ1.cjs';
|
|
4
4
|
import { T as TelemetryEnvelope } from '../envelope.types-rOLpWXRC.cjs';
|
|
5
5
|
export { a as TelemetryAdmitInput, b as TelemetryEmitInput, c as TelemetryJsonObject, d as TelemetryJsonPrimitive, e as TelemetryJsonValue, f as TelemetryLevel } from '../envelope.types-rOLpWXRC.cjs';
|
|
6
|
-
import { M as MetricDefinition, f as MetricExtraction, T as TimelineQuery, b as TimelineQueryResponse, c as TelemetryQueryError, d as MetricQuery, e as MetricQueryResponse } from '../query.types-
|
|
7
|
-
export { E as ExtractedMetricSample, g as MetricAggregate, h as MetricBucket, i as MetricCardinalityRule, a as MetricExtractionFailure, j as MetricMeasurement, k as MetricOverflowPolicy, l as MetricQueryGap, m as MetricQuerySegment, n as MetricRollupValues, R as ResolvedTelemetryConfiguration, o as SqliteMaintenanceConfiguration, p as SqliteRetentionConfiguration, q as SqliteSchemaConfiguration, r as SqliteTableOverrides, S as SqliteTargetConfiguration, s as TelemetryRole, t as TimelineGap } from '../query.types-
|
|
6
|
+
import { M as MetricDefinition, f as MetricExtraction, T as TimelineQuery, b as TimelineQueryResponse, c as TelemetryQueryError, d as MetricQuery, e as MetricQueryResponse } from '../query.types-DuYWbFFe.cjs';
|
|
7
|
+
export { E as ExtractedMetricSample, g as MetricAggregate, h as MetricBucket, i as MetricCardinalityRule, a as MetricExtractionFailure, j as MetricMeasurement, k as MetricOverflowPolicy, l as MetricQueryGap, m as MetricQuerySegment, n as MetricRollupValues, R as ResolvedTelemetryConfiguration, o as SqliteMaintenanceConfiguration, p as SqliteRetentionConfiguration, q as SqliteSchemaConfiguration, r as SqliteTableOverrides, S as SqliteTargetConfiguration, s as TelemetryRole, t as TimelineGap } from '../query.types-DuYWbFFe.cjs';
|
|
8
8
|
import { T as TelemetryResult } from '../result.types-171Huujb.cjs';
|
|
9
9
|
import { d as TelemetryBatch, e as TelemetryAcknowledgement, a as TelemetryBatchValidationLimits, f as TelemetryDropCounter, T as TelemetryBatchTransport, b as TelemetryBatchTransportCapabilities, i as TelemetryBatchRouterOptions } from '../transport.types-BAl_TRtU.cjs';
|
|
10
10
|
export { c as TelemetryBatchReceiver, h as TelemetryBatchRoute, g as TelemetryDeliveryMode, j as TelemetryTargetDeliveryState } from '../transport.types-BAl_TRtU.cjs';
|
|
11
|
-
import { T as TelemetryStorageTransport, a as TelemetryStorageCapabilities, d as TelemetryStorageRouterOptions, S as StoragePersistRequest, M as MaintenanceStageResult, b as StorageTargetStatus } from '../storage.types-
|
|
12
|
-
export { c as MaintenanceRunRecord, e as TelemetryStorageTarget } from '../storage.types-
|
|
11
|
+
import { T as TelemetryStorageTransport, a as TelemetryStorageCapabilities, d as TelemetryStorageRouterOptions, S as StoragePersistRequest, M as MaintenanceStageResult, b as StorageTargetStatus } from '../storage.types-Bji_pWqr.cjs';
|
|
12
|
+
export { c as MaintenanceRunRecord, e as TelemetryStorageTarget } from '../storage.types-Bji_pWqr.cjs';
|
|
13
13
|
export { D as DEFAULT_METADATA_SNAPSHOT_LIMITS, a as DEFAULT_TELEMETRY_ADMISSION_POLICY, b as DEFAULT_TELEMETRY_BATCH_VALIDATION_LIMITS } from '../client_defaults-C9LnSX4j.cjs';
|
|
14
14
|
|
|
15
15
|
declare class BoundedMetadataSnapshotter {
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { M as MetadataSnapshotLimits, d as MetadataSnapshot } from '../telemetry_client-BXw8WH_F.js';
|
|
2
2
|
export { c as MetadataRedactionRule, e as MetadataSnapshotStats, T as TelemetryAdmissionPolicy, f as TelemetryAdmissionPriority, b as TelemetryAdmissionResult, a as TelemetryClient, g as TelemetryClientOptions, h as TelemetryClientStatus } from '../telemetry_client-BXw8WH_F.js';
|
|
3
|
-
export { M as MetricDefinitionContract } from '../metric_definition_contract-
|
|
3
|
+
export { M as MetricDefinitionContract } from '../metric_definition_contract-BYtnODhu.js';
|
|
4
4
|
import { T as TelemetryEnvelope } from '../envelope.types-rOLpWXRC.js';
|
|
5
5
|
export { a as TelemetryAdmitInput, b as TelemetryEmitInput, c as TelemetryJsonObject, d as TelemetryJsonPrimitive, e as TelemetryJsonValue, f as TelemetryLevel } from '../envelope.types-rOLpWXRC.js';
|
|
6
|
-
import { M as MetricDefinition, f as MetricExtraction, T as TimelineQuery, b as TimelineQueryResponse, c as TelemetryQueryError, d as MetricQuery, e as MetricQueryResponse } from '../query.types-
|
|
7
|
-
export { E as ExtractedMetricSample, g as MetricAggregate, h as MetricBucket, i as MetricCardinalityRule, a as MetricExtractionFailure, j as MetricMeasurement, k as MetricOverflowPolicy, l as MetricQueryGap, m as MetricQuerySegment, n as MetricRollupValues, R as ResolvedTelemetryConfiguration, o as SqliteMaintenanceConfiguration, p as SqliteRetentionConfiguration, q as SqliteSchemaConfiguration, r as SqliteTableOverrides, S as SqliteTargetConfiguration, s as TelemetryRole, t as TimelineGap } from '../query.types-
|
|
6
|
+
import { M as MetricDefinition, f as MetricExtraction, T as TimelineQuery, b as TimelineQueryResponse, c as TelemetryQueryError, d as MetricQuery, e as MetricQueryResponse } from '../query.types-DU5v7vM0.js';
|
|
7
|
+
export { E as ExtractedMetricSample, g as MetricAggregate, h as MetricBucket, i as MetricCardinalityRule, a as MetricExtractionFailure, j as MetricMeasurement, k as MetricOverflowPolicy, l as MetricQueryGap, m as MetricQuerySegment, n as MetricRollupValues, R as ResolvedTelemetryConfiguration, o as SqliteMaintenanceConfiguration, p as SqliteRetentionConfiguration, q as SqliteSchemaConfiguration, r as SqliteTableOverrides, S as SqliteTargetConfiguration, s as TelemetryRole, t as TimelineGap } from '../query.types-DU5v7vM0.js';
|
|
8
8
|
import { T as TelemetryResult } from '../result.types-171Huujb.js';
|
|
9
9
|
import { d as TelemetryBatch, e as TelemetryAcknowledgement, a as TelemetryBatchValidationLimits, f as TelemetryDropCounter, T as TelemetryBatchTransport, b as TelemetryBatchTransportCapabilities, i as TelemetryBatchRouterOptions } from '../transport.types-DDnZoKWi.js';
|
|
10
10
|
export { c as TelemetryBatchReceiver, h as TelemetryBatchRoute, g as TelemetryDeliveryMode, j as TelemetryTargetDeliveryState } from '../transport.types-DDnZoKWi.js';
|
|
11
|
-
import { T as TelemetryStorageTransport, a as TelemetryStorageCapabilities, d as TelemetryStorageRouterOptions, S as StoragePersistRequest, M as MaintenanceStageResult, b as StorageTargetStatus } from '../storage.types-
|
|
12
|
-
export { c as MaintenanceRunRecord, e as TelemetryStorageTarget } from '../storage.types-
|
|
11
|
+
import { T as TelemetryStorageTransport, a as TelemetryStorageCapabilities, d as TelemetryStorageRouterOptions, S as StoragePersistRequest, M as MaintenanceStageResult, b as StorageTargetStatus } from '../storage.types-k7oElEB3.js';
|
|
12
|
+
export { c as MaintenanceRunRecord, e as TelemetryStorageTarget } from '../storage.types-k7oElEB3.js';
|
|
13
13
|
export { D as DEFAULT_METADATA_SNAPSHOT_LIMITS, a as DEFAULT_TELEMETRY_ADMISSION_POLICY, b as DEFAULT_TELEMETRY_BATCH_VALIDATION_LIMITS } from '../client_defaults-B5tC-TgG.js';
|
|
14
14
|
|
|
15
15
|
declare class BoundedMetadataSnapshotter {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { BoundedMetadataSnapshotter, MetricExtractor, TelemetryAcknowledgementContract, TelemetryBatchContract, TelemetryBatchRouter, TelemetryStorageRouter } from './core/index.cjs';
|
|
2
|
-
export { M as MetricDefinitionContract } from './metric_definition_contract-
|
|
2
|
+
export { M as MetricDefinitionContract } from './metric_definition_contract-DfhhmTZ1.cjs';
|
|
3
3
|
export { c as MetadataRedactionRule, d as MetadataSnapshot, M as MetadataSnapshotLimits, e as MetadataSnapshotStats, T as TelemetryAdmissionPolicy, f as TelemetryAdmissionPriority, b as TelemetryAdmissionResult, a as TelemetryClient, g as TelemetryClientOptions, h as TelemetryClientStatus } from './telemetry_client-CYaPYfOl.cjs';
|
|
4
4
|
export { D as DEFAULT_METADATA_SNAPSHOT_LIMITS, a as DEFAULT_TELEMETRY_ADMISSION_POLICY, b as DEFAULT_TELEMETRY_BATCH_VALIDATION_LIMITS } from './client_defaults-C9LnSX4j.cjs';
|
|
5
|
-
import { f as MetricExtraction } from './query.types-
|
|
6
|
-
export { E as ExtractedMetricSample, g as MetricAggregate, h as MetricBucket, i as MetricCardinalityRule, M as MetricDefinition, a as MetricExtractionFailure, j as MetricMeasurement, k as MetricOverflowPolicy, d as MetricQuery, l as MetricQueryGap, e as MetricQueryResponse, m as MetricQuerySegment, n as MetricRollupValues, R as ResolvedTelemetryConfiguration, o as SqliteMaintenanceConfiguration, p as SqliteRetentionConfiguration, q as SqliteSchemaConfiguration, r as SqliteTableOverrides, S as SqliteTargetConfiguration, c as TelemetryQueryError, s as TelemetryRole, t as TimelineGap, T as TimelineQuery, b as TimelineQueryResponse } from './query.types-
|
|
5
|
+
import { f as MetricExtraction } from './query.types-DuYWbFFe.cjs';
|
|
6
|
+
export { E as ExtractedMetricSample, g as MetricAggregate, h as MetricBucket, i as MetricCardinalityRule, M as MetricDefinition, a as MetricExtractionFailure, j as MetricMeasurement, k as MetricOverflowPolicy, d as MetricQuery, l as MetricQueryGap, e as MetricQueryResponse, m as MetricQuerySegment, n as MetricRollupValues, R as ResolvedTelemetryConfiguration, o as SqliteMaintenanceConfiguration, p as SqliteRetentionConfiguration, q as SqliteSchemaConfiguration, r as SqliteTableOverrides, S as SqliteTargetConfiguration, c as TelemetryQueryError, s as TelemetryRole, t as TimelineGap, T as TimelineQuery, b as TimelineQueryResponse } from './query.types-DuYWbFFe.cjs';
|
|
7
7
|
export { a as TelemetryAdmitInput, b as TelemetryEmitInput, T as TelemetryEnvelope, c as TelemetryJsonObject, d as TelemetryJsonPrimitive, e as TelemetryJsonValue, f as TelemetryLevel } from './envelope.types-rOLpWXRC.cjs';
|
|
8
8
|
export { T as TelemetryResult } from './result.types-171Huujb.cjs';
|
|
9
|
-
export { c as MaintenanceRunRecord, M as MaintenanceStageResult, S as StoragePersistRequest, b as StorageTargetStatus, a as TelemetryStorageCapabilities, d as TelemetryStorageRouterOptions, e as TelemetryStorageTarget, T as TelemetryStorageTransport } from './storage.types-
|
|
9
|
+
export { c as MaintenanceRunRecord, M as MaintenanceStageResult, S as StoragePersistRequest, b as StorageTargetStatus, a as TelemetryStorageCapabilities, d as TelemetryStorageRouterOptions, e as TelemetryStorageTarget, T as TelemetryStorageTransport } from './storage.types-Bji_pWqr.cjs';
|
|
10
10
|
import { d as TelemetryBatch } from './transport.types-BAl_TRtU.cjs';
|
|
11
11
|
export { e as TelemetryAcknowledgement, c as TelemetryBatchReceiver, h as TelemetryBatchRoute, i as TelemetryBatchRouterOptions, T as TelemetryBatchTransport, b as TelemetryBatchTransportCapabilities, a as TelemetryBatchValidationLimits, g as TelemetryDeliveryMode, f as TelemetryDropCounter, j as TelemetryTargetDeliveryState } from './transport.types-BAl_TRtU.cjs';
|
|
12
12
|
export { I as InMemoryBatchTransport } from './in_memory_batch_transport-DKW9EZnU.cjs';
|
|
13
|
-
import { T as TelemetrySinkPlugin, a as TelemetryMetricPlugin, M as MaintenanceCoordinatorOptions, b as MaintenanceRunResult } from './maintenance_coordinator.types-
|
|
14
|
-
export { c as MaintenanceLifecycleEvent, d as TelemetryCollectorOptions, e as TelemetryCollectorRuntime, f as TelemetryCollectorStatus } from './maintenance_coordinator.types-
|
|
13
|
+
import { T as TelemetrySinkPlugin, a as TelemetryMetricPlugin, M as MaintenanceCoordinatorOptions, b as MaintenanceRunResult } from './maintenance_coordinator.types-C4ULi4A4.cjs';
|
|
14
|
+
export { c as MaintenanceLifecycleEvent, d as TelemetryCollectorOptions, e as TelemetryCollectorRuntime, f as TelemetryCollectorStatus } from './maintenance_coordinator.types-C4ULi4A4.cjs';
|
|
15
15
|
|
|
16
16
|
type TelemetryPluginRegistryOptions = Readonly<{
|
|
17
17
|
supportedSchemaVersions: readonly number[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { BoundedMetadataSnapshotter, MetricExtractor, TelemetryAcknowledgementContract, TelemetryBatchContract, TelemetryBatchRouter, TelemetryStorageRouter } from './core/index.js';
|
|
2
|
-
export { M as MetricDefinitionContract } from './metric_definition_contract-
|
|
2
|
+
export { M as MetricDefinitionContract } from './metric_definition_contract-BYtnODhu.js';
|
|
3
3
|
export { c as MetadataRedactionRule, d as MetadataSnapshot, M as MetadataSnapshotLimits, e as MetadataSnapshotStats, T as TelemetryAdmissionPolicy, f as TelemetryAdmissionPriority, b as TelemetryAdmissionResult, a as TelemetryClient, g as TelemetryClientOptions, h as TelemetryClientStatus } from './telemetry_client-BXw8WH_F.js';
|
|
4
4
|
export { D as DEFAULT_METADATA_SNAPSHOT_LIMITS, a as DEFAULT_TELEMETRY_ADMISSION_POLICY, b as DEFAULT_TELEMETRY_BATCH_VALIDATION_LIMITS } from './client_defaults-B5tC-TgG.js';
|
|
5
|
-
import { f as MetricExtraction } from './query.types-
|
|
6
|
-
export { E as ExtractedMetricSample, g as MetricAggregate, h as MetricBucket, i as MetricCardinalityRule, M as MetricDefinition, a as MetricExtractionFailure, j as MetricMeasurement, k as MetricOverflowPolicy, d as MetricQuery, l as MetricQueryGap, e as MetricQueryResponse, m as MetricQuerySegment, n as MetricRollupValues, R as ResolvedTelemetryConfiguration, o as SqliteMaintenanceConfiguration, p as SqliteRetentionConfiguration, q as SqliteSchemaConfiguration, r as SqliteTableOverrides, S as SqliteTargetConfiguration, c as TelemetryQueryError, s as TelemetryRole, t as TimelineGap, T as TimelineQuery, b as TimelineQueryResponse } from './query.types-
|
|
5
|
+
import { f as MetricExtraction } from './query.types-DU5v7vM0.js';
|
|
6
|
+
export { E as ExtractedMetricSample, g as MetricAggregate, h as MetricBucket, i as MetricCardinalityRule, M as MetricDefinition, a as MetricExtractionFailure, j as MetricMeasurement, k as MetricOverflowPolicy, d as MetricQuery, l as MetricQueryGap, e as MetricQueryResponse, m as MetricQuerySegment, n as MetricRollupValues, R as ResolvedTelemetryConfiguration, o as SqliteMaintenanceConfiguration, p as SqliteRetentionConfiguration, q as SqliteSchemaConfiguration, r as SqliteTableOverrides, S as SqliteTargetConfiguration, c as TelemetryQueryError, s as TelemetryRole, t as TimelineGap, T as TimelineQuery, b as TimelineQueryResponse } from './query.types-DU5v7vM0.js';
|
|
7
7
|
export { a as TelemetryAdmitInput, b as TelemetryEmitInput, T as TelemetryEnvelope, c as TelemetryJsonObject, d as TelemetryJsonPrimitive, e as TelemetryJsonValue, f as TelemetryLevel } from './envelope.types-rOLpWXRC.js';
|
|
8
8
|
export { T as TelemetryResult } from './result.types-171Huujb.js';
|
|
9
|
-
export { c as MaintenanceRunRecord, M as MaintenanceStageResult, S as StoragePersistRequest, b as StorageTargetStatus, a as TelemetryStorageCapabilities, d as TelemetryStorageRouterOptions, e as TelemetryStorageTarget, T as TelemetryStorageTransport } from './storage.types-
|
|
9
|
+
export { c as MaintenanceRunRecord, M as MaintenanceStageResult, S as StoragePersistRequest, b as StorageTargetStatus, a as TelemetryStorageCapabilities, d as TelemetryStorageRouterOptions, e as TelemetryStorageTarget, T as TelemetryStorageTransport } from './storage.types-k7oElEB3.js';
|
|
10
10
|
import { d as TelemetryBatch } from './transport.types-DDnZoKWi.js';
|
|
11
11
|
export { e as TelemetryAcknowledgement, c as TelemetryBatchReceiver, h as TelemetryBatchRoute, i as TelemetryBatchRouterOptions, T as TelemetryBatchTransport, b as TelemetryBatchTransportCapabilities, a as TelemetryBatchValidationLimits, g as TelemetryDeliveryMode, f as TelemetryDropCounter, j as TelemetryTargetDeliveryState } from './transport.types-DDnZoKWi.js';
|
|
12
12
|
export { I as InMemoryBatchTransport } from './in_memory_batch_transport-oOwNxXnA.js';
|
|
13
|
-
import { T as TelemetrySinkPlugin, a as TelemetryMetricPlugin, M as MaintenanceCoordinatorOptions, b as MaintenanceRunResult } from './maintenance_coordinator.types-
|
|
14
|
-
export { c as MaintenanceLifecycleEvent, d as TelemetryCollectorOptions, e as TelemetryCollectorRuntime, f as TelemetryCollectorStatus } from './maintenance_coordinator.types-
|
|
13
|
+
import { T as TelemetrySinkPlugin, a as TelemetryMetricPlugin, M as MaintenanceCoordinatorOptions, b as MaintenanceRunResult } from './maintenance_coordinator.types-ikUrRXmO.js';
|
|
14
|
+
export { c as MaintenanceLifecycleEvent, d as TelemetryCollectorOptions, e as TelemetryCollectorRuntime, f as TelemetryCollectorStatus } from './maintenance_coordinator.types-ikUrRXmO.js';
|
|
15
15
|
|
|
16
16
|
type TelemetryPluginRegistryOptions = Readonly<{
|
|
17
17
|
supportedSchemaVersions: readonly number[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TelemetryStorageTransport, e as TelemetryStorageTarget, a as TelemetryStorageCapabilities, b as StorageTargetStatus, M as MaintenanceStageResult } from './storage.types-
|
|
2
|
-
import { M as MetricDefinition, f as MetricExtraction } from './query.types-
|
|
1
|
+
import { T as TelemetryStorageTransport, e as TelemetryStorageTarget, a as TelemetryStorageCapabilities, b as StorageTargetStatus, M as MaintenanceStageResult } from './storage.types-Bji_pWqr.cjs';
|
|
2
|
+
import { M as MetricDefinition, f as MetricExtraction } from './query.types-DuYWbFFe.cjs';
|
|
3
3
|
import { d as TelemetryBatch, a as TelemetryBatchValidationLimits, f as TelemetryDropCounter, c as TelemetryBatchReceiver, e as TelemetryAcknowledgement } from './transport.types-BAl_TRtU.cjs';
|
|
4
4
|
|
|
5
5
|
interface TelemetrySinkPlugin {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TelemetryStorageTransport, e as TelemetryStorageTarget, a as TelemetryStorageCapabilities, b as StorageTargetStatus, M as MaintenanceStageResult } from './storage.types-
|
|
2
|
-
import { M as MetricDefinition, f as MetricExtraction } from './query.types-
|
|
1
|
+
import { T as TelemetryStorageTransport, e as TelemetryStorageTarget, a as TelemetryStorageCapabilities, b as StorageTargetStatus, M as MaintenanceStageResult } from './storage.types-k7oElEB3.js';
|
|
2
|
+
import { M as MetricDefinition, f as MetricExtraction } from './query.types-DU5v7vM0.js';
|
|
3
3
|
import { d as TelemetryBatch, a as TelemetryBatchValidationLimits, f as TelemetryDropCounter, c as TelemetryBatchReceiver, e as TelemetryAcknowledgement } from './transport.types-DDnZoKWi.js';
|
|
4
4
|
|
|
5
5
|
interface TelemetrySinkPlugin {
|
package/dist/node/index.cjs
CHANGED
|
@@ -3979,73 +3979,49 @@ var TelemetryRepository = class {
|
|
|
3979
3979
|
lastSequence: sample.sequence
|
|
3980
3980
|
};
|
|
3981
3981
|
}
|
|
3982
|
+
/**
|
|
3983
|
+
* Raw retention is purely time-based, matching the native collector: every
|
|
3984
|
+
* expired row goes in one set-based statement per level band. No page size,
|
|
3985
|
+
* no row cap, and no rollup-completion gate — metric samples are extracted at
|
|
3986
|
+
* ingest and retained on their own clock, so dropping a raw row costs no
|
|
3987
|
+
* metric fidelity, and no row can outlive its window waiting on a rollup.
|
|
3988
|
+
*/
|
|
3982
3989
|
createRawEventRetentionStep(nowMs) {
|
|
3983
|
-
const cutoffMs = nowMs - this.options.retention.rawMs;
|
|
3984
3990
|
const table = this.options.tableMap.quoted("rawEvents");
|
|
3985
|
-
const
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
WHERE target_id = ? AND occurred_at_ms < ?
|
|
3991
|
-
ORDER BY occurred_at_ms ASC, producer_id ASC, sequence ASC
|
|
3992
|
-
LIMIT ${RETENTION_PAGE_SIZE}`
|
|
3993
|
-
);
|
|
3994
|
-
const readNextPage = this.options.connection.prepare(
|
|
3995
|
-
`SELECT producer_id, sequence, event_id, occurred_at_ms, monotonic_ns,
|
|
3996
|
-
source, process_kind, level, label, conversation_id,
|
|
3997
|
-
conversation_id_kind, correlation_id, metadata_json, schema_version
|
|
3998
|
-
FROM ${table}
|
|
3999
|
-
WHERE target_id = ? AND occurred_at_ms < ?
|
|
4000
|
-
AND (occurred_at_ms, producer_id, sequence) > (?, ?, ?)
|
|
4001
|
-
ORDER BY occurred_at_ms ASC, producer_id ASC, sequence ASC
|
|
4002
|
-
LIMIT ${RETENTION_PAGE_SIZE}`
|
|
3991
|
+
const levelMs = this.options.retention.levelMs ?? {};
|
|
3992
|
+
const levels = Object.keys(levelMs);
|
|
3993
|
+
const removeByLevel = this.options.connection.prepare(
|
|
3994
|
+
`DELETE FROM ${table}
|
|
3995
|
+
WHERE target_id = ? AND lower(coalesce(level, '')) = ? AND occurred_at_ms < ?`
|
|
4003
3996
|
);
|
|
4004
|
-
const
|
|
4005
|
-
|
|
3997
|
+
const fallbackPlaceholders = levels.map(() => "?").join(", ");
|
|
3998
|
+
const removeFallback = this.options.connection.prepare(
|
|
3999
|
+
`DELETE FROM ${table}
|
|
4000
|
+
WHERE target_id = ? AND occurred_at_ms < ?` + (levels.length === 0 ? "" : ` AND lower(coalesce(level, '')) NOT IN (${fallbackPlaceholders})`)
|
|
4006
4001
|
);
|
|
4007
|
-
let
|
|
4002
|
+
let done = false;
|
|
4008
4003
|
return () => {
|
|
4009
|
-
|
|
4010
|
-
this.options.targetId,
|
|
4011
|
-
cutoffMs,
|
|
4012
|
-
cursor.occurredAtMs,
|
|
4013
|
-
cursor.producerId,
|
|
4014
|
-
cursor.sequence
|
|
4015
|
-
);
|
|
4016
|
-
if (rows.length === 0) {
|
|
4004
|
+
if (done) {
|
|
4017
4005
|
return { deleted: 0, done: true };
|
|
4018
4006
|
}
|
|
4019
|
-
|
|
4020
|
-
const parsed = this.rowParser.parseRawEnvelope(row);
|
|
4021
|
-
if (!parsed.ok) {
|
|
4022
|
-
throw new Error(parsed.error);
|
|
4023
|
-
}
|
|
4024
|
-
return parsed.value;
|
|
4025
|
-
});
|
|
4026
|
-
const eligible = scanned.filter((envelope) => this.rawEventHasRequiredRollups(envelope));
|
|
4007
|
+
done = true;
|
|
4027
4008
|
const transaction = this.options.connection.transaction(() => {
|
|
4028
|
-
let
|
|
4029
|
-
for (const
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
).changes;
|
|
4009
|
+
let deleted = 0;
|
|
4010
|
+
for (const level of levels) {
|
|
4011
|
+
const retainMs = levelMs[level];
|
|
4012
|
+
if (retainMs === void 0) {
|
|
4013
|
+
continue;
|
|
4014
|
+
}
|
|
4015
|
+
deleted += removeByLevel.run(this.options.targetId, level, nowMs - retainMs).changes;
|
|
4035
4016
|
}
|
|
4036
|
-
|
|
4017
|
+
deleted += removeFallback.run(
|
|
4018
|
+
this.options.targetId,
|
|
4019
|
+
nowMs - this.options.retention.rawMs,
|
|
4020
|
+
...levels
|
|
4021
|
+
).changes;
|
|
4022
|
+
return deleted;
|
|
4037
4023
|
});
|
|
4038
|
-
|
|
4039
|
-
const last = scanned[scanned.length - 1];
|
|
4040
|
-
if (last === void 0 || rows.length < RETENTION_PAGE_SIZE) {
|
|
4041
|
-
return { deleted, done: true };
|
|
4042
|
-
}
|
|
4043
|
-
cursor = {
|
|
4044
|
-
occurredAtMs: last.occurredAtMs,
|
|
4045
|
-
producerId: last.producerId,
|
|
4046
|
-
sequence: last.sequence
|
|
4047
|
-
};
|
|
4048
|
-
return { deleted, done: false };
|
|
4024
|
+
return { deleted: transaction(), done: true };
|
|
4049
4025
|
};
|
|
4050
4026
|
}
|
|
4051
4027
|
rawEventHasRequiredRollups(envelope) {
|
|
@@ -4786,6 +4762,7 @@ var TelemetryTableMap = class _TelemetryTableMap {
|
|
|
4786
4762
|
rawEventsOccurredIndex: this.indexName(mapping.rawEvents, "occurred"),
|
|
4787
4763
|
rawEventsConversationIndex: this.indexName(mapping.rawEvents, "conversation"),
|
|
4788
4764
|
rawEventsLabelIndex: this.indexName(mapping.rawEvents, "label"),
|
|
4765
|
+
rawEventsLevelIndex: this.indexName(mapping.rawEvents, "level"),
|
|
4789
4766
|
metricSamplesTimeIndex: this.indexName(mapping.metricSamples, "time"),
|
|
4790
4767
|
metricSamplesEventIndex: this.indexName(mapping.metricSamples, "event"),
|
|
4791
4768
|
metricRollupsTimeIndex: this.indexName(mapping.metricRollups, "time")
|
|
@@ -6775,6 +6752,7 @@ var SqliteTargetSchema = import_zod3.z.object({
|
|
|
6775
6752
|
raw: DurationSchema,
|
|
6776
6753
|
lateArrival: DurationSchema.optional(),
|
|
6777
6754
|
samples: DurationSchema.optional(),
|
|
6755
|
+
levels: import_zod3.z.record(import_zod3.z.string().min(1), DurationSchema).optional(),
|
|
6778
6756
|
rollups: import_zod3.z.array(
|
|
6779
6757
|
import_zod3.z.object({
|
|
6780
6758
|
resolution: DurationSchema,
|
|
@@ -6917,6 +6895,7 @@ var NodeTelemetryConfigurationParser = class {
|
|
|
6917
6895
|
true
|
|
6918
6896
|
);
|
|
6919
6897
|
const samplesMs = target.retention.samples === void 0 ? rawMs + lateArrivalMs : this.durations.parse(target.retention.samples, `${field}.retention.samples`);
|
|
6898
|
+
const levelMs = this.resolveLevelRetention(target.retention.levels, field);
|
|
6920
6899
|
const rollups = target.retention.rollups.map(
|
|
6921
6900
|
(tier, tierIndex) => Object.freeze({
|
|
6922
6901
|
resolutionMs: this.durations.parse(
|
|
@@ -6951,6 +6930,7 @@ var NodeTelemetryConfigurationParser = class {
|
|
|
6951
6930
|
rawMs,
|
|
6952
6931
|
lateArrivalMs,
|
|
6953
6932
|
samplesMs,
|
|
6933
|
+
levelMs,
|
|
6954
6934
|
rollups: Object.freeze(rollups)
|
|
6955
6935
|
}),
|
|
6956
6936
|
maintenance: Object.freeze({
|
|
@@ -6981,6 +6961,26 @@ var NodeTelemetryConfigurationParser = class {
|
|
|
6981
6961
|
}
|
|
6982
6962
|
return resolved;
|
|
6983
6963
|
}
|
|
6964
|
+
resolveLevelRetention(levels, field) {
|
|
6965
|
+
if (levels === void 0) {
|
|
6966
|
+
return Object.freeze({});
|
|
6967
|
+
}
|
|
6968
|
+
const resolved = {};
|
|
6969
|
+
for (const [level, duration] of Object.entries(levels)) {
|
|
6970
|
+
const normalized = level.trim().toLowerCase();
|
|
6971
|
+
if (normalized.length === 0) {
|
|
6972
|
+
throw new Error(`${field}.retention.levels contains an empty level name`);
|
|
6973
|
+
}
|
|
6974
|
+
if (resolved[normalized] !== void 0) {
|
|
6975
|
+
throw new Error(`${field}.retention.levels declares "${normalized}" more than once`);
|
|
6976
|
+
}
|
|
6977
|
+
resolved[normalized] = this.durations.parse(
|
|
6978
|
+
duration,
|
|
6979
|
+
`${field}.retention.levels.${normalized}`
|
|
6980
|
+
);
|
|
6981
|
+
}
|
|
6982
|
+
return Object.freeze(resolved);
|
|
6983
|
+
}
|
|
6984
6984
|
validateRetention(target, field) {
|
|
6985
6985
|
const retention = target.retention;
|
|
6986
6986
|
const requiredSamplesMs = retention.rawMs + retention.lateArrivalMs;
|