elastic / elastic/apm-agent-nodejs

Support batch requests in graphql module

Open
#1,669 0 comments 0 reactions 0 assignees View on GitHub
agent-nodejs enhancement
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

**Is your feature request related to a problem? Please describe.**

When using _apollo-link-batch-http_ more than 1 query is sent to the server in a single request. This causes a single transaction to contain many spans with different graphQL spans. It would be nice to have an option to at least set the transaction name to something like _batch request_, or even better, allow to split it to separate transactions.

Currently it seems like that the name of the last query is set for the transaction name.

**Describe the solution you'd like**

I would like to have an option to split each query to a separate transaction or to set the name of the transaction to _Batch request_ at least.

**Describe alternatives you've considered**

I managed to set a separate name for the batch requests through some custom handlers, but this should be the default in my opinion.

**Additional context**

![image](https://user-images.githubusercontent.com/10323997/76086648-2c9a7880-5fbd-11ea-9066-862f3d7ee046.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.