I'm trying to send logs to the APM server and thus can see it in transactions associated logs. I've simply followed the simple doc Built-in instrumentation modules | APM Go Agent Reference [1.x] | Elastic.

Kibana version: 7.13

Elasticsearch version: 7.13

APM Server version: 7.13

APM Agent language and version: module/apmzap

Original install method (e.g. download page, yum, deb, from source, etc.) and version: using go package downloader

Fresh install or upgraded from other version? Fresh

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. No, just a minimal docker-compose-based APM server.

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant): I'm only seeing that logging out is only available in the terminal (stdout). I believe it is supposed to be also available on the APM server, thus not getting it in the server.

This is my simple env config:


Steps to reproduce:

  1. I've used the simple example provided herein the doc:

Provide logs and/or server output (if relevant):
Output is basically to the stdout terminal but not the APM server:

{"level":"info","msg":"handling request","":"328d53d8a1d43dfee988e191d2ea2792","":"328d53d8a1d43dfe"}
{"level":"error","msg":"handling error","":"328d53d8a1d43dfee988e191d2ea2792","":"328d53d8a1d43dfe"

Welcome to the forum @MerNat!

In case it's unclear, apmzap is not intended for sending all logs to APM Server, only error logs. Having said that, you have shown error logs in the output above; that one should be sent to the server.

Can you please provide the agent logs? Above you said you've configured ELASTIC_APM_LOG_FILE=stderr=stdout; it should be just ELASTIC_APM_LOG_FILE=stderr (or =stdout). They may give a clue as to why the error events aren't being sent to the server.

Thank you for your reply and help @axw :slightly_smiling_face:

Actually, I'm getting the error log now after I removed ELASTIC_APM_SERVER_URL=http://localhost:8200.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.