Skip to content

Add minimal OpenTelemetry instrumentation #150

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

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Conversation

pquentin
Copy link
Member

Relates elastic/elasticsearch-py#2435

This pull request introduces minimal OpenTelemetry instrumentation, without:

  • documentation
  • configuration, except to enable it (it is disabled by default)
  • help for the client (to get the endpoint id and path parts)
  • help from the underlying HTTP clients (to get connection details)

However, it contains the basic scaffolding and can be used to send a basic trace containing the method name to Elastic APM:

image

Thanks @estolfo for the help. As you know, I was heavily inspired by the Ruby implementation.

@pquentin pquentin requested review from ezimuel and estolfo February 20, 2024 11:13
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.

OT but you probably shouldn't need mock in extras_require too

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.

Given that I'm mostly clueless about this, the python implementation resembles the ruby one and this will help to move the ball forward it LGTM.

@pquentin pquentin merged commit bf0884d into elastic:main Feb 21, 2024
@estolfo
Copy link

estolfo commented Feb 21, 2024

hey @pquentin I'm late to the party but this LGTM!

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