Skip to content

docs: research report and migration roadmap for replacing olivere/elastic#8205

Draft
Amaan729 wants to merge 1 commit intojaegertracing:mainfrom
Amaan729:feat/replace-olivere-elastic-research
Draft

docs: research report and migration roadmap for replacing olivere/elastic#8205
Amaan729 wants to merge 1 commit intojaegertracing:mainfrom
Amaan729:feat/replace-olivere-elastic-research

Conversation

@Amaan729
Copy link

Related to #7612

Summary

This PR adds a research document and migration roadmap for replacing the deprecated olivere/elastic Go library with a modern, maintained client.

Document: docs/elasticsearch-client-migration.md

The doc covers:

1. Background — why olivere/elastic is blocking and must be replaced, and how the existing shim at internal/storage/elasticsearch/client/interfaces.go isolates the blast radius.

2. Candidate clients — detailed comparison of:

  • elastic/go-elasticsearch v8 (official Elastic client)
  • opensearch-project/opensearch-go v2 (official OpenSearch client)

3. Method mapping table — every method in IndexAPI, ClusterAPI, and IndexManagementLifecycleAPI mapped to its equivalent in both candidate clients.

Key finding: All IndexAPI and ClusterAPI methods have direct equivalents in both clients. The only non-trivial gap is IndexManagementLifecycleAPI: Elasticsearch uses ILM while OpenSearch uses ISM, which have different API shapes and need separate shim implementations.

4. Recommended phased migration

  • Phase 1: dual-client shim (es/ and os/ sub-packages, factory selects at runtime)
  • Phase 2: ILM vs ISM split
  • Phase 3: drop olivere/elastic from go.mod

5. Proof-of-concept — a working Go implementation of ClusterAPI.Version() using go-elasticsearch v8 to validate the approach. Not wired into the build yet.

6. Open questions — ES 7 vs 8 support, auth/TLS plumbing, bulk-indexer API differences.

What this PR does NOT do

This is intentionally a research/planning PR per the issue guidance. Implementation will follow in separate issues/PRs once the approach is confirmed by maintainers.

Checklist

  • Examined internal/storage/elasticsearch/client/interfaces.go
  • Researched both candidate clients
  • Mapped all shim methods to new client APIs
  • Proposed phased migration plan
  • Provided a proof-of-concept implementation for one method
  • Documented open questions for maintainer input

Adds a migration roadmap documenting:
- Candidate modern clients (elastic/go-elasticsearch, opensearch-go)
- Method-by-method mapping against the shim interfaces
- Recommended phased migration plan
- Proof-of-concept implementation of ClusterAPI.Version()

Closes jaegertracing#7612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant