To continue the https://github.com/spring-projects/spring-ai/issues/953 story we would like to provide observability support for the Spring AI VectorStore abstractions. We would like to observe the add, delete and similaritySearch endpoints.

Related suggestions by @ThomasVitale :

We can follow the general DB conventions (https://opentelemetry.io/docs/specs/semconv/attributes-registry/db/) and use the "db.operation.name" attribute to distinguish between add, delete, similaritySearch...

About the similarity search, it would be nice to use the upcoming attributes in the Vector DB conventions, whenever they make sense: https://github.com/open-telemetry/semantic-conventions/blob/da6649b090511a66779bffb585216884407dbc4f/docs/attributes-registry/db.md#db-vector-attributes

Comment From: tzolov

Following UML class diagram illustrates the Spring AI VectorStore Observability implementation: Restored Spring AI (4)

Comment From: tzolov

Sample Grafana/Tempo traces for add and search: Screenshot 2024-08-11 at 11 44 56 Screenshot 2024-08-11 at 11 45 17 Screenshot 2024-08-11 at 11 45 38

Comment From: tzolov

resolved by https://github.com/tzolov/spring-ai/commit/c8e03f1a98b6e7e55cb101a8200f2b20202e70d6