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

Accept endpoint_id and path_params from client #151

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

pquentin
Copy link
Member

@pquentin pquentin commented Feb 22, 2024

Relates elastic/elasticsearch-py#2435

This pull request changes perform_request to optionally accept endpoint_id and path_parts from the Elasticsearch client. Coupled with elastic/elasticsearch-py#2457, this fixes the span name:

image

and adds path parts attributes (Elastic APM replaces dots with underscores):

image

I also added support for AsyncTransport:

image

It was convenient because the elasticsearch-py changes also apply to the async API, but I can open a separate pull request to bring OTel support to AsyncTransport first if you prefer.

I have done all my testing manually but I do plan to add an integration test in the future.

Copy link
Member

@xrmx xrmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments to async applies to sync transport too

elastic_transport/_async_transport.py Outdated Show resolved Hide resolved
elastic_transport/_async_transport.py Show resolved Hide resolved
@pquentin pquentin requested a review from xrmx February 23, 2024 09:17
@pquentin pquentin merged commit ce82b57 into elastic:main Feb 23, 2024
10 checks passed
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.

None yet

3 participants