diff --git a/docs/attributes-registry/db.md b/docs/attributes-registry/db.md index a64d075bac..e2633dddd9 100644 --- a/docs/attributes-registry/db.md +++ b/docs/attributes-registry/db.md @@ -10,6 +10,7 @@ - [Cassandra Attributes](#cassandra-attributes) - [Azure Cosmos DB Attributes](#azure-cosmos-db-attributes) - [Elasticsearch Attributes](#elasticsearch-attributes) +- [Search attributes](#search-attributes) - [Db Vector Attributes](#db-vector-attributes) - [Deprecated Database Attributes](#deprecated-database-attributes) - [Deprecated Database Metrics](#deprecated-database-metrics) @@ -204,19 +205,15 @@ This group defines attributes for Elasticsearch. **[9]:** Many Elasticsearch url paths allow dynamic values. These SHOULD be recorded in span attributes in the format `db.elasticsearch.path_parts.`, where `` is the url path part name. The implementation SHOULD reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. -## Db Vector Attributes +## Search attributes -This group defines attributes for vector databases. +This group defines attributes for Search. -| Attribute | Type | Description | Examples | Stability | -| ----------------------------- | ------ | ---------------------------------------------------- | ------------------------ | ---------------------------------------------------------------- | -| `db.vector.dimension_count` | int | The dimension of the vector. | `3` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `db.vector.field_name` | string | The name field as of the vector (e.g. a field name). | `vector` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `db.vector.model` | string | The model used for the embedding. | `text-embedding-3-small` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `db.vector.query.top_k` | int | The top-k most similar vectors returned by a query. | `5` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `db.vector.similarity_metric` | string | The metric used in similarity search. | `cosine` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| Attribute | Type | Description | Examples | Stability | +| ----------------------------- | ------ | ------------------------------------- | -------- | ---------------------------------------------------------------- | +| `db.search.similarity_metric` | string | The metric used in similarity search. | `cosine` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -`db.vector.similarity_metric` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. +`db.search.similarity_metric` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | | ----------- | ------------------------------ | ---------------------------------------------------------------- | @@ -225,6 +222,16 @@ This group defines attributes for vector databases. | `euclidean` | The euclidean distance metric. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `manhattan` | The Manhattan distance metric. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +## Db Vector Attributes + +This group defines attributes for vector databases. + +| Attribute | Type | Description | Examples | Stability | +| --------------------------- | ------ | ---------------------------------------------------- | -------- | ---------------------------------------------------------------- | +| `db.vector.dimension_count` | int | The dimension of the vector. | `3` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `db.vector.field_name` | string | The name field as of the vector (e.g. a field name). | `vector` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `db.vector.query.top_k` | int | The top-k most similar vectors returned by a query. | `5` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + ## Deprecated Database Attributes "Describes deprecated db attributes." diff --git a/model/database/registry.yaml b/model/database/registry.yaml index 9a283c2c3f..51d1f49868 100644 --- a/model/database/registry.yaml +++ b/model/database/registry.yaml @@ -541,11 +541,12 @@ groups: reference the [elasticsearch schema](https://raw.githubusercontent.com/elastic/elasticsearch-specification/main/output/schema/schema.json) in order to map the path part values to their names. examples: ['db.elasticsearch.path_parts.index=test-index', 'db.elasticsearch.path_parts.doc_id=123'] - - id: registry.db.vector - prefix: db.vector + - id: registry.db.search + prefix: db.search type: attribute_group + display_name: Search attributes brief: > - This group defines attributes for vector databases. + This group defines attributes for Search. attributes: - id: similarity_metric type: @@ -574,6 +575,12 @@ groups: brief: > The metric used in similarity search. examples: 'cosine' + - id: registry.db.vector + prefix: db.vector + type: attribute_group + brief: > + This group defines attributes for vector databases. + attributes: - id: field_name type: string stability: experimental @@ -586,12 +593,6 @@ groups: brief: > The dimension of the vector. examples: [3] - - id: model - type: string - stability: experimental - brief: > - The model used for the embedding. - examples: 'text-embedding-3-small' - id: query.top_k type: int stability: experimental