Skip to content

Add minimal OpenTelemetry instrumentation#150

Merged
pquentin merged 3 commits intoelastic:mainfrom
pquentin:otel
Feb 21, 2024
Merged

Add minimal OpenTelemetry instrumentation#150
pquentin merged 3 commits intoelastic:mainfrom
pquentin:otel

Conversation

@pquentin
Copy link
Copy Markdown
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 estolfo and ezimuel February 20, 2024 11:13
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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