# Transaction Name and Type

**URL:** <https://discuss.elastic.co/t/transaction-name-and-type/175293>\
**Category:** APM\
**Created:** [April 4, 2019, 12:40am UTC](https://discuss.elastic.co/t/transaction-name-and-type/175293 "2019-04-04T00:40:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dvisz-inf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dvisz-inf/32/42617_2.png) [@dvisz-inf](https://discuss.elastic.co/u/dvisz-inf)\
**Post date:** [April 4, 2019, 12:40am UTC](https://discuss.elastic.co/t/transaction-name-and-type/175293/1 "2019-04-04T00:40:50Z")

</div>

Hi all,

I'm implementing custom module instrumentation for `grpc-node` (specifically the `grpc` npm package) and I'm seeking advice on what the first two arguments to the `startTransaction` method of `Agent` are supposed to be.

The documentation I've read so far doesn't seem to mention this.

Thanks!

---

<div class="post-metadata">

**Author:** ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)\
**Post date:** [April 4, 2019, 2:57pm UTC](https://discuss.elastic.co/t/transaction-name-and-type/175293/2 "2019-04-04T14:57:34Z")

</div>

Hi @dvisz-inf, thanks for taking this on! For grpc requests, the arguments to `startTransaction` should be:

name: the name of the rpc, eg `/helloworld.Greeter/SayHello`  
type: `request`

You might also [set the framework](https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html#apm-set-framework) name to `grpc` and version to the grpc version (eg `1.19.1`)

Thanks again!

---

<div class="post-metadata">

**Author:** ![dvisz-inf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dvisz-inf/32/42617_2.png) [@dvisz-inf](https://discuss.elastic.co/u/dvisz-inf)\
**Post date:** [April 4, 2019, 10:15pm UTC](https://discuss.elastic.co/t/transaction-name-and-type/175293/3 "2019-04-04T22:15:42Z")

</div>

Thanks 🙂 This is what I'll use!

---

<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:** [May 2, 2019, 10:15pm UTC](https://discuss.elastic.co/t/transaction-name-and-type/175293/4 "2019-05-02T22:15:47Z")

</div>

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