We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b62a8fa commit 0033851Copy full SHA for 0033851
test_elasticsearch/test_server/test_otel.py
@@ -44,8 +44,12 @@ def test_otel_end_to_end(monkeypatch, elasticsearch_url: str):
44
spans = memory_exporter.get_finished_spans()
45
assert len(spans) == 1
46
assert spans[0].name == "search"
47
- assert spans[0].attributes == {
+ expected_attributes = {
48
"http.request.method": "POST",
49
"db.system": "elasticsearch",
50
+ "db.operation": "search",
51
"db.elasticsearch.path_parts.index": "logs-*",
52
}
53
+ # Assert expected atttributes are here, but allow other attributes too
54
+ # to make this test robust to elastic-transport changes
55
+ assert expected_attributes.items() <= spans[0].attributes.items()
0 commit comments