Skip to content

feat: graphql responseHook support#508

Merged
obecny merged 20 commits intoopen-telemetry:mainfrom
helios:main
Jun 8, 2021
Merged

feat: graphql responseHook support#508
obecny merged 20 commits intoopen-telemetry:mainfrom
helios:main

Conversation

@nozik
Copy link
Contributor

@nozik nozik commented May 31, 2021

Which problem is this PR solving?

  • Add the ability to collect the response to a graphql query (as an optional configuration). This data can be used for monitoring purposes.

Short description of the changes

  • add responseHook config to GraphQLInstrumentationConfig
  • When provided, safely use it to collect the data from the execution result

@nozik nozik requested a review from a team May 31, 2021 07:15
@codecov
Copy link

codecov bot commented May 31, 2021

Codecov Report

Merging #508 (a3ce07b) into main (4a0dab7) will increase coverage by 0.02%.
The diff coverage is 98.27%.

@@            Coverage Diff             @@
##             main     #508      +/-   ##
==========================================
+ Coverage   94.81%   94.84%   +0.02%     
==========================================
  Files         152      152              
  Lines        9169     9226      +57     
  Branches      909      918       +9     
==========================================
+ Hits         8694     8750      +56     
- Misses        475      476       +1     
Impacted Files Coverage Δ
...opentelemetry-instrumentation-graphql/src/types.ts 100.00% <ø> (ø)
...try-instrumentation-graphql/src/instrumentation.ts 92.72% <95.65%> (+0.41%) ⬆️
...metry-instrumentation-graphql/test/graphql.test.ts 100.00% <100.00%> (ø)

@vmarchaud vmarchaud requested review from a team and obecny June 1, 2021 20:30
Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thx for changes

@obecny obecny merged commit c7df125 into open-telemetry:main Jun 8, 2021
@dyladan dyladan added the enhancement New feature or request label Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants