官术网_书友最值得收藏!

Standard response headers

All services should return the following headers.

  • Date: The date that the request was processed in RFC 3339 format.
  • Content-Type: The content type of the response.
  • Content-Encoding: gzip or deflate.
  • X-Request-ID/X-Correlation-ID: Whilst you may not directly request your clients to implement this header it may be something that you add to requests when you call downstream services. When you are trying to debug a service that is running in production it can be incredibly useful to be able to group all the requests by a single transaction ID. A common practice that we will see when we look at logging and monitoring is to store all logs in a common database such as Elastic Search. By setting the standard way of working when building many connected microservices that they pass the correlation ID with each downstream call you will be able to query your logs in Kibana or another log query tool and group them into a single transaction:
        X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde 
主站蜘蛛池模板: 防城港市| 西华县| 正宁县| 武宁县| 永定县| 昌江| 咸丰县| 嫩江县| 鄂托克旗| 东城区| 丹巴县| 兰坪| 天长市| 白水县| 新泰市| 南木林县| 沛县| 开江县| 大厂| 漠河县| 五华县| 东乡族自治县| 南溪县| 澄城县| 鹤庆县| 伽师县| 高邑县| 桑植县| 昭通市| 石景山区| 博湖县| 炉霍县| 崇州市| 乐昌市| 云安县| 张家界市| 盘山县| 铜川市| 都昌县| 苗栗县| 社旗县|