Provide debug options in Java SDK Client to monitor the outgoing external calls for OCI resources
还没有人认领这个 Issue。
评估
调研方向
从 bmc-common/src/main/java/com/oracle/bmc/http/internal/ClientCall.java 开始,重点查看 callSync 及其现有的 logger 使用方式。跟踪传出的 OCI 资源调用如何到达此类,以及日志级别如何配置。完成的标准是:启用适当的日志级别后,这些调用能够提供 HTTP URL 和方法的调试消息。
由索引模型根据 Issue 内容生成。
描述
We need the ability to monitor the outgoing external calls for OCI resources such as OCI streams, Object storage, and secrets etc. I'm creating this issue as an enhancement request to add debug messages containing HTTP URL and method for the external calls. These debug messages can be enabled by changing the log level.
As an experiment, I modified the com.oracle.bmc.http.internal.ClientCall class in "bmc-common" module, and added a debug/print message in the callSync method to print the URI and method of the httpRequest. This was helpful to see the external calls. Following is the file and the "callSync"call method that I modified. Thanks.
File modified - https://bitbucket.oci.oraclecorp.com/projects/SDK/repos/java-sdk/browse/bmc-common/src/main/java/com/oracle/bmc/http/internal/ClientCall.java
Modified "callSync" method -
public RESP callSync() {
waiterScheduler = WaiterScheduler.SYNC;
SyncFutureWaiter futureWaiter = new SyncFutureWaiter();
offloadExecutor = futureWaiter;
httpRequest = httpRequest.offloadExecutor(offloadExecutor);
logger.debug("DEBUG>> httpRequest is " + httpRequest);
try {
if (httpRequest != null && httpRequest.uri() != null)
{ logger.debug("DEBUG>> URL is " + httpRequest.uri().toString()); }
if (httpRequest != null && httpRequest.method() != null)
{ logger.debug("DEBUG>> Request method is " + httpRequest.method().toString()); }
return futureWaiter.listenForResult(callAsync0(null));
} catch (BmcException e)
{ throw e; }
catch (Throwable e)
{ throw BmcException.createClientSide("Unknown error", e, null, buildServiceDetails()); }
}
}
- 主要语言
- Java
- 星标
- 243
- 派生
- 171
- 平均合并
- 5 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
oracle/oci-java-sdk 的其他 Issue
-
NoSuchMethodError in the circuit breaker since 3.103.0 when resilience4j 2.x is on the classpath未关闭
难度 2/5 1-3 小时 新手友好度 76/100
oracle/oci-java-sdk#803 ·
-
SDK
难度 1/5 1 小时以内 新手友好度 20/100
oracle/oci-java-sdk#788 ·
-
Identity Domains
难度 4/5 3-5 天 新手友好度 25/100
oracle/oci-java-sdk#764 · 3 条评论 ·
-
SDK
难度 3/5 1-2 天 新手友好度 48/100
oracle/oci-java-sdk#726 · 1 条评论 ·
-
Object Storage
难度 4/5 3-5 天 新手友好度 25/100
oracle/oci-java-sdk#723 · 1 个 reaction ·
查看 oracle/oci-java-sdk 的全部 Issue
相似的 Issue
-
enhancement infra
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
5.0.x backport bug
难度 1/5 1 小时以内 新手友好度 68/100
spring-cloud/spring-cloud-function#1569 ·
维护者通常 1 天内回复
-
Move the spring-cloud-commons version and BOM import from the bus parent to the stream parent可能已有人在做 @olegz 今天认领。 未关闭task
难度 2/5 1-3 小时 新手友好度 74/100
spring-cloud/spring-cloud-stream#3355 ·
维护者通常 1 天内回复
-
area:cpan-port area:performance bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#2230 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100