Use parent Call.Factory of OkHttpClient to be able to use OpenTelemetry - #1590
Closed
Cees Bos (cbos) wants to merge 1 commit into
Closed
Use parent Call.Factory of OkHttpClient to be able to use OpenTelemetry#1590Cees Bos (cbos) wants to merge 1 commit into
Cees Bos (cbos) wants to merge 1 commit into
Conversation
…ry (dependent on change in msgraph-sdk-java-core)
Vincent Biret (baywet)
requested changes
Oct 25, 2023
Vincent Biret (baywet)
left a comment
Member
There was a problem hiding this comment.
Considering the remarks I've made in the core pull request, I don't think we need this pull request anymore.
Author
Correct, with the requested change this PR is no needed anymore. As mentioned on the PR, with these change OpenTelemetry can be used with MSGraph SDK to get traces for the requests done with MSGraph SDK library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See microsoftgraph/msgraph-sdk-java-core#1252
This change depends on that change.
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.