-
Notifications
You must be signed in to change notification settings - Fork 906
Description
Describe your environment
Using opentelemetry-instrumentation-elasticsearch 0.24b0 with elasticsearch 7.14.1
What is the expected behavior?
The instrumentation should follow the semantic conventions for database clients, notably use span names in the format <db.operation> <db.name>.<db.sql.table>.
What is the actual behavior?
Span names are built from the request URL without any form of parsing. In particular, the operation (index/delete/...) is missing, and the database name is not necessarily present.
Example span names:
Elasticsearch/indexname/_doc/documentid(insert operation ifPUT, read operation ifGET)Elasticsearch/indexname/_doc(probably an insert without a set primary key)Elasticsearch/indexname(either reading metadata or changing schema/settings),Elasticsearch/indexname/_search(query operation)
Many attributes are also missing or are only present in the request path, because they get encoded in the URL before perform_request() is called, which is the only instrumented method.
An unbounded number of span names can also be created, which is a more urgent issue tracked by #704.