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

Adding okhttp autoinstrumentation #64

Merged

Conversation

LikeTheSalad
Copy link
Contributor

@LikeTheSalad LikeTheSalad commented Sep 3, 2023

This PR is the first one to add support for automatic instrumentations of okhttp on Android. I'm planning to create a follow-up PR to address the outstanding items mentioned below to avoid making this PR too big.

Changes provided in this PR

  • Full instrumentation of simple okhttp requests (without callbacks).
  • Setting up the automatic instrumentation subproject's layout and artifactId convention.
  • Setting up conventions for android tests in automatic instrumentations.

Outstanding items

  • Adding support for "okhttp callback" use case for context propagation, similarly to what's done here.
  • Ignore HTTP requests created by OTel's exporters that use okhttp.

…http-instrumentation

# Conflicts:
#	auto-instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/library/okhttp/v3_0/internal/OkHttp3Singletons.java
#	gradle.properties
@LikeTheSalad LikeTheSalad marked this pull request as ready for review September 18, 2023 16:01
@LikeTheSalad LikeTheSalad requested a review from a team September 18, 2023 16:01
Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

This is a great start toward low-effort build-time instrumentation! Loving it. Had a few suggestions.

LikeTheSalad and others added 10 commits September 22, 2023 17:46
…o/opentelemetry/instrumentation/library/okhttp/v3_0/OkHttpInstrumentationConfig.java

Co-authored-by: jason plumb <[email protected]>
…o/opentelemetry/instrumentation/library/okhttp/v3_0/OkHttpInstrumentationConfig.java

Co-authored-by: jason plumb <[email protected]>
…o/opentelemetry/instrumentation/library/okhttp/v3_0/OkHttpInstrumentationConfig.java

Co-authored-by: jason plumb <[email protected]>
…o/opentelemetry/instrumentation/library/okhttp/v3_0/OkHttpInstrumentationConfig.java

Co-authored-by: jason plumb <[email protected]>
@breedx-splk breedx-splk merged commit 80c0c90 into open-telemetry:main Sep 25, 2023
2 checks passed
@LikeTheSalad LikeTheSalad deleted the adding-okhttp-autoinstrumentation branch September 26, 2023 12:28
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