Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: graphql responseHook support #508

Merged
merged 20 commits into from Jun 8, 2021
Merged

feat: graphql responseHook support #508

merged 20 commits into from Jun 8, 2021

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 as a code owner 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 obecny and a team 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.

None yet

6 participants