feat(elasticsearch): Add Elasticsearch integration#1
Open
Conversation
Add a new integration for the `elasticsearch` Python client that instruments search, index, delete, and update operations with spans and breadcrumbs. Supports both elasticsearch 7.x and 8.x/9.x APIs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 32 passed | Total: 32 | Pass Rate: 100% | Execution Time: 260ms 📊 Comparison with Base Branch
All tests are passing successfully. ❌ Patch coverage is 7.19%. Project has 15042 uncovered lines. Files with missing lines (182)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 23.67% 24.67% +1%
==========================================
Files 189 190 +1
Lines 19705 19969 +264
Branches 6420 6476 +56
==========================================
+ Hits 4664 4927 +263
- Misses 15041 15042 +1
- Partials 420 420 —Generated by Codecov Action |
`start_span()` without `__enter__()` never sets `scope.span = self`, so the span is not pushed onto the scope's span stack. This means child spans won't be parented correctly and the span won't be properly nested in the trace tree. Use `with start_span(...) as span:` to properly manage the span lifecycle, matching the pattern used by other integrations like socket, boto3, and pymongo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ction_info The function duck-types both v7 and v8/v9 approaches via try/except, so the major_version parameter was never referenced. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ElasticsearchIntegrationfor theelasticsearchPython client libraryTest plan
elasticsearchtest suite intest-integrations-dbs.ymlelasticsearchpackage is installed🤖 Generated with Claude Code