apm-agent-go
apm-agent-go copied to clipboard
opentracing logKV only logs values on error
The APM agent ships with an adapter for opentracing. Opentracing supports a Span.LogKV
operation that is similar to a multi-SetTag
.
And indeed, that is how it being used in at least one project, thanos.
However, it appears that the APM agent is only using this mechanism for logging error messages:
https://github.com/elastic/apm-agent-go/blob/2aef45b9cf4b326b84bdee36c844efd3622d6b00/module/apmot/log.go#L85-L88
It would be great if custom, non-standard key-value entries were stored by the agent.
Thanks for opening the issue! I agree, this would be nice to have.
Right now the protocol between agents and server does not support sending arbitrary logs, which is why things are the way they are. We are looking into extending the protocol (https://github.com/elastic/apm-server/issues/3723); if/when that happens, then I think it would make sense to come back and add full support for LogKV.