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

Okhttp autoinstrumentation stabilization #159

Merged

Conversation

LikeTheSalad
Copy link
Contributor

@LikeTheSalad LikeTheSalad commented Nov 22, 2023

The OkHttp auto-instrumentation tool had an issue where it would create spans for OkHttp requests created by OTel's exporters, causing an infinite amount of spans to be created since each export would mean a new OkHttp call. Said issue was addressed as part of these PRs:

This PR does the following:

  • Adds tests to validate that the infinite spans issue is solved.
  • Adds proguard rules to avoid issues with a reflection call needed to identify OTel's okhttp requests, more info here.
  • Fixes an initialization racing issue where the global OpenTelemetry instance was being set statically here when creating an OtlpHttpSpanExporter instance which ends up creating a new OkHttpClient instance before users could create and set their own GlobalOpenTelemetry instance.

@LikeTheSalad LikeTheSalad requested a review from a team November 22, 2023 13:58
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 cool, and it's nice to see it come together because there were several moving parts across repos. 🥂

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.

Nice! Thanks thanks.

@LikeTheSalad LikeTheSalad merged commit 351cb3f into open-telemetry:main Dec 11, 2023
2 checks passed
@LikeTheSalad LikeTheSalad deleted the okhttp-autoinstrumentation branch December 11, 2023 07:17
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.

2 participants