Hanzo
OpenapiO11y

Suggests attribute keys and example filter queries for the query builder,…

Suggests attribute keys and example filter queries for the query builder, seeded by what the org's own telemetry carries.

GET /v1/o11y/filter_suggestions

Addresshttps://api.hanzo.ai/v1/o11y/filter_suggestions
MethodGET
Operationget_o11y_filter_suggestions
AuthAuthorization: Bearer $HANZO_API_KEY

Suggests attribute keys and example filter queries for the query builder, seeded by what the org's own telemetry carries. Only the logs data source is supported today.

Callers need the viewer role; the runtime's own gate enforces it.

Request

5 fields.

FieldInTypeRequiredDescription
dataSourcequerystringyesDataSource is the signal suggestions are drawn from; only logs is supported today.
searchTextquerystringSearchText narrows attribute suggestions to keys containing it.
existingFilterquerystringExistingFilter is the current filter set, JSON base64url-encoded, so example queries build on it rather than repeat it.
attributesLimitqueryintegerAttributesLimit caps how many attribute keys come back.
examplesLimitqueryintegerExamplesLimit caps how many example queries come back.

Response

StatusBodyMeaning
200o11y.O11yFilterSuggestionsOutok

200 body — 19 fields.

FieldInTypeAlwaysDescription
databodyo11y.O11yFilterSuggestions
data.attributesbodyo11y.O11yAttributeKey[]Attributes are the suggested attribute keys.
data.attributes[].dataTypebodystringDataType is the attribute's value type — string, int64, float64 or bool.
data.attributes[].isColumnbodybooleanIsColumn marks an attribute materialized as its own column.
data.attributes[].isJSONbodybooleanIsJSON marks an attribute extracted from a JSON body.
data.attributes[].keybodystringKey is the attribute's name.
data.attributes[].typebodystringType says where the attribute lives: tag or resource.
data.example_queriesbodyo11y.O11yFilterSet[]ExampleQueries are ready-to-run filter sets.
data.example_queries[].itemsbodyo11y.O11yFilterItem[]Items are the conditions.
data.example_queries[].items[].keybodyo11y.O11yAttributeKey
data.example_queries[].items[].key.dataTypebodystringDataType is the attribute's value type — string, int64, float64 or bool.
data.example_queries[].items[].key.isColumnbodybooleanIsColumn marks an attribute materialized as its own column.
data.example_queries[].items[].key.isJSONbodybooleanIsJSON marks an attribute extracted from a JSON body.
data.example_queries[].items[].key.keybodystringKey is the attribute's name.
data.example_queries[].items[].key.typebodystringType says where the attribute lives: tag or resource.
data.example_queries[].items[].opbodystringOperator is the comparison, e.g.
data.example_queries[].items[].valuebodyobjectValue is what it is tested against; its type follows the attribute's.
data.example_queries[].opbodystringOperator combines the items — AND or OR.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y filter_suggestions --data-source <data-source>

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page