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

[WIP] Add support for AsyncElasticsearch #1007

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

graipher
Copy link

@graipher graipher commented Mar 17, 2022

Description

The current elasticsearch instrumentation does not support version 8.x (see #620), which this PR does not fix, but it also does not support the async capabilities introduced in elasticsearch-python version 7.8.0 (https://elasticsearch-py.readthedocs.io/en/7.x/async.html#using-asyncio-with-elasticsearch). This PR aims to fix the latter, until a solution for the former is implemented.

This adds a wrapping of the AsyncTransport in addition to the already existing wrapping of Transport.

Progress:

  • Wrap AsyncTransport
  • Extract common parts
  • Ensure it only runs if AsyncTransport is actually available (elasticsearch>=7.8.0)
  • Add tests

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update (probably?)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Original tests pass
  • Manually checked that traces are delivered with elasticsearch==7.17.1 both with sync and async clients
  • Automatic tests for older versions of elasticsearch
  • Automatic tests for newer versions of elasticsearch

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@graipher graipher requested a review from a team March 17, 2022 12:50
@graipher graipher marked this pull request as draft March 17, 2022 13:30
@osherv
Copy link
Member

osherv commented Apr 24, 2022

Hey @graipher is this issue still in develop?

@xrmx
Copy link
Contributor

xrmx commented Jul 11, 2024

I think we can close this since native OTel support has been added in the elasticsearch client library itself and we gained sync support up to 8.

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.

3 participants