问题标签 [http-trace]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - 如何使用 415 Unknown Media Type 记录 Spring 拒绝的 Content-Type?
我有一个带有 REST 端点的基本 Spring Boot 应用程序,该端点配置为接收带有Content-Type
=的 POST application/json
。
我的外部合作伙伴向我发布了 HTTP 请求,但显然使用了不同的Content-Type
,因为我的应用程序拒绝了那些带有 HTTP 415 Unsupported Media Type 的请求。
不幸的是,Spring 的日志没有透露 Content-Type 到底是什么,并且外部合作伙伴目前无法回答问题。
有没有办法提高 Spring 的日志级别,以便日志还包括接收Content-Type
到的被拒绝的内容?
spring-boot - 如何在执行器prometheus中导入执行器httptrace?(执行器、弹簧靴、grafana)
想象一下这是我的http://localhost:8080/actuator输出:
现在我已经将我的 prometheus 环境连接到/actuator/prometheus
并且工作正常。我还希望 prometheus 读取我的 httptrace,所以我也添加/actuator/httptrace
到我的 prometheus 配置中。但是,这不起作用。httptrace端点上的格式是json,prometheus中的格式是yaml,我想我需要prometheus yaml中的httptrace。Prometheus 吃 yaml 就好了,json 没那么多。
如何将我的 httptrace 从我的 Spring Boot 项目传递给 actuator/prometheus?最后,我的目标是获取 grafana 中每个请求的 timeTaken 值。
websphere - 仅在 Websphere 上排除来自特定 IP 的 404 错误
我在两个 Websphere 实例上部署了一个应用程序。我可以从任何浏览器或 curl/wget 访问这两个实例而不会出现任何问题。但是,当请求通过负载均衡器时,会发生非常奇怪的行为。
日志文件:
- 我在两个实例上都收到了来自两个源 IP 的许多 505 错误。
- 我收到来自特定源 ip 的其中一个实例的主页的 404。可以从浏览器正常访问同一页面。同一台服务器通常为同一源 IP 提供其他 url。只有那个特定的 url 会导致 404。
不幸的是,我无权访问负载均衡器。我尝试通过选择组合日志格式和调试跟踪级别来将 websphere 的日志级别提高到最大值,但仍然没有获得有关错误的更多详细信息。我尝试添加 com.ibm.ws.http.HttpRequest = best ,但仍然无法在日志文件中找到任何请求标头。
如何查看 Websphere 上的请求标头和最大数量的详细信息以了解错误的来源?