Wrong endpoint configured for MonitoringClient.postMetricData()

未关闭
#585 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
java
领域
api, cloud

调研方向

从 MonitoringClient.postMetricData() 和 Monitoring service 使用的 endpoint 配置入手;将其与 PostMetricData API 文档以及通过 MonitoringClient.setEndpoint() 设置的可用 endpoint 进行比较。当 postMetricData() 为相关区域使用 telemetry-ingestion endpoint 而不是 telemetry endpoint,并且在 repository 提供相应 coverage 的情况下补充该 coverage 后,issue 即完成。

由索引模型根据 Issue 内容生成。

描述

Monitoring

In the OCI Java SDK (and also in the oci CLI tool), the incorrect endpoint for the Monitoring operation PostMetricData is configured. Therefore, I always get a 404 Not Found error when I call MonitoringClient.postMetricData().

I am using latest OCI Java SDK version com.oracle.oci.sdk:oci-java-sdk-monitoring:3.38.0.

Error returned by PostMetricData operation in Monitoring service.(404, NotAuthorizedOrNotFound, false) Authorization failed or requested resource not found. (opc-request-id: 06418A9859954B53BBCE490EC4CBF06A/30AFF4B43339BA03E6480142EEDEA340/E68006EF501653D8D58A0529E9F18718)
Timestamp: 2024-03-29T20:52:13.602Z
Client version: Oracle-JavaSDK/3.38.0
Request Endpoint: https://telemetry.eu-frankfurt-1.oraclecloud.com/20180401/metrics
Troubleshooting Tips: See https://docs.oracle.com/en-us/iaas/Content/API/References/apierrors.htm#apierrors_404__404_notauthorizedornotfound for more information about resolving this error
Also see https://docs.oracle.com/iaas/api/#/en/monitoring/20180401/MetricData/PostMetricData for details on this operation's requirements.

As described in the PostMetricData API docs, a different endpoint must be used for this specific operation.

Incorrect endpoint: https://telemetry.eu-frankfurt-1.oraclecloud.com
Correct endpoint: https://telemetry-ingestion.eu-frankfurt-1.oraclecloud.com

When I manually override the endpoint using MonitoringClient.setEndpoint(), it works without any issues.

I think the endpoint should be fixed both in the Java SDK and the oci CLI tool.

主要语言
Java
星标
243
派生
171
平均合并
5 分钟
30 天内合并 PR
4

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

oracle/oci-java-sdk 的其他 Issue

查看 oracle/oci-java-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。