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

feature: Graphql #226

Merged
merged 16 commits into from
Oct 30, 2020
Merged

feature: Graphql #226

merged 16 commits into from
Oct 30, 2020

Conversation

obecny
Copy link
Member

@obecny obecny commented Oct 20, 2020

Which problem is this PR solving?

Short description of the changes

  • It instruments the graphql library
  • Added example of using Apollo Server and Express Graphql - 2 most popular lib.

@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #226 into master will decrease coverage by 0.19%.
The diff coverage is 93.88%.

@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
- Coverage   95.26%   95.06%   -0.20%     
==========================================
  Files         100      110      +10     
  Lines        5028     5879     +851     
  Branches      526      605      +79     
==========================================
+ Hits         4790     5589     +799     
- Misses        238      290      +52     
Impacted Files Coverage Δ
...opentelemetry-instrumentation-graphql/.eslintrc.js 0.00% <0.00%> (ø)
...entelemetry-instrumentation-graphql/test/schema.ts 55.84% <55.84%> (ø)
...entelemetry-instrumentation-graphql/src/graphql.ts 92.36% <92.36%> (ø)
...opentelemetry-instrumentation-graphql/src/utils.ts 96.17% <96.17%> (ø)
.../opentelemetry-instrumentation-graphql/src/enum.ts 100.00% <100.00%> (ø)
...entelemetry-instrumentation-graphql/src/symbols.ts 100.00% <100.00%> (ø)
...opentelemetry-instrumentation-graphql/src/types.ts 100.00% <100.00%> (ø)
...entelemetry-instrumentation-graphql/src/version.ts 100.00% <100.00%> (ø)
...metry-instrumentation-graphql/test/graphql.test.ts 100.00% <100.00%> (ø)
...entelemetry-instrumentation-graphql/test/helper.ts 100.00% <100.00%> (ø)
... and 10 more

Copy link
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

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

I already reviewed this when the PR was open in the main repo but I'll put the same comment here.

I'm not familiar with the graphql module's API, but it seems like a generally straightforward implementation of the tracing and the use of the new instrumentation module looks good to me. Approving.

@obecny obecny added the enhancement New feature or request label Oct 28, 2020
@obecny obecny merged commit 4de41c8 into open-telemetry:master Oct 30, 2020
@obecny obecny deleted the graphql branch October 30, 2020 00:50
@tvvignesh
Copy link

tvvignesh commented Oct 30, 2020

@obecny Thanks a lot for this. Just looked up on NPM and I am not able to find the package @opentelemetry/instrumentation-graphql - Is it yet to be pushed?

Also, does this support Apollo Federation? Thanks

@obecny
Copy link
Member Author

obecny commented Oct 30, 2020

@obecny Thanks a lot for this. Just looked up on NPM and I am not able to find the package @opentelemetry/instrumentation-graphql - Is it yet to be pushed?

it hasn't been released yet

Also, does this support Apollo Federation? Thanks

Not sure, the plugin instruments the graphql core library, so anything that is using that should be instrumented the same. but if certain library does something more beyond the graphql lib then not

@PacoDu
Copy link

PacoDu commented Oct 30, 2020

@obecny Thanks a lot for this. Just looked up on NPM and I am not able to find the package @opentelemetry/instrumentation-graphql - Is it yet to be pushed?

it hasn't been released yet

Could we know when this will be released ? Looking forward to try it out !

@hongbo-miao
Copy link
Contributor

Just saw it published six days ago.
Tested and it works great, thanks @obecny !

@carlitux
Copy link

carlitux commented Nov 7, 2020

@obecny any suggestion to debug?, I have all set up done but nothing is traced.

@obecny
Copy link
Member Author

obecny commented Nov 9, 2020

@obecny any suggestion to debug?, I have all set up done but nothing is traced.

Please create an issue and fill out all needed information including code samples etc. otherwise it is impossible to tell anything

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.

GraphQL Apollo Server
7 participants