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

fix graphql plugin error when using sampling #1164

Merged
merged 1 commit into from
Nov 27, 2020
Merged

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Nov 27, 2020

What does this PR do?

Fix GraphQL plugin error when using sampling. For now this is fixed in the plugin directly, but eventually a cleaner way to do handle this should be implemented.

Motivation

The no-op implementation of Span doesn't have the _getTime private method which is used by the GraphQL plugin. Ideally this method should not be needed since it's private, but the way the GraphQL plugin works means it needs to be able to store the finish time when resolving arrays.

Fixes #1163

@rochdev rochdev added bug Something isn't working integrations labels Nov 27, 2020
@rochdev rochdev added this to the 0.29.1 milestone Nov 27, 2020
@rochdev rochdev requested a review from a team as a code owner November 27, 2020 17:48
@keepitterron
Copy link

wow, the time to fix here is amazing! 🙌

Copy link

@keepitterron keepitterron left a comment

Choose a reason for hiding this comment

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

✨ ✨ ✨ ✨ 💖 👍 WUNDERBAR! 👍 💖 ✨ ✨ ✨ ✨

@shayonj
Copy link

shayonj commented Nov 27, 2020

Yep! really appreciate the quick fix here folks 🙌 🚀

@rochdev rochdev merged commit 61cfbed into master Nov 27, 2020
@rochdev rochdev deleted the fix-graphql-noop-span branch November 27, 2020 17:53
Czechh added a commit that referenced this pull request Dec 1, 2020
…rada/add-trace-to-lambda-invoke

* 'master' of github.com:DataDog/dd-trace-js:
  fix graphql plugin error when using sampling (#1164)
  v0.29.0 (#1160)
  fix mongodb integration not instrumenting correctly (#1159)
  clean up test scripts (#1158)
  fix consumer span not waiting for message ack before finishing (#1152)
  provide a way to know when flush is finished (#1154)
  add experimental option to mark internal spans on errors (#1153)
  Remove only from it, probably left in by accident (#1149)
  add support for @grpc/grpc-js (#1147)
  remove idle call frame samples from profiles (#1143)
  fix socket connect callback not running in parent scope (#1142)
  add a fast path in toArray for length-8 IDs (#1138)
  Fix GraphQL span finishTime calculation (#1139)
  v0.28.0 (#1137)
  skip browser test for setUrl (#1135)
  fix ingestion rate limiter drifting on interval change (#1132)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent failures on GraphQL plugin with TypeError: field.span._getTime is not a function
4 participants