@mastra/clickhouse 1.21.2-alpha.0 → 1.22.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.
@@ -3,7 +3,7 @@ name: mastra-clickhouse
3
3
  description: Documentation for @mastra/clickhouse. Use when working with @mastra/clickhouse APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/clickhouse"
6
- version: "1.21.2-alpha.0"
6
+ version: "1.22.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.21.2-alpha.0",
2
+ "version": "1.22.0",
3
3
  "package": "@mastra/clickhouse",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -202,7 +202,7 @@ async function retentionTick() {
202
202
  }
203
203
  ```
204
204
 
205
- You can also cancel a long-running prune with an `AbortSignal`: the loop stops between batches and returns partial results with `done: false`, so the next run resumes cleanly.
205
+ You can also cancel a long-running prune with an `AbortSignal`: the loop stops between batches and returns partial results with `done: false`. The next run resumes cleanly.
206
206
 
207
207
  ## ClickHouse native TTL
208
208
 
package/dist/index.cjs CHANGED
@@ -6590,6 +6590,22 @@ const TRACE_FIELDS = {
6590
6590
  sql: "r.resourceId",
6591
6591
  parameterType: "String"
6592
6592
  },
6593
+ runId: {
6594
+ sql: "r.runId",
6595
+ parameterType: "String"
6596
+ },
6597
+ sessionId: {
6598
+ sql: "r.sessionId",
6599
+ parameterType: "String"
6600
+ },
6601
+ userId: {
6602
+ sql: "r.userId",
6603
+ parameterType: "String"
6604
+ },
6605
+ organizationId: {
6606
+ sql: "r.organizationId",
6607
+ parameterType: "String"
6608
+ },
6593
6609
  startedAt: {
6594
6610
  sql: "r.startedAt",
6595
6611
  parameterType: "DateTime64(3, 'UTC')"
@@ -6683,6 +6699,22 @@ const SPAN_FIELDS = {
6683
6699
  rootEntityVersionId: {
6684
6700
  sql: "s.rootEntityVersionId",
6685
6701
  parameterType: "String"
6702
+ },
6703
+ runId: {
6704
+ sql: "s.runId",
6705
+ parameterType: "String"
6706
+ },
6707
+ sessionId: {
6708
+ sql: "s.sessionId",
6709
+ parameterType: "String"
6710
+ },
6711
+ userId: {
6712
+ sql: "s.userId",
6713
+ parameterType: "String"
6714
+ },
6715
+ organizationId: {
6716
+ sql: "s.organizationId",
6717
+ parameterType: "String"
6686
6718
  }
6687
6719
  };
6688
6720
  const SCORE_FIELDS = {
@@ -6940,7 +6972,11 @@ function compileClickHouseTraceScope(selection, relationCollections, parameters,
6940
6972
  entityName,
6941
6973
  entityVersionId,
6942
6974
  parentEntityVersionId,
6943
- rootEntityVersionId
6975
+ rootEntityVersionId,
6976
+ runId,
6977
+ sessionId,
6978
+ userId,
6979
+ organizationId
6944
6980
  FROM ${TABLE_SPAN_EVENTS}
6945
6981
  WHERE isNotNull(traceId)
6946
6982
  AND traceId IN (SELECT traceId FROM root_scope)${tenant}
@@ -8650,7 +8686,8 @@ var ObservabilityStorageClickhouseVNext = class extends _mastra_core_storage.Obs
8650
8686
  "trace-query-discovery",
8651
8687
  "thread-query",
8652
8688
  "trace-query-tenant-scope",
8653
- "feedback"
8689
+ "feedback",
8690
+ "trace-query-context-ids"
8654
8691
  ];
8655
8692
  return [
8656
8693
  "metrics",
@@ -8667,7 +8704,8 @@ var ObservabilityStorageClickhouseVNext = class extends _mastra_core_storage.Obs
8667
8704
  "trace-query-discovery",
8668
8705
  "thread-query",
8669
8706
  "trace-query-tenant-scope",
8670
- "feedback"
8707
+ "feedback",
8708
+ "trace-query-context-ids"
8671
8709
  ];
8672
8710
  }
8673
8711
  async createSpan(args) {