# How to write a grpc agent for grpc applocation?

**URL:** <https://discuss.elastic.co/t/how-to-write-a-grpc-agent-for-grpc-applocation/181501>\
**Category:** APM\
**Created:** [May 17, 2019, 2:18am UTC](https://discuss.elastic.co/t/how-to-write-a-grpc-agent-for-grpc-applocation/181501 "2019-05-17T02:18:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GavinW](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gavinw/32/46354_2.png) [@GavinW](https://discuss.elastic.co/u/GavinW)\
**Post date:** [May 17, 2019, 2:18am UTC](https://discuss.elastic.co/t/how-to-write-a-grpc-agent-for-grpc-applocation/181501/1 "2019-05-17T02:18:36Z")

</div>

**APM Server version** :6.5.4

Hello, I want to deploy agent for my grpc application which write by c++, but I haven't found an agent about grpc in the official agent, so I want to write an agent that can be used in grpc application. Is there any way to help me write this agent? Thank you very much!

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [May 17, 2019, 8:03pm UTC](https://discuss.elastic.co/t/how-to-write-a-grpc-agent-for-grpc-applocation/181501/2 "2019-05-17T20:03:34Z")

</div>

Hi @GavinW, welcome to the forum!

You could take a look at the [Intake API](https://www.elastic.co/guide/en/apm/server/current/intake-api.html), which describes the JSON Schema for the events that an agent sends. Once you have the basic C++ agent implemented, you should implement a gRPC [Interceptor](https://grpc.github.io/grpc/cpp/classgrpc_1_1experimental_1_1_interceptor.html) to start a transaction for each request. If you're familiar with the Go programming language, then you may find [apmgrpc](https://github.com/elastic/apm-agent-go/tree/master/module/apmgrpc) useful as a reference for the interceptor.

If you're familiar with another language which we support, it would probably be useful to use another agent as a reference to get you started; they're all open source and on GitHub. We'll be looking at introducing more documentation later to guide agent development.

---

<div class="post-metadata">

**Author:** ![GavinW](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gavinw/32/46354_2.png) [@GavinW](https://discuss.elastic.co/u/GavinW)\
**Post date:** [May 20, 2019, 7:17am UTC](https://discuss.elastic.co/t/how-to-write-a-grpc-agent-for-grpc-applocation/181501/3 "2019-05-20T07:17:05Z")

</div>

Thank you very much for your advice and support.

---

<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:** [June 10, 2019, 3:17am UTC](https://discuss.elastic.co/t/how-to-write-a-grpc-agent-for-grpc-applocation/181501/4 "2019-06-10T03:17:05Z")

</div>

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