elastic / elasticsearch-js

Official Elasticsearch client library for Node.js
https://ela.st/js-client
Apache License 2.0
5.24k stars 727 forks source link

[Documentation] Document where the deserialization is not emitted #2345

Open dej611 opened 1 month ago

dej611 commented 1 month ago

Question

In the current observability documentation at https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html within the deserialization event the following quote is present:

(This event might not be emitted in certain situations).

It would be useful to know when such event is not emitted. Use case: we're trying to instrument Kibana to know how much time is spent on the server side (included the detail about deserialization of the response) and it needs to know when to fallback.

JoshMock commented 1 month ago

As far as I can tell, the cases where it doesn't emit that event are basically any case where the request dies before a response comes back. A thrown error, a timeout, etc. I'll go through the code more carefully and do my best to clarify in the docs.