-
Notifications
You must be signed in to change notification settings - Fork 29
Use parent Call.Factory of OkHttpClient to be able to use OpenTelemetry #1252
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
Conversation
|
@microsoft-github-policy-service agree |
baywet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. Can you also add an entry to the changelog?
Lastly you want to check https://github.com/microsoft/kiota and https://github.com/microsoft/kiota-java which is the new stack the next version of the Java SDK is going to rely on.
baywet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes, would you mind adding an entry to the changelog as well please?
I have had a look at https://github.com/microsoft/kiota-java. |
Yes, did that as well (but got distracted at home in the mean time), just pushed that change. I just the changed code already locally and that works fine, I got traces with OpenTelemetry for the calls send with msgraph sdk library. |
baywet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes! And for the contribution!
@ramsessanchez for version bump and release.
|
It looks like there are some issues with Sonar code scanning integration for building this PR. |
|
@cbos this is because the PR is coming from a fork and the policy doesn't allow access to secrets in that context for security reasons. we'll have to override the check to merge this when @ramsessanchez has has time to review it. You can disregard it. |
|
Looks good! @baywet , Bump to version 2.0.21? |
|
@ramsessanchez yes the next patch is fine |
|
@cbos would you be willing to submit a similar pull request to kiota-java (the infrastructure for the next version of the SDK we've been working on) |
@baywat This PR is not merged yet, any idea when that will happen? |
40a1482 to
69294af
Compare
baywet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cbos sorry for the delay, @ramsessanchez has been busy with the last few items on the next version of the SDK, I'll try to expedite this
For application insights it is good to be able to get insights in all incoming and outgoing requests.
OpenTelemetry is the standard for that.
I tried to use https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/okhttp/okhttp-3.0/library/README.md
This gives an exception at runtime
But there is no actual use of casting it to OkHttpClient, only the methods of Call.Factory are used.
As that is the minimal base required, I changed the code as well that in the generic it requires as least Call.Factory as base.