@mastra/server 1.75.0-alpha.3 → 1.75.0-alpha.5

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.
Files changed (121) hide show
  1. package/dist/{agent-versions-RvvNdlZk.cjs → agent-versions-CivkX9fT.cjs} +2 -2
  2. package/dist/{agent-versions-RvvNdlZk.cjs.map → agent-versions-CivkX9fT.cjs.map} +1 -1
  3. package/dist/{agent-versions-CTAEDQuT.js → agent-versions-oCebJ7rc.js} +2 -2
  4. package/dist/{agent-versions-CTAEDQuT.js.map → agent-versions-oCebJ7rc.js.map} +1 -1
  5. package/dist/{api-schema-manifest-D9_jxxNw.cjs → api-schema-manifest-BKsEMyEs.cjs} +2 -2
  6. package/dist/{api-schema-manifest-D9_jxxNw.cjs.map → api-schema-manifest-BKsEMyEs.cjs.map} +1 -1
  7. package/dist/{api-schema-manifest-B0p6nxU1.js → api-schema-manifest-KsETdHDS.js} +2 -2
  8. package/dist/{api-schema-manifest-B0p6nxU1.js.map → api-schema-manifest-KsETdHDS.js.map} +1 -1
  9. package/dist/{channels-DJkXEpTr.cjs → channels-DUdpygCQ.cjs} +39 -1
  10. package/dist/channels-DUdpygCQ.cjs.map +1 -0
  11. package/dist/{channels-DzaCNtXe.js → channels-T1KaEfZX.js} +34 -2
  12. package/dist/channels-T1KaEfZX.js.map +1 -0
  13. package/dist/{dist-DgDFoIF5.cjs → dist-DRLe8Sd-.cjs} +24 -3
  14. package/dist/dist-DRLe8Sd-.cjs.map +1 -0
  15. package/dist/{dist-BFUX7iPi.js → dist-DWXEVDmb.js} +24 -3
  16. package/dist/dist-DWXEVDmb.js.map +1 -0
  17. package/dist/docs/SKILL.md +2 -2
  18. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  19. package/dist/docs/references/reference-observability-tracing-trace-query.md +65 -4
  20. package/dist/{observability-new-endpoints-lNC3o66-.js → observability-new-endpoints-DQuhr8aL.js} +114 -4
  21. package/dist/observability-new-endpoints-DQuhr8aL.js.map +1 -0
  22. package/dist/{observability-new-endpoints-7Zd6uEZf.cjs → observability-new-endpoints-Kphyk3do.cjs} +118 -2
  23. package/dist/observability-new-endpoints-Kphyk3do.cjs.map +1 -0
  24. package/dist/{routes-CJygX0-a.js → routes-B_ehFjzs.js} +5 -3
  25. package/dist/routes-B_ehFjzs.js.map +1 -0
  26. package/dist/{routes-BuiLQCOQ.cjs → routes-Op7uJGai.cjs} +5 -3
  27. package/dist/routes-Op7uJGai.cjs.map +1 -0
  28. package/dist/{scorer-versions-BfGNw7Wp.cjs → scorer-versions-B8q9-oF2.cjs} +2 -2
  29. package/dist/{scorer-versions-BfGNw7Wp.cjs.map → scorer-versions-B8q9-oF2.cjs.map} +1 -1
  30. package/dist/{scorer-versions-gXsdWw0V.js → scorer-versions-DGLHODqM.js} +2 -2
  31. package/dist/{scorer-versions-gXsdWw0V.js.map → scorer-versions-DGLHODqM.js.map} +1 -1
  32. package/dist/server/handlers/agent-builder.cjs +1 -1
  33. package/dist/server/handlers/agent-builder.js +1 -1
  34. package/dist/server/handlers/agent-versions.cjs +1 -1
  35. package/dist/server/handlers/agent-versions.d.ts +368 -0
  36. package/dist/server/handlers/agent-versions.d.ts.map +1 -1
  37. package/dist/server/handlers/agent-versions.js +1 -1
  38. package/dist/server/handlers/agents.cjs +1 -1
  39. package/dist/server/handlers/agents.d.ts +92 -0
  40. package/dist/server/handlers/agents.d.ts.map +1 -1
  41. package/dist/server/handlers/agents.js +1 -1
  42. package/dist/server/handlers/channels.cjs +2 -1
  43. package/dist/server/handlers/channels.d.ts +53 -0
  44. package/dist/server/handlers/channels.d.ts.map +1 -1
  45. package/dist/server/handlers/channels.js +2 -2
  46. package/dist/server/handlers/observability-new-endpoints.cjs +2 -1
  47. package/dist/server/handlers/observability-new-endpoints.d.ts +260 -0
  48. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  49. package/dist/server/handlers/observability-new-endpoints.js +2 -2
  50. package/dist/server/handlers/observability-shared.cjs +19 -0
  51. package/dist/server/handlers/observability-shared.cjs.map +1 -1
  52. package/dist/server/handlers/observability-shared.d.ts +10 -0
  53. package/dist/server/handlers/observability-shared.d.ts.map +1 -1
  54. package/dist/server/handlers/observability-shared.js +18 -1
  55. package/dist/server/handlers/observability-shared.js.map +1 -1
  56. package/dist/server/handlers/observability.cjs +3 -1
  57. package/dist/server/handlers/observability.cjs.map +1 -1
  58. package/dist/server/handlers/observability.js +3 -2
  59. package/dist/server/handlers/observability.js.map +1 -1
  60. package/dist/server/handlers/scorer-versions.cjs +1 -1
  61. package/dist/server/handlers/scorer-versions.js +1 -1
  62. package/dist/server/handlers/stored-agent-favorites.cjs +1 -1
  63. package/dist/server/handlers/stored-agent-favorites.js +1 -1
  64. package/dist/server/handlers/stored-agents.cjs +1 -1
  65. package/dist/server/handlers/stored-agents.d.ts +460 -0
  66. package/dist/server/handlers/stored-agents.d.ts.map +1 -1
  67. package/dist/server/handlers/stored-agents.js +1 -1
  68. package/dist/server/handlers/stored-scorers.cjs +1 -1
  69. package/dist/server/handlers/stored-scorers.js +1 -1
  70. package/dist/server/handlers/system.cjs +2 -2
  71. package/dist/server/handlers/system.d.ts +2 -0
  72. package/dist/server/handlers/system.d.ts.map +1 -1
  73. package/dist/server/handlers/system.js +2 -2
  74. package/dist/server/handlers/tool-providers.cjs +2 -1
  75. package/dist/server/handlers/tool-providers.cjs.map +1 -1
  76. package/dist/server/handlers/tool-providers.d.ts.map +1 -1
  77. package/dist/server/handlers/tool-providers.js +2 -1
  78. package/dist/server/handlers/tool-providers.js.map +1 -1
  79. package/dist/server/schemas/agent-versions.d.ts +350 -0
  80. package/dist/server/schemas/agent-versions.d.ts.map +1 -1
  81. package/dist/server/schemas/channels.d.ts +11 -0
  82. package/dist/server/schemas/channels.d.ts.map +1 -1
  83. package/dist/server/schemas/index.cjs +5 -5
  84. package/dist/server/schemas/index.js +5 -5
  85. package/dist/server/schemas/stored-agents.d.ts +989 -149
  86. package/dist/server/schemas/stored-agents.d.ts.map +1 -1
  87. package/dist/server/schemas/system.d.ts +2 -0
  88. package/dist/server/schemas/system.d.ts.map +1 -1
  89. package/dist/server/server-adapter/index.cjs +1 -1
  90. package/dist/server/server-adapter/index.js +1 -1
  91. package/dist/server/server-adapter/routes/channels.d.ts +43 -0
  92. package/dist/server/server-adapter/routes/channels.d.ts.map +1 -1
  93. package/dist/server/server-adapter/routes/observability.d.ts +129 -0
  94. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  95. package/dist/server/server-adapter/routes/system.d.ts +2 -0
  96. package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
  97. package/dist/{stored-agents-ts0bWw8l.js → stored-agents-BzIvRgtz.js} +3 -2
  98. package/dist/stored-agents-BzIvRgtz.js.map +1 -0
  99. package/dist/{stored-agents-Dmsel7ey.cjs → stored-agents-DpY3ssfx.cjs} +3 -2
  100. package/dist/stored-agents-DpY3ssfx.cjs.map +1 -0
  101. package/dist/{stored-scorers-DySg7-qS.js → stored-scorers-CAt8hFj2.js} +2 -2
  102. package/dist/{stored-scorers-DySg7-qS.js.map → stored-scorers-CAt8hFj2.js.map} +1 -1
  103. package/dist/{stored-scorers-DoW6lYh8.cjs → stored-scorers-DyeqU2Rj.cjs} +2 -2
  104. package/dist/{stored-scorers-DoW6lYh8.cjs.map → stored-scorers-DyeqU2Rj.cjs.map} +1 -1
  105. package/dist/{system-CskEzH1o.cjs → system-Be5n6H_z.cjs} +2 -1
  106. package/dist/system-Be5n6H_z.cjs.map +1 -0
  107. package/dist/{system-6qFm79mm.js → system-BtGAJr9R.js} +2 -1
  108. package/dist/system-BtGAJr9R.js.map +1 -0
  109. package/package.json +6 -6
  110. package/dist/channels-DJkXEpTr.cjs.map +0 -1
  111. package/dist/channels-DzaCNtXe.js.map +0 -1
  112. package/dist/dist-BFUX7iPi.js.map +0 -1
  113. package/dist/dist-DgDFoIF5.cjs.map +0 -1
  114. package/dist/observability-new-endpoints-7Zd6uEZf.cjs.map +0 -1
  115. package/dist/observability-new-endpoints-lNC3o66-.js.map +0 -1
  116. package/dist/routes-BuiLQCOQ.cjs.map +0 -1
  117. package/dist/routes-CJygX0-a.js.map +0 -1
  118. package/dist/stored-agents-Dmsel7ey.cjs.map +0 -1
  119. package/dist/stored-agents-ts0bWw8l.js.map +0 -1
  120. package/dist/system-6qFm79mm.js.map +0 -1
  121. package/dist/system-CskEzH1o.cjs.map +0 -1
@@ -3,7 +3,7 @@ name: mastra-server
3
3
  description: Documentation for @mastra/server. Use when working with @mastra/server APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/server"
6
- version: "1.75.0-alpha.3"
6
+ version: "1.75.0-alpha.5"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -24,7 +24,7 @@ Read the individual reference documents for detailed explanations and code examp
24
24
 
25
25
  ### Reference
26
26
 
27
- - [Advanced trace queries](references/reference-observability-tracing-trace-query.md) - Query completed traces and thread identities with recursive predicates, numbered pages, keyset cursors, and delta polling.
27
+ - [Advanced trace queries](references/reference-observability-tracing-trace-query.md) - Query completed traces, thread identities, and spans with recursive predicates, numbered pages, keyset cursors, and delta polling.
28
28
  - [Reference: createRoute()](references/reference-server-create-route.md) - Use createRoute() to define type-safe Mastra server routes with Zod validation for requests and responses, plus handler context and OpenAPI metadata.
29
29
  - [Reference: MastraServer](references/reference-server-mastra-server.md) - The MastraServer abstract class is the base for all server adapters. Extend this class to create adapters for frameworks other than Hono or Express.
30
30
  - [Reference: Server routes](references/reference-server-routes.md) - Server adapters register these routes when you call server.init(). All routes are prefixed with the prefix option if configured.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.75.0-alpha.3",
2
+ "version": "1.75.0-alpha.5",
3
3
  "package": "@mastra/server",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -6,13 +6,74 @@
6
6
 
7
7
  Use `queryTraces()` or `POST /api/observability/traces/query` to find completed logical traces that match trace fields and related span, score, or feedback records. Use `queryTraceThreads()` or `POST /api/observability/threads/query` to find thread identities that qualify across multiple eligible traces.
8
8
 
9
- Both endpoints use the same authentication as other observability routes and require the `observability:read` permission. The configured observability store must support the requested trace-query or thread-query operation.
9
+ Use `querySpans()` or `POST /api/observability/spans/query` to list the individual completed spans that match a span predicate.
10
+
11
+ All three endpoints use the same authentication as other observability routes and require the `observability:read` permission. The configured observability store must support the requested trace-query, thread-query, or span-query operation.
10
12
 
11
13
  > **Thread grouping is deprecated:** The `group` option remains supported until the next major release. Use [`queryTraceThreads()`](https://mastra.ai/reference/client-js/observability) to retrieve matching thread identities in new code.
12
14
 
13
- ## Query individual spans through storage
15
+ ## Query individual spans
16
+
17
+ `querySpans()` returns one row per matching completed span across traces, including matching child spans. Use it to list the spans themselves, for example every failed tool call in the last day.
18
+
19
+ `queryTraces()` with a `spans.some` predicate answers a different question. It returns the traces that contain at least one matching span, and it doesn't identify which spans matched. Both use the same span fields and operators.
20
+
21
+ ```typescript
22
+ const timeRange = {
23
+ from: '2026-10-01T00:00:00.000Z',
24
+ to: '2026-10-02T00:00:00.000Z',
25
+ }
26
+ const where = {
27
+ op: 'and',
28
+ args: [
29
+ { op: 'eq', left: { path: 'spanType' }, right: { literal: 'tool_call' } },
30
+ { op: 'eq', left: { path: 'status' }, right: { literal: 'error' } },
31
+ ],
32
+ } as const
33
+
34
+ const firstPage = await mastraClient.querySpans({
35
+ timeRange,
36
+ where,
37
+ orderBy: [{ field: 'startedAt', direction: 'desc' }],
38
+ page: { limit: 50 },
39
+ })
40
+
41
+ if (firstPage.page.next) {
42
+ const secondPage = await mastraClient.querySpans({
43
+ timeRange,
44
+ where,
45
+ orderBy: [{ field: 'startedAt', direction: 'desc' }],
46
+ page: { limit: 50, after: firstPage.page.next },
47
+ })
48
+ }
49
+ ```
50
+
51
+ The HTTP route accepts the same body:
52
+
53
+ ```bash
54
+ curl --request POST \
55
+ --url http://localhost:4111/api/observability/spans/query \
56
+ --header 'Authorization: Bearer <token>' \
57
+ --header 'Content-Type: application/json' \
58
+ --data '{
59
+ "timeRange": {
60
+ "from": "2026-10-01T00:00:00.000Z",
61
+ "to": "2026-10-02T00:00:00.000Z"
62
+ },
63
+ "where": { "op": "eq", "left": { "path": "spanType" }, "right": { "literal": "tool_call" } },
64
+ "page": { "limit": 50 }
65
+ }'
66
+ ```
67
+
68
+ Span queries are optional for observability stores. Call `mastraClient.getObservabilityCapabilities()` and check `capabilities.spanQuery` before showing a span list. Treat a missing `spanQuery` value as unsupported, because older servers don't report it. A server whose store or `@mastra/core` version doesn't support span queries returns `501` with code `SPAN_QUERY_UNSUPPORTED`.
69
+
70
+ The other statuses match trace queries: `400` for malformed JSON or a malformed cursor, `409` for a cursor that doesn't match the query, `413` for a body over 256 KiB, `422` with code `TRACE_QUERY_INVALID` and structured `issues` for an invalid query, `503` with code `TRACE_QUERY_RESOURCE_LIMIT` when a page exceeds a resource limit, and `504` with code `TRACE_QUERY_EXECUTION_TIMEOUT` when the database deadline is exceeded.
71
+
72
+ The server applies [trusted tenant scope](#trusted-tenant-scope) to span queries the same way it does for trace queries. A cursor created under one scope and reused under another returns `409`.
73
+
74
+ ### Query individual spans through storage
14
75
 
15
- The observability domain in DuckDB and the PostgreSQL and ClickHouse v-next stores supports `querySpans(plan)`. It returns individual completed spans across traces, including matching child spans. Check `storage.getFeatures()?.includes('span-query')` before using this optional storage method. Server routes and client SDK support are separate from this storage API.
76
+ The observability domain in DuckDB and the PostgreSQL and ClickHouse v-next stores supports `querySpans(plan)`. Check `storage.getFeatures()?.includes('span-query')` before using this optional storage method.
16
77
 
17
78
  Build the plan in trusted backend code:
18
79
 
@@ -768,7 +829,7 @@ PostgreSQL and ClickHouse stop advanced trace and thread queries after 15 second
768
829
 
769
830
  ## Limitations
770
831
 
771
- Both operations consider completed traces only. They don't support running traces, custom projections, embedded evidence, summaries, aggregations, measures, or custom grouping. Numbered trace pages include a total count.
832
+ Trace and thread queries consider completed traces only, and span queries consider completed spans only. They don't support running traces, custom projections, embedded evidence, summaries, aggregations, measures, or custom grouping. Numbered trace pages include a total count.
772
833
 
773
834
  ## Related
774
835
 
@@ -3,8 +3,8 @@ import { a as wrapSchemaForQueryParams, i as pickParams, n as createRoute } from
3
3
  import { d as MASTRA_USER_ROLES_KEY, l as MASTRA_USER_KEY, m as isStudioClientTypeHeader } from "./constants-0jFCWoex.js";
4
4
  import { handleError } from "./server/handlers/error.js";
5
5
  import { paginationArgsSchema as paginationArgsSchema$1 } from "./server/handlers/observability-list-query-schemas.js";
6
- import { NEW_ROUTE_DEFS, NO_OBSERVABILITY_STORAGE_CAPABILITIES, OBSERVABILITY_LIST_ENDPOINTS, OBSERVABILITY_TRACE_QUERY_TENANT_SCOPE_UPGRADE_MESSAGE, assertObservabilityDeltaSupported, assertObservabilityThreadQuerySupported, assertObservabilityTraceAggregateSupported, assertObservabilityTraceQueryContextIdsSupported, assertObservabilityTraceQueryDiscoverySupported, assertObservabilityTraceQueryRootDurationSupported, assertObservabilityTraceQuerySupported, assertObservabilityTraceQueryTenantScopeSupported, createObservabilityListQuerySchema, getObservabilityStorageCapabilities, getObservabilityStore, isTraceQueryContextIdField, supportsObservabilityTraceQueryContextIds, supportsObservabilityTraceQueryRootDuration, supportsTraceAggregateCore, supportsTraceQueryDiscoveryCore, withDiscoveryFallback } from "./server/handlers/observability-shared.js";
7
- import { l as observabilityStorageCapabilitiesSchema } from "./system-6qFm79mm.js";
6
+ import { NEW_ROUTE_DEFS, NO_OBSERVABILITY_STORAGE_CAPABILITIES, OBSERVABILITY_LIST_ENDPOINTS, OBSERVABILITY_TRACE_QUERY_TENANT_SCOPE_UPGRADE_MESSAGE, assertObservabilityDeltaSupported, assertObservabilitySpanQuerySupported, assertObservabilityThreadQuerySupported, assertObservabilityTraceAggregateSupported, assertObservabilityTraceQueryContextIdsSupported, assertObservabilityTraceQueryDiscoverySupported, assertObservabilityTraceQueryRootDurationSupported, assertObservabilityTraceQuerySupported, assertObservabilityTraceQueryTenantScopeSupported, createObservabilityListQuerySchema, getObservabilityStorageCapabilities, getObservabilityStore, isTraceQueryContextIdField, supportsObservabilityTraceQueryContextIds, supportsObservabilityTraceQueryRootDuration, supportsSpanQueryCore, supportsTraceAggregateCore, supportsTraceQueryDiscoveryCore, withDiscoveryFallback } from "./server/handlers/observability-shared.js";
7
+ import { l as observabilityStorageCapabilitiesSchema } from "./system-BtGAJr9R.js";
8
8
  import { prepareAuthorEnrichment } from "./server/handlers/author-enrichment.js";
9
9
  import { getCallerPermissions } from "./server/handlers/authorship.js";
10
10
  import { z } from "zod/v4";
@@ -1176,6 +1176,115 @@ if (AGGREGATE_TRACES.openapi) {
1176
1176
  content: { "application/json": { schema: traceQueryTimeoutErrorSchema } }
1177
1177
  };
1178
1178
  }
1179
+ const spanQueryUnsupportedErrorSchema = z.object({
1180
+ code: z.literal("SPAN_QUERY_UNSUPPORTED"),
1181
+ message: z.string()
1182
+ }).strict();
1183
+ const spanQueryValidationError = (error) => ({
1184
+ status: 422,
1185
+ body: {
1186
+ code: "TRACE_QUERY_INVALID",
1187
+ message: "The span query is invalid",
1188
+ issues: error.issues.map((issue) => ({
1189
+ code: "invalid_request",
1190
+ path: issue.path.map((part) => typeof part === "symbol" ? String(part) : part),
1191
+ message: issue.message
1192
+ }))
1193
+ }
1194
+ });
1195
+ const QUERY_SPANS = createNewRoute(NEW_ROUTE_DEFS.QUERY_SPANS, {
1196
+ bodySchema: coreStorage.spanQueryRequestSchema,
1197
+ responseSchema: coreStorage.spanQueryResponseSchema,
1198
+ onValidationError: spanQueryValidationError,
1199
+ maxBodySize: 256 * 1024,
1200
+ preserveHttpExceptions: true,
1201
+ isCoreSupported: supportsSpanQueryCore,
1202
+ onUnsupportedCore: () => throwTraceQueryError(501, {
1203
+ code: "SPAN_QUERY_UNSUPPORTED",
1204
+ message: "Span queries require a newer @mastra/core. Please upgrade."
1205
+ }),
1206
+ handler: async ({ mastra, requestContext, timeRange, where, orderBy, page }) => {
1207
+ let plan;
1208
+ try {
1209
+ plan = coreStorage.planSpanQuery({
1210
+ timeRange,
1211
+ where,
1212
+ orderBy,
1213
+ page
1214
+ }, { scope: resolveTraceQueryScope(requestContext, "SPAN_QUERY_UNSUPPORTED") });
1215
+ } catch (error) {
1216
+ if (error instanceof coreStorage.TraceQueryValidationError) throwTraceQueryError(422, {
1217
+ code: error.code,
1218
+ message: "The span query is invalid",
1219
+ issues: error.issues
1220
+ });
1221
+ if (error instanceof coreStorage.TraceQueryCursorError) throwTraceQueryError(error.code === "TRACE_QUERY_CURSOR_CONFLICT" ? 409 : 400, {
1222
+ code: error.code,
1223
+ message: error.message
1224
+ });
1225
+ throw error;
1226
+ }
1227
+ let observabilityStore;
1228
+ try {
1229
+ observabilityStore = await getObservabilityStore(mastra);
1230
+ assertObservabilitySpanQuerySupported(observabilityStore);
1231
+ assertObservabilityTraceQueryTenantScopeSupported(observabilityStore, plan.scope);
1232
+ } catch (error) {
1233
+ if (error instanceof HTTPException && error.status === 501) throwTraceQueryError(501, {
1234
+ code: "SPAN_QUERY_UNSUPPORTED",
1235
+ message: error.message
1236
+ });
1237
+ throw error;
1238
+ }
1239
+ try {
1240
+ return await observabilityStore.querySpans(plan);
1241
+ } catch (error) {
1242
+ if (error instanceof coreStorage.TraceQueryCursorError) throwTraceQueryError(error.code === "TRACE_QUERY_CURSOR_CONFLICT" ? 409 : 400, {
1243
+ code: error.code,
1244
+ message: error.message
1245
+ });
1246
+ if (error instanceof coreStorage.TraceQueryResourceLimitError) throwTraceQueryError(503, {
1247
+ code: error.code,
1248
+ message: error.message
1249
+ });
1250
+ if (error instanceof coreStorage.TraceQueryExecutionError) throwTraceQueryError(504, {
1251
+ code: error.code,
1252
+ message: error.message
1253
+ });
1254
+ throw error;
1255
+ }
1256
+ }
1257
+ });
1258
+ if (QUERY_SPANS.openapi) {
1259
+ QUERY_SPANS.openapi.responses[400] = {
1260
+ description: "Malformed JSON or malformed cursor",
1261
+ content: { "application/json": { schema: z.union([traceQueryMalformedBodyErrorSchema, traceQueryMalformedCursorErrorSchema]) } }
1262
+ };
1263
+ QUERY_SPANS.openapi.responses[409] = {
1264
+ description: "Cursor does not match the normalized query",
1265
+ content: { "application/json": { schema: traceQueryCursorConflictErrorSchema } }
1266
+ };
1267
+ QUERY_SPANS.openapi.responses[413] = {
1268
+ description: "Request body exceeds 256 KiB",
1269
+ content: { "application/json": { schema: traceQueryBodyTooLargeErrorSchema } }
1270
+ };
1271
+ QUERY_SPANS.openapi.responses[422] = {
1272
+ description: "Structurally or semantically invalid span query",
1273
+ content: { "application/json": { schema: traceQueryValidationResponseSchema } }
1274
+ };
1275
+ QUERY_SPANS.openapi.responses[501] = {
1276
+ description: "The configured observability store does not support span queries",
1277
+ content: { "application/json": { schema: spanQueryUnsupportedErrorSchema } }
1278
+ };
1279
+ QUERY_SPANS.openapi.responses[503] = {
1280
+ description: "Span query exceeded a bounded execution resource limit",
1281
+ content: { "application/json": { schema: traceQueryResourceLimitErrorSchema } }
1282
+ };
1283
+ QUERY_SPANS.openapi.responses[504] = {
1284
+ description: "Span query exceeded the configured database execution timeout",
1285
+ content: { "application/json": { schema: traceQueryTimeoutErrorSchema } }
1286
+ };
1287
+ }
1179
1288
  const GET_TRACE_QUERY_FIELDS = createNewRoute(NEW_ROUTE_DEFS.GET_TRACE_QUERY_FIELDS, {
1180
1289
  bodySchema: coreStorage.getTraceQueryFieldsArgsSchema,
1181
1290
  responseSchema: coreStorage.getTraceQueryFieldsResponseSchema,
@@ -1753,6 +1862,7 @@ const GET_CAPABILITIES = createRoute({
1753
1862
  const NEW_ROUTES = {
1754
1863
  QUERY_TRACES,
1755
1864
  QUERY_THREADS,
1865
+ QUERY_SPANS,
1756
1866
  LIST_LOGS,
1757
1867
  LIST_SCORES,
1758
1868
  CREATE_SCORE,
@@ -1786,6 +1896,6 @@ const NEW_ROUTES = {
1786
1896
  GET_CAPABILITIES
1787
1897
  };
1788
1898
  //#endregion
1789
- export { LIST_FEEDBACK as A, GET_SCORE_BREAKDOWN as C, GET_TAGS as D, GET_SERVICE_NAMES as E, QUERY_THREADS as F, QUERY_TRACES as I, UPDATE_FEEDBACK_REVIEW_STATUS as L, LIST_METRICS as M, LIST_SCORES as N, GET_TRACE_QUERY_FIELDS as O, NEW_ROUTES as P, GET_SCORE_AGGREGATE as S, GET_SCORE_TIME_SERIES as T, GET_METRIC_LABEL_VALUES as _, DELETE_SCORES as a, GET_METRIC_TIME_SERIES as b, GET_ENTITY_TYPES as c, GET_FEEDBACK_BREAKDOWN as d, GET_FEEDBACK_PERCENTILES as f, GET_METRIC_LABEL_KEYS as g, GET_METRIC_BREAKDOWN as h, DELETE_FEEDBACK as i, LIST_LOGS as j, GET_TRACE_QUERY_VALUES as k, GET_ENVIRONMENTS as l, GET_METRIC_AGGREGATE as m, CREATE_FEEDBACK as n, GET_CAPABILITIES as o, GET_FEEDBACK_TIME_SERIES as p, CREATE_SCORE as r, GET_ENTITY_NAMES as s, AGGREGATE_TRACES as t, GET_FEEDBACK_AGGREGATE as u, GET_METRIC_NAMES as v, GET_SCORE_PERCENTILES as w, GET_SCORE as x, GET_METRIC_PERCENTILES as y };
1899
+ export { LIST_FEEDBACK as A, GET_SCORE_BREAKDOWN as C, GET_TAGS as D, GET_SERVICE_NAMES as E, QUERY_SPANS as F, QUERY_THREADS as I, QUERY_TRACES as L, LIST_METRICS as M, LIST_SCORES as N, GET_TRACE_QUERY_FIELDS as O, NEW_ROUTES as P, UPDATE_FEEDBACK_REVIEW_STATUS as R, GET_SCORE_AGGREGATE as S, GET_SCORE_TIME_SERIES as T, GET_METRIC_LABEL_VALUES as _, DELETE_SCORES as a, GET_METRIC_TIME_SERIES as b, GET_ENTITY_TYPES as c, GET_FEEDBACK_BREAKDOWN as d, GET_FEEDBACK_PERCENTILES as f, GET_METRIC_LABEL_KEYS as g, GET_METRIC_BREAKDOWN as h, DELETE_FEEDBACK as i, LIST_LOGS as j, GET_TRACE_QUERY_VALUES as k, GET_ENVIRONMENTS as l, GET_METRIC_AGGREGATE as m, CREATE_FEEDBACK as n, GET_CAPABILITIES as o, GET_FEEDBACK_TIME_SERIES as p, CREATE_SCORE as r, GET_ENTITY_NAMES as s, AGGREGATE_TRACES as t, GET_FEEDBACK_AGGREGATE as u, GET_METRIC_NAMES as v, GET_SCORE_PERCENTILES as w, GET_SCORE as x, GET_METRIC_PERCENTILES as y };
1790
1900
 
1791
- //# sourceMappingURL=observability-new-endpoints-lNC3o66-.js.map
1901
+ //# sourceMappingURL=observability-new-endpoints-DQuhr8aL.js.map