@mastra/clickhouse 1.29.0-alpha.0 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +32 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +32 -13
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/observability/v-next/index.d.ts +1 -1
- package/dist/storage/domains/observability/v-next/index.d.ts.map +1 -1
- package/dist/storage/domains/observability/v-next/trace-query.d.ts +2 -0
- package/dist/storage/domains/observability/v-next/trace-query.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -6916,6 +6916,8 @@ const timingFeatures = [
|
|
|
6916
6916
|
...timeToFirstTokenSupported ? ["trace-query-time-to-first-token"] : [],
|
|
6917
6917
|
...timeToFirstTokenSupported && timeToFirstTokenSortSupported ? ["trace-query-time-to-first-token-sort"] : []
|
|
6918
6918
|
];
|
|
6919
|
+
/** Core before the fields rejects their trace and span predicates, so the feature is only declared when core plans them. */
|
|
6920
|
+
const contextFieldFeatures = "requestId" in (coreStorage.TRACE_QUERY_FIELD_REGISTRY?.trace ?? {}) ? ["trace-query-context-fields"] : [];
|
|
6919
6921
|
/**
|
|
6920
6922
|
* Outcome fields follow the same rule: core before them rejects their predicates and strict rows,
|
|
6921
6923
|
* so they are only returned and declared when core knows them.
|
|
@@ -6961,6 +6963,18 @@ const TRACE_FIELDS = {
|
|
|
6961
6963
|
sql: "r.organizationId",
|
|
6962
6964
|
parameterType: "String"
|
|
6963
6965
|
},
|
|
6966
|
+
requestId: {
|
|
6967
|
+
sql: "r.requestId",
|
|
6968
|
+
parameterType: "String"
|
|
6969
|
+
},
|
|
6970
|
+
serviceName: {
|
|
6971
|
+
sql: "r.serviceName",
|
|
6972
|
+
parameterType: "String"
|
|
6973
|
+
},
|
|
6974
|
+
experimentId: {
|
|
6975
|
+
sql: "r.experimentId",
|
|
6976
|
+
parameterType: "String"
|
|
6977
|
+
},
|
|
6964
6978
|
startedAt: {
|
|
6965
6979
|
sql: "r.startedAt",
|
|
6966
6980
|
parameterType: "DateTime64(3, 'UTC')"
|
|
@@ -7114,6 +7128,18 @@ const SPAN_FIELDS = {
|
|
|
7114
7128
|
organizationId: {
|
|
7115
7129
|
sql: "s.organizationId",
|
|
7116
7130
|
parameterType: "String"
|
|
7131
|
+
},
|
|
7132
|
+
requestId: {
|
|
7133
|
+
sql: "s.requestId",
|
|
7134
|
+
parameterType: "String"
|
|
7135
|
+
},
|
|
7136
|
+
serviceName: {
|
|
7137
|
+
sql: "s.serviceName",
|
|
7138
|
+
parameterType: "String"
|
|
7139
|
+
},
|
|
7140
|
+
experimentId: {
|
|
7141
|
+
sql: "s.experimentId",
|
|
7142
|
+
parameterType: "String"
|
|
7117
7143
|
}
|
|
7118
7144
|
};
|
|
7119
7145
|
const SPAN_QUERY_FIELDS = {
|
|
@@ -7138,18 +7164,6 @@ const SPAN_QUERY_FIELDS = {
|
|
|
7138
7164
|
sql: "s.resourceId",
|
|
7139
7165
|
parameterType: "String"
|
|
7140
7166
|
},
|
|
7141
|
-
requestId: {
|
|
7142
|
-
sql: "s.requestId",
|
|
7143
|
-
parameterType: "String"
|
|
7144
|
-
},
|
|
7145
|
-
serviceName: {
|
|
7146
|
-
sql: "s.serviceName",
|
|
7147
|
-
parameterType: "String"
|
|
7148
|
-
},
|
|
7149
|
-
experimentId: {
|
|
7150
|
-
sql: "s.experimentId",
|
|
7151
|
-
parameterType: "String"
|
|
7152
|
-
},
|
|
7153
7167
|
environment: {
|
|
7154
7168
|
sql: "s.environment",
|
|
7155
7169
|
parameterType: "String"
|
|
@@ -7503,7 +7517,10 @@ function compileClickHouseTraceScope(selection, relationCollections, parameters,
|
|
|
7503
7517
|
runId,
|
|
7504
7518
|
sessionId,
|
|
7505
7519
|
userId,
|
|
7506
|
-
organizationId
|
|
7520
|
+
organizationId,
|
|
7521
|
+
requestId,
|
|
7522
|
+
serviceName,
|
|
7523
|
+
experimentId
|
|
7507
7524
|
FROM ${TABLE_SPAN_EVENTS}
|
|
7508
7525
|
WHERE isNotNull(traceId)
|
|
7509
7526
|
AND traceId IN (${options.spanExistence && options.oneRootPerTrace ? windowTraces(bound) : "SELECT traceId FROM root_scope"})${tenant}${options.spanExistence ? "" : `
|
|
@@ -10452,6 +10469,7 @@ var ObservabilityStorageClickhouseVNext = class extends ObservabilityStorage {
|
|
|
10452
10469
|
"trace-query-tenant-scope",
|
|
10453
10470
|
"feedback",
|
|
10454
10471
|
"trace-query-context-ids",
|
|
10472
|
+
...contextFieldFeatures,
|
|
10455
10473
|
...timingFeatures,
|
|
10456
10474
|
...outcomeFeatures,
|
|
10457
10475
|
"trace-query-root-span-fields",
|
|
@@ -10479,6 +10497,7 @@ var ObservabilityStorageClickhouseVNext = class extends ObservabilityStorage {
|
|
|
10479
10497
|
"trace-query-tenant-scope",
|
|
10480
10498
|
"feedback",
|
|
10481
10499
|
"trace-query-context-ids",
|
|
10500
|
+
...contextFieldFeatures,
|
|
10482
10501
|
...timingFeatures,
|
|
10483
10502
|
...outcomeFeatures,
|
|
10484
10503
|
"trace-query-root-span-fields",
|