Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for non-Elastic *search engines e.g. AWS Opensearch #189

Open
antgel opened this issue Jan 1, 2022 · 3 comments
Open

Support for non-Elastic *search engines e.g. AWS Opensearch #189

antgel opened this issue Jan 1, 2022 · 3 comments

Comments

@antgel
Copy link

antgel commented Jan 1, 2022

Just happily installed rails_semantic_logger in our project, very happy to be using it, thank you! However, we're migrating to AWS OpenSearch rather than Elastic's offering, due to our take on Elastic's approach to Free Software licensing and the community.

I naively added the elasticsearch gem to Gemfile and of course:

E [2308:SemanticLogger::Appender::Elas] SemanticLogger::Appender::Elasticsearch -- Async: Restarting due to exception -- Exception: Elasticsearch::UnsupportedProductError: The client noticed that the server is not Elasticsearch and we do not support this unknown product.

I can pin to 7.13.0 for now as per https://opensearch.org/docs/latest/clients/index/, but it doesn't feel like a long term solution. Will semantic_logger be able to support the opensearch-ruby as an alternative?

@reidmorrison
Copy link
Owner

Will it require a new appender, or can it auto-detect which gem is loaded and use that one automatically? I.e. Is the new opensearch-ruby gem a drop-in replacement?

@reidmorrison
Copy link
Owner

If the API is the same, other than the gem and class name, I can create a proof of concept branch if you want to try it out?

@antgel
Copy link
Author

antgel commented Feb 8, 2022

Thanks for the response. At this time the gem APIs are close if not identical - who knows what will happen over time.

As for "Will it require a new appender, or can it auto-detect which gem is loaded and use that one automatically?", I'm not sure what you mean by "it", but it's pretty clear that Elastic users will continue to use the elasticsearch-ruby gem, and AWS OpenSearch users will use the opensearch-ruby gem (or elasticsearch-ruby pinned to 7.13.0). It is possible at runtime to fingerprint the ES/OS server via an HTTP request, but of course this is too late in the day to decide which gem to install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants