@mastra/duckdb 1.16.0 → 1.17.0-alpha.1
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 -1
- package/dist/docs/SKILL.md +2 -2
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/integrations-databases-duckdb.md +2 -2
- package/dist/{features-DH60yLCA.cjs → features-CBdrOdEO.cjs} +98 -9
- package/dist/features-CBdrOdEO.cjs.map +1 -0
- package/dist/{features-B8gl38Ue.js → features-D9RrctvA.js} +71 -6
- package/dist/features-D9RrctvA.js.map +1 -0
- package/dist/index.cjs +25 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -8
- package/dist/index.js.map +1 -1
- package/dist/{observability-BEdkwaeY.cjs → observability-B_ARB4Uv.cjs} +85 -24
- package/dist/observability-B_ARB4Uv.cjs.map +1 -0
- package/dist/{observability-B-Kt8vrw.js → observability-CN4Rwgv9.js} +85 -24
- package/dist/observability-CN4Rwgv9.js.map +1 -0
- package/dist/storage/db/index.d.ts +5 -0
- package/dist/storage/db/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/index.d.ts +1 -1
- package/dist/storage/domains/observability/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/preview-compat.d.ts +4 -0
- package/dist/storage/domains/observability/preview-compat.d.ts.map +1 -1
- package/dist/storage/domains/observability/span-query.d.ts +4 -0
- package/dist/storage/domains/observability/span-query.d.ts.map +1 -1
- package/dist/storage/domains/observability/thread-query.d.ts +1 -0
- package/dist/storage/domains/observability/thread-query.d.ts.map +1 -1
- package/dist/storage/domains/observability/trace-aggregate.d.ts.map +1 -1
- package/dist/storage/domains/observability/trace-query.d.ts.map +1 -1
- package/dist/storage/features.d.ts +9 -3
- package/dist/storage/features.d.ts.map +1 -1
- package/dist/storage/index.d.ts +3 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/features-B8gl38Ue.js.map +0 -1
- package/dist/features-DH60yLCA.cjs.map +0 -1
- package/dist/observability-B-Kt8vrw.js.map +0 -1
- package/dist/observability-BEdkwaeY.cjs.map +0 -1
- /package/dist/docs/references/{reference-vectors-duckdb.md → integrations-vectors-duckdb.md} +0 -0
|
@@ -40,12 +40,17 @@ export declare class DuckDBConnection extends MastraBase {
|
|
|
40
40
|
private instance;
|
|
41
41
|
private initialized;
|
|
42
42
|
private initPromise;
|
|
43
|
+
private closed;
|
|
44
|
+
private activeConnections;
|
|
45
|
+
private drainPromise;
|
|
46
|
+
private finishDrain;
|
|
43
47
|
private path;
|
|
44
48
|
private instanceOptions;
|
|
45
49
|
constructor(config?: DuckDBStorageConfig);
|
|
46
50
|
private initialize;
|
|
47
51
|
/** Create a new connection to the DuckDB instance, initializing if needed. */
|
|
48
52
|
getConnection(): Promise<import("@duckdb/node-api").DuckDBConnection>;
|
|
53
|
+
private releaseConnection;
|
|
49
54
|
private closeConnection;
|
|
50
55
|
/**
|
|
51
56
|
* Execute a SQL query and return results as objects.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/db/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAyB5F;AAgBD,2DAA2D;AAC3D,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,cAGC;CACF;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,0FAA0F;IAC1F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,C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O3C;YAEa,UAAU;IA0BxB,8EAA8E;IACxE,aAAa,yDAwClB;IAED,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,eAAe;IA4BvB;;OAEG;IACG,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,EAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CA+C9G;IAED;;OAEG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBhE;IAED,gFAAgF;IAC1E,UAAU,CAAC,EACf,SAAS,EACT,MAAM,EACN,MAAM,EACN,KAAK,GACN,EAAE;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,IAAI,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,MAAM,CAAC,CAkBlB;IAED,oFAAoF;IAC9E,kBAAkB,CAAC,UAAU,EAAE,SAAS;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,CAAA;KAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B3G;IAED;;;;;;;;OAQG;IACG,YAAY,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAYlE;IAED;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAWtC;IAED,gEAAgE;IAC1D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAsB3B;CACF"}
|
|
@@ -38,7 +38,7 @@ export declare class ObservabilityStorageDuckDB extends ObservabilityStorage {
|
|
|
38
38
|
preferred: ObservabilityStorageStrategy;
|
|
39
39
|
supported: ObservabilityStorageStrategy[];
|
|
40
40
|
};
|
|
41
|
-
getFeatures(): readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope")[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope")[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope")[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope")[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope")[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope")[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope")[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", ...("feedback" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-root-duration" | "trace-query-tenant-scope")[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", ...never[], "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", ...never[], "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", ...never[], "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", ...never[], "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", ...never[], "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", ...never[], "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", ...never[], "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...never[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...never[], "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-aggregate", ...never[], "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-root-span-fields", "trace-query-root-entity-id"];
|
|
41
|
+
getFeatures(): readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "thread-query-rows" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "thread-query-rows" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", ...("feedback" | "span-aggregate" | "span-aggregate-model-dimensions" | "span-query-outcome-fields" | "thread-query" | "thread-query-rows" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", ...("feedback" | "span-aggregate" | "span-aggregate-model-dimensions" | "span-query-outcome-fields" | "thread-query" | "thread-query-rows" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "thread-query-rows" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "thread-query-rows" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", ...("feedback" | "span-query-outcome-fields" | "thread-query" | "trace-query-context-ids" | "trace-query-discovery" | "trace-query-outcome-fields" | "trace-query-root-duration" | "trace-query-tenant-scope" | "trace-query-time-to-first-chunk" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields" | "trace-query-time-to-first-token-sort")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"] | readonly ["metrics", "logs", "entity-type-discovery", "entity-name-discovery", "service-name-discovery", "environment-discovery", "tag-discovery", "metric-discovery", "delta-polling", "trace-query", "trace-aggregate", "span-query", "span-query-context-fields", "span-query-model-fields", "span-aggregate", "span-aggregate-model-dimensions", "thread-query-rows", "trace-query-root-duration", "trace-query-discovery", "thread-query", "trace-query-tenant-scope", "feedback", "trace-query-context-ids", "trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort", ...("span-query-outcome-fields" | "trace-query-outcome-fields")[], "trace-query-root-span-fields", "trace-query-root-entity-id"];
|
|
42
42
|
createSpan(args: CreateSpanArgs): Promise<void>;
|
|
43
43
|
batchCreateSpans(args: BatchCreateSpansArgs): Promise<void>;
|
|
44
44
|
batchDeleteTraces(args: BatchDeleteTracesArgs): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,8BAA8B,EAC9B,wBAAwB,EACxB,4BAA4B,EAC5B,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,8BAA8B,EAC9B,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,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C3C,SAAS,EAAE,4BAA4B,CAAC;QACxC,SAAS,EAAE,4BAA4B,EAAE,CAAC;KAC3C,CAKA;IAEQ,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,8BAA8B,EAC9B,wBAAwB,EACxB,4BAA4B,EAC5B,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,EAC7B,0BAA0B,EAC1B,8BAA8B,EAC9B,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,wB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AAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAE7F;IAGK,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5D;IACK,mBAAmB,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtE;IACK,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5D;IACK,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAExE;IACK,0BAA0B,CAAC,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,cAAc,CAAC,CAE9F;IACK,oBAAoB,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAEhG;IACK,oBAAoB,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAEhG;IACK,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAEnG;IACK,sBAAsB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAEtG;CACF"}
|
|
@@ -46,6 +46,10 @@ export declare function buildSpanQueryResponse(...args: Parameters<typeof coreSt
|
|
|
46
46
|
outputPreview: string | null;
|
|
47
47
|
errorPreview: string | null;
|
|
48
48
|
timeToFirstChunkMs?: number | null | undefined;
|
|
49
|
+
timeToFirstTokenMs?: number | null | undefined;
|
|
50
|
+
outcome?: string | null | undefined;
|
|
51
|
+
stopReason?: string | null | undefined;
|
|
52
|
+
stopReasonContext?: Record<string, unknown> | null | undefined;
|
|
49
53
|
}[];
|
|
50
54
|
page: {
|
|
51
55
|
next: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-compat.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/preview-compat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AAMpD,eAAO,MAAM,mBAAmB,SAAkC,CAAC;AAEnE,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,KAAK,EAAE,OAAO,EACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,GAAG,IAAI,CAEf;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,UAAQ,GAAG,MAAM,GAAG,IAAI,CAcnG;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,sBAAsB,CAAC
|
|
1
|
+
{"version":3,"file":"preview-compat.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/preview-compat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AAMpD,eAAO,MAAM,mBAAmB,SAAkC,CAAC;AAEnE,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEpD;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,KAAK,EAAE,OAAO,EACd,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,MAAM,GAAG,IAAI,CAEf;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,UAAQ,GAAG,MAAM,GAAG,IAAI,CAcnG;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCpG"}
|
|
@@ -52,6 +52,10 @@ export declare function querySpans(db: DuckDBConnection, plan: TrustedSpanQueryP
|
|
|
52
52
|
outputPreview: string | null;
|
|
53
53
|
errorPreview: string | null;
|
|
54
54
|
timeToFirstChunkMs?: number | null | undefined;
|
|
55
|
+
timeToFirstTokenMs?: number | null | undefined;
|
|
56
|
+
outcome?: string | null | undefined;
|
|
57
|
+
stopReason?: string | null | undefined;
|
|
58
|
+
stopReasonContext?: Record<string, unknown> | null | undefined;
|
|
55
59
|
}[];
|
|
56
60
|
page: {
|
|
57
61
|
next: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"span-query.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/span-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAKV,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"span-query.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/span-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAKV,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAkFjD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG;IAC7G,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB,CAyCA;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,oBAAoB;;;EAUhE;AAcD,wBAAsB,UAAU,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+GhF"}
|
|
@@ -34,6 +34,7 @@ export declare function queryThreadRows(db: DuckDBConnection, plan: TrustedThrea
|
|
|
34
34
|
startedAt: string;
|
|
35
35
|
endedAt: string;
|
|
36
36
|
timeToFirstChunkMs: number | null;
|
|
37
|
+
timeToFirstTokenMs?: number | null | undefined;
|
|
37
38
|
inputPreview: string | null;
|
|
38
39
|
outputPreview: string | null;
|
|
39
40
|
errorPreview: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thread-query.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/thread-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,0BAA0B,EAE3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"thread-query.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/thread-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,0BAA0B,EAE3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAiCjD,KAAK,aAAa,GAAG;IACnB,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAMpE;AAED,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,0BAA0B,EAChC,QAAQ,GAAE,MAAM,GAAG,YAAY,GAAG,OAAgB;;;EAqHnD;AAeD,wBAAsB,eAAe,CACnC,EAAE,EAAE,gBAAgB,EACpB,IAAI,EAAE,0BAA0B,EAEhC,QAAQ,GAAE,MAAM,GAAG,YAAY,GAAG,MAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqF7C,IAAI;;GAUT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace-aggregate.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/trace-aggregate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EAErB,sBAAsB,EAItB,wBAAwB,EAGxB,yBAAyB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAWvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"trace-aggregate.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/trace-aggregate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EAErB,sBAAsB,EAItB,wBAAwB,EAGxB,yBAAyB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAWvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAuF9D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,yBAAyB,EAC/B,OAAO,GAAE,2BAAgC,GACxC,wBAAwB,CAc1B;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,wBAAwB,EAC9B,OAAO,GAAE,2BAAgC,GACxC,wBAAwB,CAS1B;AAyTD,wBAAsB,eAAe,CACnC,EAAE,EAAE,gBAAgB,EACpB,IAAI,EAAE,yBAAyB,EAC/B,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAED,wBAAsB,cAAc,CAClC,EAAE,EAAE,gBAAgB,EACpB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAEhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace-query.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/trace-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAC3B,kBAAkB,EAElB,8BAA8B,EAI9B,kBAAkB,EAKlB,sBAAsB,EACtB,mCAAmC,EACnC,qBAAqB,EACrB,2BAA2B,EAE3B,gCAAgC,EACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AASvD,KAAK,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC;AAGtD,eAAO,MAAM,gBAAgB,kEAAkE,CAAC;AAEhG,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,iHAAiH,CAAC;AAEvJ,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAGrE;
|
|
1
|
+
{"version":3,"file":"trace-query.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/observability/trace-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAC3B,kBAAkB,EAElB,8BAA8B,EAI9B,kBAAkB,EAKlB,sBAAsB,EACtB,mCAAmC,EACnC,qBAAqB,EACrB,2BAA2B,EAE3B,gCAAgC,EACjC,MAAM,sBAAsB,CAAC;AAE9B,OAA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,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,gBAAgB,EACpB,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,2BAA2B,CAAC,CAOtC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAErD;AA+ED,wBAAsB,WAAW,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAwEhH;AAED,wBAAsB,YAAY,CAAC,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAclH;AAED,4EAA4E;AAC5E,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,gCAAgC,GAAG,WAAW,CAElG;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,gCAAgC,GAAG,WAAW,CAQpG"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export declare const threadQueryFeatures: readonly [] | readonly ["thread-query-rows"];
|
|
2
|
-
export declare const spanQueryFeatures: readonly [] | readonly ["span-query", "span-query-context-fields"];
|
|
3
|
-
export declare const spanAggregateFeatures: readonly [] | readonly ["span-aggregate"];
|
|
2
|
+
export declare const spanQueryFeatures: readonly [] | readonly ["span-query", "span-query-context-fields", "span-query-model-fields"] | readonly ["span-query", "span-query-context-fields", ...never[]];
|
|
3
|
+
export declare const spanAggregateFeatures: readonly [] | readonly ["span-aggregate", "span-aggregate-model-dimensions"] | readonly ["span-aggregate", ...never[]];
|
|
4
4
|
/** Core versions without the field reject it in trace query results, so it is only returned when core knows it. */
|
|
5
5
|
export declare const timeToFirstChunkSupported: boolean;
|
|
6
|
-
|
|
6
|
+
/** Same rule for time to first token: returned and sorted only when core knows the field. */
|
|
7
|
+
export declare const timeToFirstTokenSupported: boolean;
|
|
8
|
+
/** Core before the outcome fields rejects their predicates and strict rows, so they are only returned and declared when core knows them. */
|
|
9
|
+
export declare const spanQueryOutcomeFieldsSupported: boolean;
|
|
10
|
+
export declare const traceQueryOutcomeFieldsSupported: boolean;
|
|
11
|
+
export declare const outcomeFeatures: readonly ('span-query-outcome-fields' | 'trace-query-outcome-fields')[];
|
|
12
|
+
export declare const timingFeatures: readonly "trace-query-time-to-first-chunk-sort"[] | readonly "trace-query-time-to-first-token"[] | readonly never[] | readonly ("trace-query-time-to-first-chunk-sort" | "trace-query-time-to-first-token")[] | readonly ["trace-query-time-to-first-chunk", ..."trace-query-time-to-first-token"[]] | readonly ["trace-query-time-to-first-chunk", ...never[]] | readonly [..."trace-query-time-to-first-chunk-sort"[], "trace-query-time-to-first-token-sort"] | readonly [...never[], "trace-query-time-to-first-token-sort"] | readonly ["trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...never[]] | readonly ["trace-query-time-to-first-chunk", ...never[], "trace-query-time-to-first-token-sort"] | readonly [...never[], "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort"] | readonly ["trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort"] | readonly ["trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", ...never[]] | readonly ["trace-query-time-to-first-chunk", "trace-query-time-to-first-chunk-sort", ...never[], "trace-query-time-to-first-token-sort"] | readonly ["trace-query-time-to-first-chunk", ...never[], "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort"] | readonly [...never[], "trace-query-time-to-first-chunk-sort", "trace-query-time-to-first-token", "trace-query-time-to-first-token-sort"];
|
|
7
13
|
//# sourceMappingURL=features.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/storage/features.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,8CAC0E,CAAC;AAE3G,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/storage/features.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,8CAC0E,CAAC;AAE3G,eAAO,MAAM,iBAAiB,kKAQX,CAAC;AAEpB,eAAO,MAAM,qBAAqB,wHASf,CAAC;AAEpB,mHAAmH;AACnH,eAAO,MAAM,yBAAyB,SAAuE,CAAC;AAK9G,6FAA6F;AAC7F,eAAO,MAAM,yBAAyB,SAAuE,CAAC;AAG9G,4IAA4I;AAC5I,eAAO,MAAM,+BAA+B,SAA6D,CAAC;AAC1G,eAAO,MAAM,gCAAgC,SAAqE,CAAC;AAEnH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,2BAA2B,GAAG,4BAA4B,CAAC,EAGlG,CAAC;AAEF,eAAO,MAAM,cAAc,++CAKjB,CAAC"}
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export declare class ObservabilityStorageDuckDB extends CoreObservabilityStorage
|
|
|
17
17
|
private delegate;
|
|
18
18
|
private loadPromise;
|
|
19
19
|
private unavailableError;
|
|
20
|
+
private pendingInits;
|
|
21
|
+
private closed;
|
|
20
22
|
constructor(config: ObservabilityDuckDBConfig);
|
|
21
23
|
private createUnavailableError;
|
|
22
24
|
private loadDelegate;
|
|
@@ -25,6 +27,7 @@ export declare class ObservabilityStorageDuckDB extends CoreObservabilityStorage
|
|
|
25
27
|
get tracingStrategy(): ObservabilityStoreImpl['tracingStrategy'];
|
|
26
28
|
getFeatures(): ReturnType<ObservabilityStoreImpl['getFeatures']>;
|
|
27
29
|
init(...args: Parameters<ObservabilityStoreImpl['init']>): ReturnType<ObservabilityStoreImpl['init']>;
|
|
30
|
+
close(): Promise<void>;
|
|
28
31
|
migrateSpans(...args: Parameters<ObservabilityStoreImpl['migrateSpans']>): ReturnType<ObservabilityStoreImpl['migrateSpans']>;
|
|
29
32
|
prune(...args: Parameters<ObservabilityStoreImpl['prune']>): ReturnType<ObservabilityStoreImpl['prune']>;
|
|
30
33
|
dangerouslyClearAll(...args: Parameters<ObservabilityStoreImpl['dangerouslyClearAll']>): ReturnType<ObservabilityStoreImpl['dangerouslyClearAll']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,IAAI,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,IAAI,8BAA8B,EAC7D,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,IAAI,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,IAAI,8BAA8B,EAC7D,MAAM,+BAA+B,CAAC;AA+EvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,YAAY,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,KAAK,sBAAsB,GAAG,8BAA8B,CAAC;AAE7D;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,wBAAwB;IACtE,OAAO,CAAC,EAAE,CAAmB;IAC7B,OAAO,CAAC,QA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AAU,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,CAAC,GACnE,UAAU,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,CAAC,CAG7D;IAEK,sBAAsB,CAC1B,GAAG,IAAI,EAAE,UAAU,CAAC,sBAAsB,CAAC,wBAAwB,CAAC,CAAC,GACpE,UAAU,CAAC,sBAAsB,CAAC,wBAAwB,CAAC,CAAC,CAG9D;CACF;AAED,6DAA6D;AAC7D,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,WAAY,SAAQ,oBAAoB;IACnD,QAAQ,CAAC,EAAE,EAAE,gBAAgB,CAAC;IAC9B,OAAO,CAAC,kBAAkB,CAA6B;IAEvD,MAAM,EAAE,cAAc,CAAC;IAEvB,YAAY,MAAM,GAAE,iBAAsB,EAUzC;IAED,yDAAyD;IACzD,IAAI,aAAa,IAAI,0BAA0B,CAE9C;IAED;;;;;;OAMG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3B;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/duckdb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0-alpha.1",
|
|
4
4
|
"description": "DuckDB vector store provider for Mastra - embedded high-performance vector storage with HNSW indexing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@internal/lint": "0.0.146",
|
|
35
35
|
"@internal/storage-test-utils": "0.0.142",
|
|
36
36
|
"@internal/types-builder": "0.0.121",
|
|
37
|
-
"@mastra/core": "1.
|
|
37
|
+
"@mastra/core": "1.81.0-alpha.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@mastra/core": ">=1.80.0-0 <2.0.0-0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features-B8gl38Ue.js","names":[],"sources":["../src/storage/db/index.ts","../src/storage/features.ts"],"sourcesContent":["import { DuckDBInstance, DuckDBTimestampValue, DuckDBTimestampTZValue } from '@duckdb/node-api';\nimport type { DuckDBPreparedStatement } from '@duckdb/node-api';\nimport { MastraBase } from '@mastra/core/base';\n\n/**\n * Bind a single parameter to a prepared statement using explicit typed methods.\n * This avoids the \"Cannot create values of type ANY\" error that occurs when\n * DuckDB cannot infer parameter types from SQL context (e.g. json_extract_string).\n */\nexport function bindParam(stmt: DuckDBPreparedStatement, index: number, value: unknown): void {\n if (value === null || value === undefined) {\n stmt.bindNull(index);\n } else if (typeof value === 'string') {\n stmt.bindVarchar(index, value);\n } else if (typeof value === 'number') {\n if (Number.isInteger(value) && value >= -2147483648 && value <= 2147483647) {\n stmt.bindInteger(index, value);\n } else {\n stmt.bindDouble(index, value);\n }\n } else if (typeof value === 'boolean') {\n stmt.bindBoolean(index, value);\n } else if (typeof value === 'bigint') {\n stmt.bindBigInt(index, value);\n } else if (value instanceof Date) {\n stmt.bindTimestamp(index, new DuckDBTimestampValue(BigInt(value.getTime()) * 1000n));\n } else if (value instanceof DuckDBTimestampValue) {\n stmt.bindTimestamp(index, value);\n } else if (value instanceof DuckDBTimestampTZValue) {\n stmt.bindTimestampTZ(index, value);\n } else {\n // Fallback: serialize to JSON string\n stmt.bindVarchar(index, JSON.stringify(value));\n }\n}\n\n/** Convert DuckDB-specific return types to plain JS types */\nfunction toJsValue(val: unknown): unknown {\n if (val === null || val === undefined) return val;\n // DuckDBTimestampValue → Date (micros since epoch)\n if (val instanceof DuckDBTimestampValue) {\n return new Date(Number(val.micros / 1000n));\n }\n // BigInt → Number (safe for values we care about)\n if (typeof val === 'bigint') {\n return Number(val);\n }\n return val;\n}\n\n/** A query interrupted at its caller-supplied deadline. */\nexport class DuckDBQueryTimeoutError extends Error {\n constructor() {\n super('DuckDB query exceeded its deadline');\n this.name = 'DuckDBQueryTimeoutError';\n }\n}\n\n/** Configuration for the DuckDB database connection. */\nexport interface DuckDBStorageConfig {\n /** Path to the DuckDB file. Defaults to 'mastra.duckdb'. Use ':memory:' for ephemeral. */\n path?: string;\n /**\n * Maximum memory DuckDB may use (e.g. '2GB', '512MB').\n * @default '2GB'\n * DuckDB's own default is 80% of system RAM, which is far too aggressive for\n * a store embedded in an application server — a single query against a large\n * database can balloon the process by several GB and push the host into\n * swap. Larger-than-memory operations spill to disk for file-backed\n * databases. Raise this for dedicated analytical workloads.\n */\n memoryLimit?: string;\n /**\n * Number of threads DuckDB may use. Defaults to DuckDB's default (one per\n * CPU core). Lower this to keep queries from monopolizing all cores of a\n * shared application server.\n */\n threads?: number;\n}\n\nconst DEFAULT_MEMORY_LIMIT = '2GB';\n\n/**\n * Shared DuckDB connection management for Mastra storage.\n * Defaults to a local file (`mastra.duckdb`) when no path is provided.\n * Pass `path: ':memory:'` for an ephemeral in-memory database.\n */\nexport class DuckDBConnection extends MastraBase {\n private instance: DuckDBInstance | null = null;\n private initialized = false;\n private initPromise: Promise<void> | null = null;\n private path: string;\n private instanceOptions: Record<string, string>;\n\n constructor(config: DuckDBStorageConfig = {}) {\n super({ component: 'STORAGE', name: 'DUCKDB' });\n this.path = config.path ?? 'mastra.duckdb';\n this.instanceOptions = {\n max_memory: config.memoryLimit ?? DEFAULT_MEMORY_LIMIT,\n ...(config.threads !== undefined ? { threads: String(config.threads) } : {}),\n };\n }\n\n private async initialize(): Promise<void> {\n if (this.initialized && this.instance) return;\n\n if (this.initPromise) {\n await this.initPromise;\n if (this.instance) return;\n this.initPromise = null;\n this.initialized = false;\n }\n\n this.initPromise = (async () => {\n try {\n this.instance = await DuckDBInstance.create(this.path, this.instanceOptions);\n this.initialized = true;\n } catch (error) {\n this.instance = null;\n this.initialized = false;\n this.initPromise = null;\n throw error;\n }\n })();\n\n return this.initPromise;\n }\n\n /** Create a new connection to the DuckDB instance, initializing if needed. */\n async getConnection() {\n await this.initialize();\n if (!this.instance) {\n throw new Error('DuckDB instance not initialized');\n }\n return this.instance.connect();\n }\n\n private closeConnection(connection: unknown): void {\n const conn = connection as {\n closeSync?: () => void;\n disconnectSync?: () => void;\n close?: () => void;\n disconnect?: () => void;\n };\n try {\n if (typeof conn?.closeSync === 'function') {\n conn.closeSync();\n return;\n }\n if (typeof conn?.disconnectSync === 'function') {\n conn.disconnectSync();\n return;\n }\n if (typeof conn?.close === 'function') {\n conn.close();\n return;\n }\n if (typeof conn?.disconnect === 'function') {\n conn.disconnect();\n }\n } catch {\n // Ignore close failures to avoid masking query/execute errors.\n }\n }\n\n /**\n * Execute a SQL query and return results as objects.\n */\n async query<T = Record<string, unknown>>(sql: string, params: unknown[] = [], timeoutMs?: number): Promise<T[]> {\n const connection = await this.getConnection();\n let timedOut = false;\n const timer =\n timeoutMs === undefined\n ? undefined\n : setTimeout(() => {\n timedOut = true;\n connection.interrupt();\n }, timeoutMs);\n try {\n if (params.length === 0) {\n const result = await connection.run(sql);\n const rows = await result.getRows();\n const columns = result.columnNames();\n return rows.map(row => {\n const obj: Record<string, unknown> = {};\n columns.forEach((col, i) => {\n obj[col] = toJsValue(row[i]);\n });\n return obj as T;\n });\n }\n\n let paramIndex = 0;\n const preparedSql = sql.replace(/\\?/g, () => `$${++paramIndex}`);\n const stmt = await connection.prepare(preparedSql);\n for (let i = 0; i < params.length; i++) {\n bindParam(stmt, i + 1, params[i]);\n }\n const result = await stmt.run();\n const rows = await result.getRows();\n const columns = result.columnNames();\n return rows.map(row => {\n const obj: Record<string, unknown> = {};\n columns.forEach((col, i) => {\n obj[col] = toJsValue(row[i]);\n });\n return obj as T;\n });\n } catch (error) {\n if (timedOut) throw new DuckDBQueryTimeoutError();\n throw error;\n } finally {\n if (timer !== undefined) clearTimeout(timer);\n this.closeConnection(connection);\n }\n }\n\n /**\n * Execute a SQL statement without returning results.\n */\n async execute(sql: string, params: unknown[] = []): Promise<void> {\n const connection = await this.getConnection();\n try {\n if (params.length === 0) {\n await connection.run(sql);\n return;\n }\n let paramIndex = 0;\n const preparedSql = sql.replace(/\\?/g, () => `$${++paramIndex}`);\n const stmt = await connection.prepare(preparedSql);\n for (let i = 0; i < params.length; i++) {\n bindParam(stmt, i + 1, params[i]);\n }\n await stmt.run();\n } finally {\n this.closeConnection(connection);\n }\n }\n\n /** Delete one bounded retention batch and return the number of rows removed. */\n async pruneBatch({\n tableName,\n column,\n cutoff,\n limit,\n }: {\n tableName: string;\n column: string;\n cutoff: Date;\n limit: number;\n }): Promise<number> {\n const identifier = /^[A-Za-z_][A-Za-z0-9_]*$/;\n if (!identifier.test(tableName) || !identifier.test(column)) {\n throw new Error(`Invalid retention identifier: ${tableName}.${column}`);\n }\n\n const rows = await this.query(\n `DELETE FROM ${tableName}\n WHERE rowid IN (\n SELECT rowid FROM ${tableName}\n WHERE ${column} < ?\n ORDER BY ${column}\n LIMIT ?\n )\n RETURNING 1 AS deleted`,\n [cutoff, limit],\n );\n return rows.length;\n }\n\n /** Execute parameterized statements atomically using a single DuckDB connection. */\n async executeTransaction(statements: readonly { sql: string; params?: readonly unknown[] }[]): Promise<void> {\n if (statements.length === 0) return;\n\n const connection = await this.getConnection();\n try {\n await connection.run('BEGIN TRANSACTION');\n for (const statement of statements) {\n const params = statement.params ?? [];\n if (params.length === 0) {\n await connection.run(statement.sql);\n continue;\n }\n let paramIndex = 0;\n const preparedSql = statement.sql.replace(/\\?/g, () => `$${++paramIndex}`);\n const prepared = await connection.prepare(preparedSql);\n for (let i = 0; i < params.length; i++) {\n bindParam(prepared, i + 1, params[i]);\n }\n await prepared.run();\n }\n await connection.run('COMMIT');\n } catch (error) {\n await connection.run('ROLLBACK').catch(() => undefined);\n throw error;\n } finally {\n this.closeConnection(connection);\n }\n }\n\n /**\n * Execute multiple SQL statements in order using a single DuckDB connection.\n *\n * This is intended for schema setup/migrations where statements have no\n * parameters and must remain ordered, but opening a connection per statement\n * would dominate initialization cost. Blank statements are skipped. Like\n * calling execute() repeatedly, this does not wrap statements in a transaction,\n * so prior statements can remain applied if a later statement fails.\n */\n async executeBatch(sqlStatements: readonly string[]): Promise<void> {\n const statements = sqlStatements.map(statement => statement.trim()).filter(Boolean);\n if (statements.length === 0) return;\n\n const connection = await this.getConnection();\n try {\n const sql =\n statements.map((statement, i) => `-- executeBatch statement ${i + 1}\\n${statement}`).join('\\n;\\n') + '\\n;';\n await connection.run(sql);\n } finally {\n this.closeConnection(connection);\n }\n }\n\n /**\n * Escape a value for safe inline SQL use.\n * DuckDB prepared statements can't handle NULL for parameters typed as ANY,\n * so for complex INSERT/UPDATE operations we inline values safely.\n */\n static sqlValue(value: unknown): string {\n if (value === null || value === undefined) return 'NULL';\n if (typeof value === 'number') {\n if (!Number.isFinite(value)) return 'NULL';\n return String(value);\n }\n if (typeof value === 'boolean') return value ? 'TRUE' : 'FALSE';\n if (value instanceof Date) return `'${value.toISOString()}'::TIMESTAMP`;\n if (typeof value === 'string') return `'${value.replace(/'/g, \"''\")}'`;\n // Objects/arrays → JSON string\n return `'${JSON.stringify(value).replace(/'/g, \"''\")}'`;\n }\n\n /** Release the DuckDB instance, allowing garbage collection. */\n async close(): Promise<void> {\n if (this.instance) {\n try {\n const instance = this.instance as unknown as { closeSync?: () => void; close?: () => void };\n if (typeof instance.closeSync === 'function') {\n instance.closeSync();\n } else if (typeof instance.close === 'function') {\n instance.close();\n }\n } catch {\n // Ignore close failures to allow cleanup of references.\n }\n this.instance = null;\n this.initialized = false;\n this.initPromise = null;\n }\n }\n}\n","import * as coreStorage from '@mastra/core/storage';\n\nexport const threadQueryFeatures =\n typeof coreStorage.planThreadRowsQuery === 'function' ? (['thread-query-rows'] as const) : ([] as const);\n\nexport const spanQueryFeatures =\n typeof coreStorage.planSpanQuery === 'function'\n ? (['span-query', 'span-query-context-fields'] as const)\n : ([] as const);\n\nexport const spanAggregateFeatures =\n typeof coreStorage.planSpanAggregate === 'function' ? (['span-aggregate'] as const) : ([] as const);\n\n/** Core versions without the field reject it in trace query results, so it is only returned when core knows it. */\nexport const timeToFirstChunkSupported = 'timeToFirstChunkMs' in coreStorage.TRACE_QUERY_FIELD_REGISTRY.trace;\n\n/** Core before the sort rejects `orderBy` on the field, so the sort is only declared when core plans it. */\nconst timeToFirstChunkSortSupported = coreStorage.TRACE_QUERY_ORDER_FIELDS?.includes('timeToFirstChunkMs') === true;\n\nexport const timeToFirstChunkFeatures = [\n ...(timeToFirstChunkSupported ? (['trace-query-time-to-first-chunk'] as const) : []),\n ...(timeToFirstChunkSortSupported ? (['trace-query-time-to-first-chunk-sort'] as const) : []),\n] as const;\n"],"mappings":";;;;;;;;;AASA,SAAgB,UAAU,MAA+B,OAAe,OAAsB;CAC5F,IAAI,UAAU,QAAQ,UAAU,KAAA,GAC9B,KAAK,SAAS,KAAK;MACd,IAAI,OAAO,UAAU,UAC1B,KAAK,YAAY,OAAO,KAAK;MACxB,IAAI,OAAO,UAAU,UAAU;EACpC,IAAI,OAAO,UAAU,KAAK,KAAK,SAAS,eAAe,SAAS,YAC9D,KAAK,YAAY,OAAO,KAAK;OAE7B,KAAK,WAAW,OAAO,KAAK;CAEhC,OAAO,IAAI,OAAO,UAAU,WAC1B,KAAK,YAAY,OAAO,KAAK;MACxB,IAAI,OAAO,UAAU,UAC1B,KAAK,WAAW,OAAO,KAAK;MACvB,IAAI,iBAAiB,MAC1B,KAAK,cAAc,OAAO,IAAI,qBAAqB,OAAO,MAAM,QAAQ,CAAC,IAAI,KAAK,CAAC;MAC9E,IAAI,iBAAiB,sBAC1B,KAAK,cAAc,OAAO,KAAK;MAC1B,IAAI,iBAAiB,wBAC1B,KAAK,gBAAgB,OAAO,KAAK;MAGjC,KAAK,YA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M,QAAQ,MAAM,IAAI,EAAE;EAEpE,OAAO,IAAI,KAAK,UAAU,KAAK,CAAC,CAAC,QAAQ,MAAM,IAAI,EAAE;CACvD;;CAGA,MAAM,QAAuB;EAC3B,IAAI,KAAK,UAAU;GACjB,IAAI;IACF,MAAM,WAAW,KAAK;IACtB,IAAI,OAAO,SAAS,cAAc,YAChC,SAAS,UAAU;SACd,IAAI,OAAO,SAAS,UAAU,YACnC,SAAS,MAAM;GAEnB,QAAQ,CAER;GACA,KAAK,WAAW;GAChB,KAAK,cAAc;GACnB,KAAK,cAAc;EACrB;CACF;AACF;;ACrWA,MAAa,sBACX,OAAO,YAAY,wBAAwB,aAAc,CAAC,mBAAmB,IAAe,CAAC;AAE/F,MAAa,oBACX,OAAO,YAAY,kBAAkB,aAChC,CAAC,cAAc,2BAA2B,IAC1C,CAAC;AAER,MAAa,wBACX,OAAO,YAAY,sBAAsB,aAAc,CAAC,gBAAgB,IAAe,CAAC;;AAG1F,MAAa,4BAA4B,wBAAwB,YAAY,2BAA2B;;AAGxG,MAAM,gCAAgC,YAAY,0BAA0B,SAAS,oBAAoB,MAAM;AAE/G,MAAa,2BAA2B,CACtC,GAAI,4BAA6B,CAAC,iCAAiC,IAAc,CAAC,GAClF,GAAI,gCAAiC,CAAC,sCAAsC,IAAc,CAAC,CAC7F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features-DH60yLCA.cjs","names":["DuckDBTimestampValue","DuckDBTimestampTZValue","MastraBase","DuckDBInstance","coreStorage"],"sources":["../src/storage/db/index.ts","../src/storage/features.ts"],"sourcesContent":["import { DuckDBInstance, DuckDBTimestampValue, DuckDBTimestampTZValue } from '@duckdb/node-api';\nimport type { DuckDBPreparedStatement } from '@duckdb/node-api';\nimport { MastraBase } from '@mastra/core/base';\n\n/**\n * Bind a single parameter to a prepared statement using explicit typed methods.\n * This avoids the \"Cannot create values of type ANY\" error that occurs when\n * DuckDB cannot infer parameter types from SQL context (e.g. json_extract_string).\n */\nexport function bindParam(stmt: DuckDBPreparedStatement, index: number, value: unknown): void {\n if (value === null || value === undefined) {\n stmt.bindNull(index);\n } else if (typeof value === 'string') {\n stmt.bindVarchar(index, value);\n } else if (typeof value === 'number') {\n if (Number.isInteger(value) && value >= -2147483648 && value <= 2147483647) {\n stmt.bindInteger(index, value);\n } else {\n stmt.bindDouble(index, value);\n }\n } else if (typeof value === 'boolean') {\n stmt.bindBoolean(index, value);\n } else if (typeof value === 'bigint') {\n stmt.bindBigInt(index, value);\n } else if (value instanceof Date) {\n stmt.bindTimestamp(index, new DuckDBTimestampValue(BigInt(value.getTime()) * 1000n));\n } else if (value instanceof DuckDBTimestampValue) {\n stmt.bindTimestamp(index, value);\n } else if (value instanceof DuckDBTimestampTZValue) {\n stmt.bindTimestampTZ(index, value);\n } else {\n // Fallback: serialize to JSON string\n stmt.bindVarchar(index, JSON.stringify(value));\n }\n}\n\n/** Convert DuckDB-specific return types to plain JS types */\nfunction toJsValue(val: unknown): unknown {\n if (val === null || val === undefined) return val;\n // DuckDBTimestampValue → Date (micros since epoch)\n if (val instanceof DuckDBTimestampValue) {\n return new Date(Number(val.micros / 1000n));\n }\n // BigInt → Number (safe for values we care about)\n if (typeof val === 'bigint') {\n return Number(val);\n }\n return val;\n}\n\n/** A query interrupted at its caller-supplied deadline. */\nexport class DuckDBQueryTimeoutError extends Error {\n constructor() {\n super('DuckDB query exceeded its deadline');\n this.name = 'DuckDBQueryTimeoutError';\n }\n}\n\n/** Configuration for the DuckDB database connection. */\nexport interface DuckDBStorageConfig {\n /** Path to the DuckDB file. Defaults to 'mastra.duckdb'. Use ':memory:' for ephemeral. */\n path?: string;\n /**\n * Maximum memory DuckDB may use (e.g. '2GB', '512MB').\n * @default '2GB'\n * DuckDB's own default is 80% of system RAM, which is far too aggressive for\n * a store embedded in an application server — a single query against a large\n * database can balloon the process by several GB and push the host into\n * swap. Larger-than-memory operations spill to disk for file-backed\n * databases. Raise this for dedicated analytical workloads.\n */\n memoryLimit?: string;\n /**\n * Number of threads DuckDB may use. Defaults to DuckDB's default (one per\n * CPU core). Lower this to keep queries from monopolizing all cores of a\n * shared application server.\n */\n threads?: number;\n}\n\nconst DEFAULT_MEMORY_LIMIT = '2GB';\n\n/**\n * Shared DuckDB connection management for Mastra storage.\n * Defaults to a local file (`mastra.duckdb`) when no path is provided.\n * Pass `path: ':memory:'` for an ephemeral in-memory database.\n */\nexport class DuckDBConnection extends MastraBase {\n private instance: DuckDBInstance | null = null;\n private initialized = false;\n private initPromise: Promise<void> | null = null;\n private path: string;\n private instanceOptions: Record<string, string>;\n\n constructor(config: DuckDBStorageConfig = {}) {\n super({ component: 'STORAGE', name: 'DUCKDB' });\n this.path = config.path ?? 'mastra.duckdb';\n this.instanceOptions = {\n max_memory: config.memoryLimit ?? DEFAULT_MEMORY_LIMIT,\n ...(config.threads !== undefined ? { threads: String(config.threads) } : {}),\n };\n }\n\n private async initialize(): Promise<void> {\n if (this.initialized && this.instance) return;\n\n if (this.initPromise) {\n await this.initPromise;\n if (this.instance) return;\n this.initPromise = null;\n this.initialized = false;\n }\n\n this.initPromise = (async () => {\n try {\n this.instance = await DuckDBInstance.create(this.path, this.instanceOptions);\n this.initialized = true;\n } catch (error) {\n this.instance = null;\n this.initialized = false;\n this.initPromise = null;\n throw error;\n }\n })();\n\n return this.initPromise;\n }\n\n /** Create a new connection to the DuckDB instance, initializing if needed. */\n async getConnection() {\n await this.initialize();\n if (!this.instance) {\n throw new Error('DuckDB instance not initialized');\n }\n return this.instance.connect();\n }\n\n private closeConnection(connection: unknown): void {\n const conn = connection as {\n closeSync?: () => void;\n disconnectSync?: () => void;\n close?: () => void;\n disconnect?: () => void;\n };\n try {\n if (typeof conn?.closeSync === 'function') {\n conn.closeSync();\n return;\n }\n if (typeof conn?.disconnectSync === 'function') {\n conn.disconnectSync();\n return;\n }\n if (typeof conn?.close === 'function') {\n conn.close();\n return;\n }\n if (typeof conn?.disconnect === 'function') {\n conn.disconnect();\n }\n } catch {\n // Ignore close failures to avoid masking query/execute errors.\n }\n }\n\n /**\n * Execute a SQL query and return results as objects.\n */\n async query<T = Record<string, unknown>>(sql: string, params: unknown[] = [], timeoutMs?: number): Promise<T[]> {\n const connection = await this.getConnection();\n let timedOut = false;\n const timer =\n timeoutMs === undefined\n ? undefined\n : setTimeout(() => {\n timedOut = true;\n connection.interrupt();\n }, timeoutMs);\n try {\n if (params.length === 0) {\n const result = await connection.run(sql);\n const rows = await result.getRows();\n const columns = result.columnNames();\n return rows.map(row => {\n const obj: Record<string, unknown> = {};\n columns.forEach((col, i) => {\n obj[col] = toJsValue(row[i]);\n });\n return obj as T;\n });\n }\n\n let paramIndex = 0;\n const preparedSql = sql.replace(/\\?/g, () => `$${++paramIndex}`);\n const stmt = await connection.prepare(preparedSql);\n for (let i = 0; i < params.length; i++) {\n bindParam(stmt, i + 1, params[i]);\n }\n const result = await stmt.run();\n const rows = await result.getRows();\n const columns = result.columnNames();\n return rows.map(row => {\n const obj: Record<string, unknown> = {};\n columns.forEach((col, i) => {\n obj[col] = toJsValue(row[i]);\n });\n return obj as T;\n });\n } catch (error) {\n if (timedOut) throw new DuckDBQueryTimeoutError();\n throw error;\n } finally {\n if (timer !== undefined) clearTimeout(timer);\n this.closeConnection(connection);\n }\n }\n\n /**\n * Execute a SQL statement without returning results.\n */\n async execute(sql: string, params: unknown[] = []): Promise<void> {\n const connection = await this.getConnection();\n try {\n if (params.length === 0) {\n await connection.run(sql);\n return;\n }\n let paramIndex = 0;\n const preparedSql = sql.replace(/\\?/g, () => `$${++paramIndex}`);\n const stmt = await connection.prepare(preparedSql);\n for (let i = 0; i < params.length; i++) {\n bindParam(stmt, i + 1, params[i]);\n }\n await stmt.run();\n } finally {\n this.closeConnection(connection);\n }\n }\n\n /** Delete one bounded retention batch and return the number of rows removed. */\n async pruneBatch({\n tableName,\n column,\n cutoff,\n limit,\n }: {\n tableName: string;\n column: string;\n cutoff: Date;\n limit: number;\n }): Promise<number> {\n const identifier = /^[A-Za-z_][A-Za-z0-9_]*$/;\n if (!identifier.test(tableName) || !identifier.test(column)) {\n throw new Error(`Invalid retention identifier: ${tableName}.${column}`);\n }\n\n const rows = await this.query(\n `DELETE FROM ${tableName}\n WHERE rowid IN (\n SELECT rowid FROM ${tableName}\n WHERE ${column} < ?\n ORDER BY ${column}\n LIMIT ?\n )\n RETURNING 1 AS deleted`,\n [cutoff, limit],\n );\n return rows.length;\n }\n\n /** Execute parameterized statements atomically using a single DuckDB connection. */\n async executeTransaction(statements: readonly { sql: string; params?: readonly unknown[] }[]): Promise<void> {\n if (statements.length === 0) return;\n\n const connection = await this.getConnection();\n try {\n await connection.run('BEGIN TRANSACTION');\n for (const statement of statements) {\n const params = statement.params ?? [];\n if (params.length === 0) {\n await connection.run(statement.sql);\n continue;\n }\n let paramIndex = 0;\n const preparedSql = statement.sql.replace(/\\?/g, () => `$${++paramIndex}`);\n const prepared = await connection.prepare(preparedSql);\n for (let i = 0; i < params.length; i++) {\n bindParam(prepared, i + 1, params[i]);\n }\n await prepared.run();\n }\n await connection.run('COMMIT');\n } catch (error) {\n await connection.run('ROLLBACK').catch(() => undefined);\n throw error;\n } finally {\n this.closeConnection(connection);\n }\n }\n\n /**\n * Execute multiple SQL statements in order using a single DuckDB connection.\n *\n * This is intended for schema setup/migrations where statements have no\n * parameters and must remain ordered, but opening a connection per statement\n * would dominate initialization cost. Blank statements are skipped. Like\n * calling execute() repeatedly, this does not wrap statements in a transaction,\n * so prior statements can remain applied if a later statement fails.\n */\n async executeBatch(sqlStatements: readonly string[]): Promise<void> {\n const statements = sqlStatements.map(statement => statement.trim()).filter(Boolean);\n if (statements.length === 0) return;\n\n const connection = await this.getConnection();\n try {\n const sql =\n statements.map((statement, i) => `-- executeBatch statement ${i + 1}\\n${statement}`).join('\\n;\\n') + '\\n;';\n await connection.run(sql);\n } finally {\n this.closeConnection(connection);\n }\n }\n\n /**\n * Escape a value for safe inline SQL use.\n * DuckDB prepared statements can't handle NULL for parameters typed as ANY,\n * so for complex INSERT/UPDATE operations we inline values safely.\n */\n static sqlValue(value: unknown): string {\n if (value === null || value === undefined) return 'NULL';\n if (typeof value === 'number') {\n if (!Number.isFinite(value)) return 'NULL';\n return String(value);\n }\n if (typeof value === 'boolean') return value ? 'TRUE' : 'FALSE';\n if (value instanceof Date) return `'${value.toISOString()}'::TIMESTAMP`;\n if (typeof value === 'string') return `'${value.replace(/'/g, \"''\")}'`;\n // Objects/arrays → JSON string\n return `'${JSON.stringify(value).replace(/'/g, \"''\")}'`;\n }\n\n /** Release the DuckDB instance, allowing garbage collection. */\n async close(): Promise<void> {\n if (this.instance) {\n try {\n const instance = this.instance as unknown as { closeSync?: () => void; close?: () => void };\n if (typeof instance.closeSync === 'function') {\n instance.closeSync();\n } else if (typeof instance.close === 'function') {\n instance.close();\n }\n } catch {\n // Ignore close failures to allow cleanup of references.\n }\n this.instance = null;\n this.initialized = false;\n this.initPromise = null;\n }\n }\n}\n","import * as coreStorage from '@mastra/core/storage';\n\nexport const threadQueryFeatures =\n typeof coreStorage.planThreadRowsQuery === 'function' ? (['thread-query-rows'] as const) : ([] as const);\n\nexport const spanQueryFeatures =\n typeof coreStorage.planSpanQuery === 'function'\n ? (['span-query', 'span-query-context-fields'] as const)\n : ([] as const);\n\nexport const spanAggregateFeatures =\n typeof coreStorage.planSpanAggregate === 'function' ? (['span-aggregate'] as const) : ([] as const);\n\n/** Core versions without the field reject it in trace query results, so it is only returned when core knows it. */\nexport const timeToFirstChunkSupported = 'timeToFirstChunkMs' in coreStorage.TRACE_QUERY_FIELD_REGISTRY.trace;\n\n/** Core before the sort rejects `orderBy` on the field, so the sort is only declared when core plans it. */\nconst timeToFirstChunkSortSupported = coreStorage.TRACE_QUERY_ORDER_FIELDS?.includes('timeToFirstChunkMs') === true;\n\nexport const timeToFirstChunkFeatures = [\n ...(timeToFirstChunkSupported ? (['trace-query-time-to-first-chunk'] as const) : []),\n ...(timeToFirstChunkSortSupported ? (['trace-query-time-to-first-chunk-sort'] as const) : []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