:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
/**
* Auto-generated from the Django backend OpenAPI schema.
* MCP service uses these Zod schemas for generated tool handlers.
* To regenerate: hogli build:openapi
*
* PostHog API - MCP 13 enabled ops
* OpenAPI spec version: 1.0.0
*/
import * as zod from 'zod'
export const TracingSpansAggregateCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansAggregateCreateBodyQueryOneCompareFilterOneCompareDefault = false
export const tracingSpansAggregateCreateBodyQueryOneFilterGroupDefault = []
export const tracingSpansAggregateCreateBodyQueryOneLimitMax = 5000
export const tracingSpansAggregateCreateBodyQueryOneOffsetMin = 0
export const tracingSpansAggregateCreateBodyQueryOneIncludeImpactDefault = false
export const tracingSpansAggregateCreateBodyQueryOneGroupByEndpointDefault = false
export const tracingSpansAggregateCreateBodyQueryOneIncludeHealthDefault = false
export const TracingSpansAggregateCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the primary window. Defaults to last hour.'),
compareFilter: zod
.object({
compare: zod
.boolean()
.default(tracingSpansAggregateCreateBodyQueryOneCompareFilterOneCompareDefault)
.describe(
'When true, also fetch results for a comparison window and return them under `compare`.'
),
compare_to: zod
.string()
.nullish()
.describe(
"Relative date offset for the comparison window (e.g. '-1h', '-1d', '-7d'). Defaults to the immediately previous period of equal length."
),
})
.optional()
.describe(
'Optional comparison-window configuration. When omitted, only the primary window is returned.'
),
serviceNames: zod.array(zod.string()).optional().describe('Filter by service names.'),
filterGroup: zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.default(tracingSpansAggregateCreateBodyQueryOneFilterGroupDefault)
.describe('Property filters applied to spans in both windows.'),
limit: zod
.number()
.min(1)
.max(tracingSpansAggregateCreateBodyQueryOneLimitMax)
.optional()
.describe(
'Max rows to return, ordered by total_duration_nano DESC. Defaults to 100; hard max 5000. Keep this small to bound the response size — a high value on high-cardinality span names (e.g. untemplated URL paths) returns a very large payload. Prefer narrowing with `serviceNames`\/`filterGroup` over raising the limit.'
),
offset: zod
.number()
.min(tracingSpansAggregateCreateBodyQueryOneOffsetMin)
.optional()
.describe(
'Row offset for pagination. Combine with `limit` and the `next_offset` returned in the response to page through results beyond the first page.'
),
includeImpact: zod
.boolean()
.default(tracingSpansAggregateCreateBodyQueryOneIncludeImpactDefault)
.describe(
'Also return the sessions and people behind each operation. Off by default because it reads the span and resource attribute maps, which the rest of the aggregation never touches.'
),
groupByEndpoint: zod
.boolean()
.default(tracingSpansAggregateCreateBodyQueryOneGroupByEndpointDefault)
.describe(
'Group HTTP server spans by `METHOD route` (from `http.route`) in place of the span name, so raw paths like `\/users\/1` and `\/users\/2` fold into one row. Spans without a route keep their span name. Spans that are not HTTP server spans are left out.'
),
includeHealth: zod
.boolean()
.default(tracingSpansAggregateCreateBodyQueryOneIncludeHealthDefault)
.describe(
'Also return `health_status` and `health_reason` per row, comparing each row with the same row in the comparison window, or in the previous period when `compareFilter` is off. Uses the same statuses and thresholds as the service health check. Costs a second window query.'
),
})
.describe('The span aggregation query to execute.'),
})
export const TracingSpansAttributeBreakdownCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansAttributeBreakdownCreateBodyQueryOneExcludeBreakdownFilterDefault = false
export const tracingSpansAttributeBreakdownCreateBodyQueryOneCompareFilterOneCompareDefault = false
export const tracingSpansAttributeBreakdownCreateBodyQueryOneFilterGroupDefault = []
export const TracingSpansAttributeBreakdownCreateBody = () => zod.object({
query: zod
.object({
breakdownKey: zod
.string()
.describe(
'Attribute key to group by (e.g. \"server.address\", \"http.response.status_code\"). Discover keys with apm-attributes-list. For the \"span\" breakdown type, must be one of the allowlisted top-level columns: \"service_name\", \"status_code\".'
),
breakdownType: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'Where the key lives: \"span\" for allowlisted top-level span columns, \"span_attribute\" for span-level attributes, \"span_resource_attribute\" for resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
excludeBreakdownFilter: zod
.boolean()
.default(tracingSpansAttributeBreakdownCreateBodyQueryOneExcludeBreakdownFilterDefault)
.describe(
"Drop filters targeting the breakdown key itself (including serviceNames for a service_name breakdown), so a facet's value list stays complete while one of its values is selected."
),
facetSearch: zod
.string()
.optional()
.describe(
"Type-ahead filter over the breakdown field's own values (case-insensitive substring match). An empty string means no filter. Lets a facet's value search reach past the row limit."
),
orderBy: zod
.enum(['count', 'error_count'])
.describe('\* `count` - count\n\* `error_count` - error_count')
.optional()
.describe(
'Order rows by span count or error count, descending. Defaults to count.\n\n\* `count` - count\n\* `error_count` - error_count'
),
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the primary window. Defaults to last hour.'),
compareFilter: zod
.object({
compare: zod
.boolean()
.default(tracingSpansAttributeBreakdownCreateBodyQueryOneCompareFilterOneCompareDefault)
.describe(
'When true, also fetch results for a comparison window and return them under `compare`.'
),
compare_to: zod
.string()
.nullish()
.describe(
"Relative date offset for the comparison window (e.g. '-1h', '-1d', '-7d'). Defaults to the immediately previous period of equal length."
),
})
.optional()
.describe(
'Optional comparison-window configuration. When omitted, only the primary window is returned.'
),
serviceNames: zod.array(zod.string()).optional().describe('Filter by service names.'),
filterGroup: zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.default(tracingSpansAttributeBreakdownCreateBodyQueryOneFilterGroupDefault)
.describe('Property filters scoping the spans the breakdown runs over (e.g. only error spans).'),
})
.describe('The attribute breakdown query to execute.'),
})
export const TracingSpansAttributesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansAttributesRetrieveQueryLimitDefault = 100
export const tracingSpansAttributesRetrieveQueryLimitMax = 100
export const tracingSpansAttributesRetrieveQueryOffsetDefault = 0
export const tracingSpansAttributesRetrieveQueryOffsetMin = 0
export const tracingSpansAttributesRetrieveQuerySearchValuesDefault = false
export const TracingSpansAttributesRetrieveQueryParams = () => zod.object({
attribute_type: zod
.enum(['span_attribute', 'span_resource_attribute'])
.optional()
.describe(
'Type of attributes: \"span_attribute\" for span-level attributes, \"span_resource_attribute\" for resource-level attributes.\n\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
dateRange: zod
.string()
.min(1)
.optional()
.describe(
'JSON-encoded date range object, e.g. {\"date_from\": \"-1h\"}. Malformed JSON returns 400. Or pass date_from and date_to.'
),
date_from: zod.string().min(1).optional().describe('Range start: -1h, -7d or ISO 8601. Defaults to -1h.'),
date_to: zod.string().min(1).optional().describe('Range end, same format. Omit for \"now\".'),
limit: zod
.number()
.min(1)
.max(tracingSpansAttributesRetrieveQueryLimitMax)
.default(tracingSpansAttributesRetrieveQueryLimitDefault)
.describe('Max results (default: 100).'),
offset: zod
.number()
.min(tracingSpansAttributesRetrieveQueryOffsetMin)
.default(tracingSpansAttributesRetrieveQueryOffsetDefault)
.describe('Pagination offset (default: 0).'),
search: zod.string().optional().describe('Search filter for attribute names.'),
search_values: zod
.boolean()
.default(tracingSpansAttributesRetrieveQuerySearchValuesDefault)
.describe(
'When true, the search query also matches attribute values (not just keys), so a value such as a trace_id finds the key holding it.'
),
})
export const TracingSpansCountCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const TracingSpansCountCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the count. Defaults to last hour.'),
serviceNames: zod.array(zod.string()).optional().describe('Filter by service names.'),
statusCodes: zod
.array(zod.number())
.optional()
.describe(
'Filter by OTel span status codes (0 Unset, 1 OK, 2 Error) — not HTTP status codes. Use [2] to select error spans.'
),
filterGroup: zod
.union([
zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.describe('A flat list of filters, combined with AND.'),
zod
.object({
type: zod.enum(['AND', 'OR']).describe('How the inner groups combine.'),
values: zod
.array(
zod.object({
type: zod
.enum(['AND', 'OR'])
.describe('How the filters in this group combine.'),
values: zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.describe('The property filters in this group.'),
})
)
.describe('The inner filter groups.'),
})
.describe('A nested group of filter groups, as the UI filter editor builds it.'),
])
.optional()
.describe('Property filters for the count. Either a flat list of filters or a nested filter group.'),
})
.describe('The span count query to execute.'),
})
export const TracingSpansDurationHistogramCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansDurationHistogramCreateBodyQueryOneFilterGroupDefault = []
export const tracingSpansDurationHistogramCreateBodyQueryOneRootSpansDefault = true
export const TracingSpansDurationHistogramCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the query. Defaults to last hour.'),
serviceNames: zod.array(zod.string()).optional().describe('Filter by service names.'),
statusCodes: zod
.array(zod.number())
.optional()
.describe(
'Filter by OTel span status codes (0 Unset, 1 OK, 2 Error) — not HTTP status codes. Use [2] to select error spans.'
),
filterGroup: zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.default(tracingSpansDurationHistogramCreateBodyQueryOneFilterGroupDefault)
.describe('Property filters for the query.'),
rootSpans: zod
.boolean()
.default(tracingSpansDurationHistogramCreateBodyQueryOneRootSpansDefault)
.describe(
'When true (default), bucket root-span durations only — a distribution of traces. When false, bucket every matching span — used with a span name filter for operation-scoped distributions.'
),
})
.describe('The duration-histogram query to execute.'),
})
export const TracingSpansLatencyHeatmapCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansLatencyHeatmapCreateBodyQueryOneFilterGroupDefault = []
export const tracingSpansLatencyHeatmapCreateBodyQueryOneRootSpansDefault = true
export const TracingSpansLatencyHeatmapCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the query. Defaults to last hour.'),
serviceNames: zod.array(zod.string()).optional().describe('Filter by service names.'),
statusCodes: zod
.array(zod.number())
.optional()
.describe(
'Filter by OTel span status codes (0 Unset, 1 OK, 2 Error) — not HTTP status codes. Use [2] to select error spans.'
),
filterGroup: zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.default(tracingSpansLatencyHeatmapCreateBodyQueryOneFilterGroupDefault)
.describe('Property filters for the query.'),
rootSpans: zod
.boolean()
.default(tracingSpansLatencyHeatmapCreateBodyQueryOneRootSpansDefault)
.describe(
'When true (default), bucket root-span durations only — a distribution of traces. When false, bucket every matching span — used with a span name filter for operation-scoped distributions.'
),
})
.describe('The latency-heatmap query to execute.'),
})
export const TracingSpansQueryCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansQueryCreateBodyQueryOneFilterGroupDefault = []
export const tracingSpansQueryCreateBodyQueryOneLimitDefault = 100
export const tracingSpansQueryCreateBodyQueryOneOffsetMin = 0
export const tracingSpansQueryCreateBodyQueryOneRootSpansDefault = true
export const tracingSpansQueryCreateBodyQueryOneFlatSpansDefault = false
export const tracingSpansQueryCreateBodyQueryOneExcludeAttributesDefault = false
export const TracingSpansQueryCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the query. Defaults to last hour.'),
serviceNames: zod.array(zod.string()).optional().describe('Filter by service names.'),
statusCodes: zod
.array(zod.number())
.optional()
.describe(
'Filter by OTel span status codes (0 Unset, 1 OK, 2 Error) — not HTTP status codes. Use [2] to select error spans.'
),
orderBy: zod
.enum(['timestamp', 'duration'])
.describe('\* `timestamp` - timestamp\n\* `duration` - duration')
.optional()
.describe(
"Column to order by. Defaults to timestamp. Ordering by timestamp paginates via the keyset cursor ('after'); ordering by duration paginates via 'offset'.\n\n\* `timestamp` - timestamp\n\* `duration` - duration"
),
orderDirection: zod
.enum(['ASC', 'DESC'])
.describe('\* `ASC` - ASC\n\* `DESC` - DESC')
.optional()
.describe(
'Order direction. Defaults to DESC (e.g. timestamp+DESC = newest first, duration+DESC = slowest first).\n\n\* `ASC` - ASC\n\* `DESC` - DESC'
),
filterGroup: zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.default(tracingSpansQueryCreateBodyQueryOneFilterGroupDefault)
.describe('Property filters for the query.'),
traceId: zod.string().optional().describe('Filter to a specific trace ID (hex string).'),
limit: zod
.number()
.default(tracingSpansQueryCreateBodyQueryOneLimitDefault)
.describe('Max results (1-1000). Defaults to 100.'),
after: zod
.string()
.optional()
.describe('Keyset pagination cursor from a previous timestamp-ordered response.'),
offset: zod
.number()
.min(tracingSpansQueryCreateBodyQueryOneOffsetMin)
.optional()
.describe('Pagination offset, used when ordering by a column (e.g. duration). Defaults to 0.'),
rootSpans: zod
.boolean()
.default(tracingSpansQueryCreateBodyQueryOneRootSpansDefault)
.describe('Filter to root spans only. Defaults to true.'),
flatSpans: zod
.boolean()
.default(tracingSpansQueryCreateBodyQueryOneFlatSpansDefault)
.describe(
'Return the matching spans themselves, one row per span (root and child), instead of collapsing to traces. Use this to search by a child-span attribute (e.g. code.filepath) without the whole-trace grouping. Distinct from rootSpans. Defaults to false.'
),
prefetchSpans: zod.number().optional().describe('Number of child spans to prefetch per trace (1-100).'),
excludeAttributes: zod
.boolean()
.default(tracingSpansQueryCreateBodyQueryOneExcludeAttributesDefault)
.describe(
'Omit the per-span attributes and resource attributes maps from results to keep payloads compact. Defaults to false.'
),
})
.describe('The tracing spans query to execute.'),
})
export const TracingSpansServiceNamesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const TracingSpansServiceNamesRetrieveQueryParams = () => zod.object({
dateRange: zod
.string()
.min(1)
.optional()
.describe(
'JSON-encoded date range object, e.g. {\"date_from\": \"-1h\"}. Malformed JSON returns 400. Or pass date_from and date_to.'
),
date_from: zod.string().min(1).optional().describe('Range start: -1h, -7d or ISO 8601. Defaults to -1h.'),
date_to: zod.string().min(1).optional().describe('Range end, same format. Omit for \"now\".'),
search: zod.string().min(1).optional().describe('Search filter for service names.'),
})
export const TracingSpansServiceHealthCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansServiceHealthCreateBodyQueryOneCompareDefault = `previous_period`
export const tracingSpansServiceHealthCreateBodyQueryOneServiceNamesMax = 100
export const tracingSpansServiceHealthCreateBodyQueryOneSpanScopeDefault = `entry`
export const tracingSpansServiceHealthCreateBodyQueryOneOrderByDefault = `status`
export const tracingSpansServiceHealthCreateBodyQueryOneLimitDefault = 25
export const tracingSpansServiceHealthCreateBodyQueryOneLimitMax = 200
export const TracingSpansServiceHealthCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
.object({
date_from: zod.string().nullish().describe('Relative (-30m, -6h, -7d) or ISO 8601.'),
date_to: zod.string().nullish().describe('Same format. Omit or null for \"now\".'),
})
.optional()
.describe('The window to score. Defaults to the last hour.'),
compare: zod
.enum(['none', 'previous_period', 'previous_day', 'previous_week'])
.describe(
'\* `none` - None\n\* `previous_period` - Previous Period\n\* `previous_day` - Previous Day\n\* `previous_week` - Previous Week'
)
.default(tracingSpansServiceHealthCreateBodyQueryOneCompareDefault)
.describe(
'The baseline. previous_period (default) is the same length just before the window. previous_day and previous_week shift the window back 1 or 7 days. none skips it. baselineDateRange overrides it.\n\n\* `none` - None\n\* `previous_period` - Previous Period\n\* `previous_day` - Previous Day\n\* `previous_week` - Previous Week'
),
environment: zod
.string()
.nullish()
.describe(
'Only this environment, matched without case on deployment.environment.name, then deployment.environment, then env.'
),
serviceNames: zod
.array(zod.string())
.max(tracingSpansServiceHealthCreateBodyQueryOneServiceNamesMax)
.optional()
.describe('Only these services.'),
spanScope: zod
.enum(['entry', 'all'])
.describe('\* `entry` - Entry\n\* `all` - All')
.default(tracingSpansServiceHealthCreateBodyQueryOneSpanScopeDefault)
.describe(
'entry (default) counts root, server and consumer spans, one per request. all counts every span.\n\n\* `entry` - Entry\n\* `all` - All'
),
orderBy: zod
.enum(['status', 'error_rate', 'p95', 'throughput', 'error_count'])
.describe(
'\* `status` - Status\n\* `error_rate` - Error Rate\n\* `p95` - P95\n\* `throughput` - Throughput\n\* `error_count` - Error Count'
)
.default(tracingSpansServiceHealthCreateBodyQueryOneOrderByDefault)
.describe(
'status (default) puts silent, regressed and degraded first. The others sort high to low.\n\n\* `status` - Status\n\* `error_rate` - Error Rate\n\* `p95` - P95\n\* `throughput` - Throughput\n\* `error_count` - Error Count'
),
limit: zod
.number()
.min(1)
.max(tracingSpansServiceHealthCreateBodyQueryOneLimitMax)
.default(tracingSpansServiceHealthCreateBodyQueryOneLimitDefault)
.describe('Max service rows, 1-200.'),
})
.describe('The service health query. Every field is optional.'),
baselineDateRange: zod
.object({
date_from: zod.string().nullish().describe('Relative (-30m, -6h, -7d) or ISO 8601.'),
date_to: zod.string().nullish().describe('Same format. Omit or null for \"now\".'),
})
.optional()
.describe('An explicit baseline window. Overrides query.compare.'),
})
export const TracingSpansSparklineCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansSparklineCreateBodyQueryOneFilterGroupDefault = []
export const tracingSpansSparklineCreateBodyQueryOneRootSpansDefault = false
export const TracingSpansSparklineCreateBody = () => zod.object({
query: zod
.object({
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the query. Defaults to last hour.'),
serviceNames: zod.array(zod.string()).optional().describe('Filter by service names.'),
statusCodes: zod
.array(zod.number())
.optional()
.describe(
'Filter by OTel span status codes (0 Unset, 1 OK, 2 Error) — not HTTP status codes. Use [2] to select error spans.'
),
filterGroup: zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.default(tracingSpansSparklineCreateBodyQueryOneFilterGroupDefault)
.describe('Property filters for the query.'),
rootSpans: zod
.boolean()
.default(tracingSpansSparklineCreateBodyQueryOneRootSpansDefault)
.describe(
"When true, count only root spans (one per trace) so the bars reflect the Traces view. When false (default), count every matching span — the Spans view's volume."
),
})
.describe('The sparkline query to execute.'),
})
export const tracingSpansTraceCreatePathTraceIdRegExp = new RegExp('^[a-zA-Z0-9]+$')
export const TracingSpansTraceCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
trace_id: zod.string().regex(tracingSpansTraceCreatePathTraceIdRegExp),
})
export const tracingSpansTraceCreateBodyExcludeAttributesDefault = false
export const tracingSpansTraceCreateBodyOffsetMin = 0
export const TracingSpansTraceCreateBody = () => zod.object({
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the query. Omit it to search all retained spans for this trace.'),
excludeAttributes: zod
.boolean()
.default(tracingSpansTraceCreateBodyExcludeAttributesDefault)
.describe(
'Omit the per-span attributes, resource attributes and events from results to keep payloads compact. Defaults to false.'
),
offset: zod
.number()
.min(tracingSpansTraceCreateBodyOffsetMin)
.optional()
.describe(
"Pagination offset into the trace's spans (ordered by start time ascending). Each page returns up to 2000 spans; pass the response's `nextOffset` to load the next page. Defaults to 0."
),
})
export const TracingSpansTreeCreateParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansTreeCreateBodyQueryOneCompareFilterOneCompareDefault = false
export const tracingSpansTreeCreateBodyQueryOneFilterGroupDefault = []
export const TracingSpansTreeCreateBody = () => zod.object({
query: zod
.object({
spanName: zod
.string()
.describe(
'Span name to scope the matched trace set. Required because the (trace_id, parent_span_id) self-join is unsafe without bounding the matched traces.'
),
serviceName: zod
.string()
.describe(
'Service name that scopes the returned tree. Applied to the spans CTE so the call-tree only contains spans from this service, even when matched traces span multiple services.'
),
dateRange: zod
.object({
date_from: zod
.string()
.nullish()
.describe(
'Start of the date range. Accepts ISO 8601 timestamps or relative formats: -1h, -6h, -1d, -7d, etc.'
),
date_to: zod
.string()
.nullish()
.describe('End of the date range. Same format as date_from. Omit or null for \"now\".'),
})
.optional()
.describe('Date range for the primary window. Defaults to last hour.'),
compareFilter: zod
.object({
compare: zod
.boolean()
.default(tracingSpansTreeCreateBodyQueryOneCompareFilterOneCompareDefault)
.describe(
'When true, also fetch results for a comparison window and return them under `compare`.'
),
compare_to: zod
.string()
.nullish()
.describe(
"Relative date offset for the comparison window (e.g. '-1h', '-1d', '-7d'). Defaults to the immediately previous period of equal length."
),
})
.optional()
.describe(
'Optional comparison-window configuration. When omitted, only the primary window is returned.'
),
serviceNames: zod.array(zod.string()).optional().describe('Filter by service names.'),
filterGroup: zod
.array(
zod.object({
key: zod
.string()
.describe(
'Attribute key. For type \"span\", use built-in fields (trace_id, span_id, duration, name, kind, status_code, is_root_span). For \"span_attribute\"\/\"span_resource_attribute\", use the attribute key (e.g. \"http.method\").'
),
type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.describe(
'\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
)
.describe(
'\"span\" filters built-in span fields. \"span_attribute\" filters span-level attributes. \"span_resource_attribute\" filters resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
operator: zod
.enum([
'exact',
'is_not',
'icontains',
'not_icontains',
'starts_with',
'not_starts_with',
'ends_with',
'not_ends_with',
'regex',
'not_regex',
'gt',
'lt',
'is_set',
'is_not_set',
])
.describe(
'\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
)
.describe(
'Comparison operator.\n\n\* `exact` - exact\n\* `is_not` - is_not\n\* `icontains` - icontains\n\* `not_icontains` - not_icontains\n\* `starts_with` - starts_with\n\* `not_starts_with` - not_starts_with\n\* `ends_with` - ends_with\n\* `not_ends_with` - not_ends_with\n\* `regex` - regex\n\* `not_regex` - not_regex\n\* `gt` - gt\n\* `lt` - lt\n\* `is_set` - is_set\n\* `is_not_set` - is_not_set'
),
value: zod
.unknown()
.optional()
.describe(
'Value to compare against. String, number, or array of strings. Omit for is_set\/is_not_set operators.'
),
})
)
.default(tracingSpansTreeCreateBodyQueryOneFilterGroupDefault)
.describe('Additional property filters applied to spans in both windows.'),
})
.describe('The span call-tree aggregation query to execute.'),
})
export const TracingSpansValuesRetrieveParams = () => zod.object({
project_id: zod
.string()
.describe(
"Project ID of the project you're trying to access. To find the ID of the project, make a call to \/api\/projects\/."
),
})
export const tracingSpansValuesRetrieveQueryLimitDefault = 100
export const tracingSpansValuesRetrieveQueryLimitMax = 100
export const tracingSpansValuesRetrieveQueryOffsetDefault = 0
export const tracingSpansValuesRetrieveQueryOffsetMin = 0
export const TracingSpansValuesRetrieveQueryParams = () => zod.object({
attribute_type: zod
.enum(['span', 'span_attribute', 'span_resource_attribute'])
.optional()
.describe(
'Type of attribute: \"span\" for built-in span fields (e.g. name), \"span_attribute\" for span-level attributes, \"span_resource_attribute\" for resource-level attributes.\n\n\* `span` - span\n\* `span_attribute` - span_attribute\n\* `span_resource_attribute` - span_resource_attribute'
),
dateRange: zod
.string()
.min(1)
.optional()
.describe(
'JSON-encoded date range object, e.g. {\"date_from\": \"-1h\"}. Malformed JSON returns 400. Or pass date_from and date_to.'
),
date_from: zod.string().min(1).optional().describe('Range start: -1h, -7d or ISO 8601. Defaults to -1h.'),
date_to: zod.string().min(1).optional().describe('Range end, same format. Omit for \"now\".'),
key: zod.string().min(1).describe('The attribute key to get values for.'),
limit: zod
.number()
.min(1)
.max(tracingSpansValuesRetrieveQueryLimitMax)
.default(tracingSpansValuesRetrieveQueryLimitDefault)
.describe('Max results (default: 100).'),
offset: zod
.number()
.min(tracingSpansValuesRetrieveQueryOffsetMin)
.default(tracingSpansValuesRetrieveQueryOffsetDefault)
.describe('Pagination offset (default: 0).'),
value: zod.string().optional().describe('Search filter for attribute values.'),
})