opensearch-project / opensearch-py

Python Client for OpenSearch
https://opensearch.org/docs/latest/clients/python/
Apache License 2.0
350 stars 174 forks source link

[FEATURE] Add OpenTelemetry support #818

Open dacevedo12 opened 1 month ago

dacevedo12 commented 1 month ago

Is your feature request related to a problem?

Currently there is no OpenTelemetry instrumentation for the OpenSearch python client.

A good telemetry setup can aid developers to better monitor and diagnose issues with the requests being performed from their apps against an OpenSearch instance.

What solution would you like?

Something similar to https://github.com/elastic/elasticsearch-py/issues/2435

What alternatives have you considered?

There was a proposal to handle this by the community via monkeypatching https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1131 but has not gained any traction.

Official support has the advantage of having the telemetry instrumentation evolve with the code of the client itself.

juansedo commented 1 month ago

Also, semantic conventions can look like Elasticsearch for third party support.

dblock commented 1 month ago

Would love this! Does anyone care to contribute?

We can go the elastic route, but as always please make sure not to be copying/looking at any non-APLv2 compatible code.