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

Simplify logging policy in clientcore #43678

Merged
merged 8 commits into from
Jan 6, 2025

Conversation

lmolkova
Copy link
Member

@lmolkova lmolkova commented Jan 2, 2025

  • Remove HttpRequestLogger and HttpResponseLogger
  • Remove Request-Id - we'll use W3C trace-context instead of custom correlation
  • Add exception handling for stream reading
  • Formalize exception event, capture everything we can on it
  • Capture request as verbose
  • Capture almost everything on response event
  • Add tests

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 15 changed files in this pull request and generated no comments.

Files not reviewed (9)
  • sdk/clientcore/core/checkstyle-suppressions.xml: Language not supported
  • sdk/clientcore/core/spotbugs-exclude.xml: Language not supported
  • sdk/clientcore/core/src/main/java/io/clientcore/core/http/pipeline/HttpRequestLogger.java: Evaluated as low risk
  • sdk/clientcore/core/src/main/java/io/clientcore/core/http/pipeline/HttpResponseLogger.java: Evaluated as low risk
  • sdk/clientcore/core/src/main/java/io/clientcore/core/http/models/HttpLogOptions.java: Evaluated as low risk
  • sdk/clientcore/core/src/samples/java/io/clientcore/core/http/models/RequestOptionsJavaDocCodeSnippets.java: Evaluated as low risk
  • sdk/clientcore/core/src/main/java/io/clientcore/core/http/models/HttpHeaderName.java: Evaluated as low risk
  • sdk/clientcore/core/src/main/java/io/clientcore/core/http/models/RequestOptions.java: Evaluated as low risk
  • sdk/clientcore/core/src/samples/java/io/clientcore/core/models/BinaryDataJavaDocCodeSnippet.java: Evaluated as low risk
Comments suppressed due to low confidence (1)

sdk/clientcore/core/src/main/java/io/clientcore/core/http/pipeline/HttpRetryPolicy.java:139

  • The retry count should be incremented by 1 to reflect the number of attempts made. Change to HttpRequestAccessHelper.setRetryCount(httpRequest, tryCount + 1);
HttpRequestAccessHelper.setRetryCount(httpRequest, tryCount);
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

io.clientcore:core

@lmolkova lmolkova force-pushed the simplify-http-logging branch from 496cc94 to 676ff56 Compare January 6, 2025 23:37
@lmolkova lmolkova merged commit eaf0860 into Azure:main Jan 6, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants