# Any plans to support java logback transport to es in java apm agent

**URL:** <https://discuss.elastic.co/t/any-plans-to-support-java-logback-transport-to-es-in-java-apm-agent/163682>\
**Category:** APM\
**Created:** [January 10, 2019, 9:07am UTC](https://discuss.elastic.co/t/any-plans-to-support-java-logback-transport-to-es-in-java-apm-agent/163682 "2019-01-10T09:07:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiao](https://avatars.discourse-cdn.com/v4/letter/x/2acd7d/32.png) [@xiao](https://discuss.elastic.co/u/xiao)\
**Post date:** [January 10, 2019, 9:07am UTC](https://discuss.elastic.co/t/any-plans-to-support-java-logback-transport-to-es-in-java-apm-agent/163682/1 "2019-01-10T09:07:09Z")

</div>

the java apm agent can support logback ,so we hope to see log in kibana

Now we use our own agent to put into es

azuze Application Insights now can support this

thanks

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 10, 2019, 11:00am UTC](https://discuss.elastic.co/t/any-plans-to-support-java-logback-transport-to-es-in-java-apm-agent/163682/2 "2019-01-10T11:00:19Z")

</div>

Hi and thanks for your question!

The agent does not support sending the logs directly to Elasticsearch and we don't have immediate plans to do so.

What is supported is that the agent attaches the trace ids to the logs, so that you can correlate logs with traces.

Best practice is to log to a file and use Filebeat to send the logs to Logstash or an Elasticsearch ingest pipeline. You can either log as JSON (see [this example setup](https://github.com/xeraa/microservice-monitoring/blob/master/java/frontend/src/main/resources/logback-spring.xml)), which makes parsing the logs easier or log in plain text and process the logs via a grok or dissect filter in Logstash or in an ingest pipeline.

One of the challenges in a design where the agent directly sends logs to Elasticsearch is how to accommodate for temporary network outages and how to handle the case when Elasticsearch is responding slowly because it is under heavy load. When logging to a file, you can just continue shipping the logs when the network is available again. But when directly sending logs from your application to Elasticsearch, you either have to buffer all logs in memory, which can lead to OutOfMemoryErrors, or you have to drop logs. Neither of those seems like a good idea.

---

<div class="post-metadata">

**Author:** ![xiao](https://avatars.discourse-cdn.com/v4/letter/x/2acd7d/32.png) [@xiao](https://discuss.elastic.co/u/xiao)\
**Post date:** [January 10, 2019, 11:27am UTC](https://discuss.elastic.co/t/any-plans-to-support-java-logback-transport-to-es-in-java-apm-agent/163682/3 "2019-01-10T11:27:58Z")

</div>

log is a part of apm  
we hope only one agent collect our logging,metrics,trace  
Is it possible elastic apm agent provide the logging plugin  
In most cases, the log is allowed to be lost.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 31, 2019, 7:28am UTC](https://discuss.elastic.co/t/any-plans-to-support-java-logback-transport-to-es-in-java-apm-agent/163682/4 "2019-01-31T07:28:06Z")

</div>

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