Hi Feilix:
Thanks for you help.
I fixed a bug in my java application,and this time I send two HTTP requests ,I can see all two results in Kibana.
these five request path name are as follows:
/SpringBootTest-0.0.1-SNAPSHOT/A
/SpringBootTest-0.0.1-SNAPSHOT/B
These HTTP sending time are between 17:10:16 and 17:10:18,then I get the apm-agent log info and the apm-server log info during this time period as follows:
The agent log:
2018-08-23 17:10:16.432 [http-nio-8080-exec-8] DEBUG co.elastic.apm.impl.ElasticApmTracer - startTransaction '' 32b249d2db6068402c59870a4da81260 {
2018-08-23 17:10:16.444 [http-nio-8080-exec-8] DEBUG co.elastic.apm.impl.ElasticApmTracer - } endTransaction 'ResourceHttpRequestHandler' 32b249d2db6068402c59870a4da81260
2018-08-23 17:10:17.335 [apm-reporter] DEBUG co.elastic.apm.report.ApmServerHttpPayloadSender - Sending payload with 1 elements to APM server http://localhost:8200
2018-08-23 17:10:17.338 [apm-reporter] DEBUG co.elastic.apm.report.ApmServerHttpPayloadSender - APM server responded with status code 202
2018-08-23 17:10:17.954 [http-nio-8080-exec-9] DEBUG co.elastic.apm.impl.ElasticApmTracer - startTransaction '' be100ea783c4a65066f6ea2f289d455d {
2018-08-23 17:10:17.958 [http-nio-8080-exec-9] DEBUG co.elastic.apm.impl.ElasticApmTracer - } endTransaction 'ResourceHttpRequestHandler' be100ea783c4a65066f6ea2f289d455d
2018-08-23 17:10:18.335 [apm-reporter] DEBUG co.elastic.apm.report.ApmServerHttpPayloadSender - Sending payload with 1 elements to APM server http://localhost:8200
2018-08-23 17:10:18.338 [apm-reporter] DEBUG co.elastic.apm.report.ApmServerHttpPayloadSender - APM server responded with status code 202
The apm-server log is OK,I got one ack from apm-server as follows:
2018-08-23T17:10:18.337+0800 INFO [request] beater/handlers.go:239 handled request {"request_id": "4ad40176-03ee-422a-88df-b60fa297a74b", "method": "POST", "URL": "/v1/transactions", "content_length": -1, "remote_address": "127.0.0.1", "user-agent": "apm-agent-java unknown", "response_code": 202}
2018-08-23T17:10:18.337+0800 DEBUG [transaction] transaction/payload.go:63 Transform transaction events: events=1, service=springboot-properties-service, agent=java:unknown
2018-08-23T17:10:18.338+0800 DEBUG [publish] pipeline/processor.go:291 Publish event: {
"@timestamp": "2018-08-23T09:10:17.953Z",
"@metadata": {
"beat": "apm-server",
"type": "doc",
"version": "6.3.0"
},
"processor": {
"name": "transaction",
"event": "transaction"
},
"transaction": {
"sampled": true,
"id": "be100ea7-83c4-a650-66f6-ea2f289d455d",
"name": "ResourceHttpRequestHandler",
"duration": {
"us": 4519
},
"type": "request",
"result": "HTTP 3xx"
},
"context": {
"request": {
"method": "GET",
"headers": {
"host": "192.168.50.6:8080",
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"accept-language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2",
"referer": "http://192.168.50.6:8080/SpringBootTest-0.0.1-SNAPSHOT/A",
"connection": "keep-alive",
"if-modified-since": "Thu, 23 Aug 2018 08:53:58 GMT",
"user-agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0",
"accept-encoding": "gzip, deflate",
"upgrade-insecure-requests": "1"
},
"cookies": {
"grafana_user": "admin",
"grafana_remember": "29b3204c956ed9a66d15e816e25ec5bcdbe17963e3b1b20466692b1e2a709c5664"
},
"url": {
"full": "http://192.168.50.6:8080/SpringBootTest-0.0.1-SNAPSHOT/B",
"hostname": "192.168.50.6",
"port": "8080",
"pathname": "/SpringBootTest-0.0.1-SNAPSHOT/B",
"protocol": "http"
},
"socket": {
"remote_address": "192.168.50.8",
"encrypted": false
},
"http_version": "1.1"
},
"response": {
"headers": {
"Last-Modified": "Thu, 23 Aug 2018 08:53:58 GMT",
"Date": "Thu, 23 Aug 2018 09:10:17 GMT"
},
"finished": true,
"headers_sent": true,
"status_code": 304
},
"service": {
"name": "springboot-properties-service",
"agent": {
"name": "java",
"version": "unknown"
},
"language": {
"name": "Java",
"version": "1.8.0_161"
},
"runtime": {
"version": "1.8.0_161",
"name": "Java"
}
},
"process": {
"pid": 19597,
"title": "/usr/lib/jvm/java-8-oracle/jre/bin/java"
},
"system": {
"hostname": "Linux",
"architecture": "amd64",
"platform": "anextserver",
"ip": "127.0.0.1"
}
},
"host": {
"name": "anextserver"
},
"beat": {
"name": "anextserver",
"hostname": "anextserver",
"version": "6.3.0"
}
}
2018-08-23T17:10:18.415+0800 DEBUG [elasticsearch] elasticsearch/client.go:303 PublishEvents: 2 events have been published to elasticsearch in 76.683448ms.
2018-08-23T17:10:18.415+0800 DEBUG [memqueue] memqueue/ackloop.go:143 ackloop: receive ack [47: 0, 2]
2018-08-23T17:10:18.415+0800 DEBUG [memqueue] memqueue/eventloop.go:518 broker ACK events: count=2, start-seq=57, end-seq=58
I still has one question:
Why is there still two record with status code of 202 in the agent log file? No other requests during this time period
Best wishes!