# How to monitor ICE framework?

**URL:** <https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284>\
**Category:** APM\
**Tags:** java\
**Created:** [July 8, 2019, 5:33am UTC](https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284 "2019-07-08T05:33:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyhong](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hyhong](https://discuss.elastic.co/u/hyhong)\
**Post date:** [July 8, 2019, 5:33am UTC](https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284/1 "2019-07-08T05:33:44Z")

</div>

**Kibana version** :6.5.1

**Elasticsearch version** :6.5.1

**APM Server version** :6.5.1

**APM Agent language and version** :java 1.7

I want to monitor a method that invoke another service

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [July 8, 2019, 6:27am UTC](https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284/2 "2019-07-08T06:27:50Z")

</div>

I don't know this framework, so just throwing suggestions:

For tracing your methods, use the [public API](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html).

For tracing library methods, use the [`trace_methods`](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-trace-methods) configuration, but please try to be very specific and explicit in what you want to trace with it.

In order to utilize [Elastic APM's Distributed Tracing](https://www.elastic.co/guide/en/apm/get-started/current/distributed-tracing.html) capabilities, you would have to add a trace context on the client side and read it at the server side. You will need to find interceptors for both client and server, and assuming you can add arbitrary context to requests as metadata, you need to set the trace context at the client interceptor through [`injectTraceHeaders`](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-transaction-inject-trace-headers) and extract it at the server interceptor through [`startTransactionWithRemoteParent`](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-start-transaction-with-remote-parent-header).

I hope this helps,  
Eyal.

---

<div class="post-metadata">

**Author:** ![hyhong](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hyhong](https://discuss.elastic.co/u/hyhong)\
**Post date:** [July 8, 2019, 6:29am UTC](https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284/3 "2019-07-08T06:29:35Z")

</div>

Ok，Thanks.

---

<div class="post-metadata">

**Author:** ![hyhong](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hyhong](https://discuss.elastic.co/u/hyhong)\
**Post date:** [July 9, 2019, 2:30am UTC](https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284/4 "2019-07-09T02:30:53Z")

</div>

Hi,I have a question.I don't understand '-\>' opentration in the 'span.injectTraceHeaders((name, value) -\> request.addHeader(name, value));' and I don't know need what value.

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [July 9, 2019, 5:39am UTC](https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284/5 "2019-07-09T05:39:48Z")

</div>

Please don't use multiple topics for the same question, this is causing a non-required overhead.  
Answered in [the other topic](https://discuss.elastic.co/t/how-to-use-injecttraceheaders/189451).

---

<div class="post-metadata">

**Author:** ![hyhong](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@hyhong](https://discuss.elastic.co/u/hyhong)\
**Post date:** [July 9, 2019, 5:40am UTC](https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284/6 "2019-07-09T05:40:52Z")

</div>

Ok,thank you for answer.

---

<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:** [July 30, 2019, 1:41am UTC](https://discuss.elastic.co/t/how-to-monitor-ice-framework/189284/7 "2019-07-30T01:41:01Z")

</div>

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