huangnauh commented on a change in pull request #4131:
URL: https://github.com/apache/apisix/pull/4131#discussion_r619984815
##########
File path: docs/zh/latest/plugins/kafka-logger.md
##########
@@ -62,18 +62,82 @@ title: kafka-logger
- **default**:
```json
-
{"upstream":"127.0.0.1:1980","start_time":1602211788041,"client_ip":"127.0.0.1","service_id":"","route_id":"1","request":{"querystring":{"ab":"cd"},"size":90,"uri":"\/hello?ab=cd","url":"http:\/\/localhost:1984\/hello?ab=cd","headers":{"host":"localhost","content-length":"6","connection":"close"},"body":"abcdef","method":"GET"},"response":{"headers":{"content-type":"text\/plain","server":"APISIX\/1.5","connection":"close","transfer-encoding":"chunked"},"status":200,"size":153},"latency":99.000215530396}
+ [
+ {
+ "client_ip": "127.0.0.1",
+ "latency": 493.99995803833,
+ "request": {
+ "headers": {
+ "accept": "*/*",
+ "host": "httpbin.org",
+ "user-agent": "curl/7.29.0"
+ },
+ "method": "GET",
+ "querystring": {
+ "foo1": "bar1",
+ "foo2": "bar2"
+ },
+ "size": 98,
+ "uri": "/get?foo1=bar1&foo2=bar2",
+ "url": "http://httpbin.org:9080/get? foo1=bar1&foo2=bar2"
+ },
+ "response": {
+ "headers": {
+ "access-control-allow-credentials": "true",
+ "access-control-allow-origin": "*",
+ "connection": "close",
+ "content-length": "370",
+ "content-type": "application/json",
+ "date": "Mon, 26 Apr 2021 02:03:27 GMT",
+ "server": "APISIX/2.5"
+ },
+ "size": 595,
+ "status": 200
+ },
+ "route_id": "5",
+ "server": {
+ "hostname": "localhost.localdomain",
+ "version": "2.5"
+ },
+ "service_id": "",
+ "start_time": 1619402607026,
+ "upstream": "34.199.75.4:80"
+ }
+ ]
```
- **origin**:
```http
- GET /hello?ab=cd HTTP/1.1
- host: localhost
- content-length: 6
- connection: close
-
- abcdef
+ GET /get?foo1=bar1&foo2=bar2 HTTP/1.1
+ User-Agent: curl/7.29.0
+ Accept: */*
+ Host: httpbin.org
+
+ HTTP/1.1 200 OK
+ Content-Type: application/json
+ Content-Length: 370
+ Connection: keep-alive
+ Date: Mon, 26 Apr 2021 02:03:31 GMT
+ Access-Control-Allow-Origin: *
+ Access-Control-Allow-Credentials: true
+ Server: APISIX/2.5
+
+ {
Review comment:
I changed it to the original example.
##########
File path: docs/zh/latest/plugins/kafka-logger.md
##########
@@ -62,18 +62,82 @@ title: kafka-logger
- **default**:
```json
-
{"upstream":"127.0.0.1:1980","start_time":1602211788041,"client_ip":"127.0.0.1","service_id":"","route_id":"1","request":{"querystring":{"ab":"cd"},"size":90,"uri":"\/hello?ab=cd","url":"http:\/\/localhost:1984\/hello?ab=cd","headers":{"host":"localhost","content-length":"6","connection":"close"},"body":"abcdef","method":"GET"},"response":{"headers":{"content-type":"text\/plain","server":"APISIX\/1.5","connection":"close","transfer-encoding":"chunked"},"status":200,"size":153},"latency":99.000215530396}
+ [
+ {
+ "client_ip": "127.0.0.1",
+ "latency": 493.99995803833,
+ "request": {
+ "headers": {
+ "accept": "*/*",
+ "host": "httpbin.org",
+ "user-agent": "curl/7.29.0"
+ },
+ "method": "GET",
+ "querystring": {
+ "foo1": "bar1",
+ "foo2": "bar2"
+ },
+ "size": 98,
+ "uri": "/get?foo1=bar1&foo2=bar2",
+ "url": "http://httpbin.org:9080/get? foo1=bar1&foo2=bar2"
+ },
+ "response": {
+ "headers": {
+ "access-control-allow-credentials": "true",
+ "access-control-allow-origin": "*",
+ "connection": "close",
+ "content-length": "370",
+ "content-type": "application/json",
+ "date": "Mon, 26 Apr 2021 02:03:27 GMT",
+ "server": "APISIX/2.5"
+ },
+ "size": 595,
+ "status": 200
+ },
+ "route_id": "5",
+ "server": {
+ "hostname": "localhost.localdomain",
+ "version": "2.5"
+ },
+ "service_id": "",
+ "start_time": 1619402607026,
+ "upstream": "34.199.75.4:80"
+ }
+ ]
```
- **origin**:
```http
- GET /hello?ab=cd HTTP/1.1
- host: localhost
- content-length: 6
- connection: close
-
- abcdef
+ GET /get?foo1=bar1&foo2=bar2 HTTP/1.1
+ User-Agent: curl/7.29.0
+ Accept: */*
+ Host: httpbin.org
+
+ HTTP/1.1 200 OK
+ Content-Type: application/json
+ Content-Length: 370
+ Connection: keep-alive
+ Date: Mon, 26 Apr 2021 02:03:31 GMT
+ Access-Control-Allow-Origin: *
+ Access-Control-Allow-Credentials: true
+ Server: APISIX/2.5
+
+ {
Review comment:
I changed it to the original example. PTAL
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]