Skip to content

Okhttp autoinstrumentation stabilization#159

Merged
LikeTheSalad merged 11 commits intoopen-telemetry:mainfrom
LikeTheSalad:okhttp-autoinstrumentation
Dec 11, 2023
Merged

Okhttp autoinstrumentation stabilization#159
LikeTheSalad merged 11 commits intoopen-telemetry:mainfrom
LikeTheSalad:okhttp-autoinstrumentation

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
@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