Skip to content

Conversation

@danieljuhl
Copy link
Contributor

@danieljuhl danieljuhl commented Oct 31, 2018

Added instrumentation for apollo-server-express. As the actual instrumentation happens in apollo-server-core it might also work with all other apollo-server-*, but hasn't been tested yet.

Fixes #641

Checklist

  • Implement code
  • Add tests

@elasticmachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

1 similar comment
@elasticmachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@danieljuhl danieljuhl force-pushed the apollo-server branch 5 times, most recently from af00acc to fa4275c Compare October 31, 2018 11:24
@danieljuhl
Copy link
Contributor Author

@Qard @watson can any of you guide me to fixing/handling the failing test with node v4. apollo-server-express requires node >=6.

@danieljuhl danieljuhl force-pushed the apollo-server branch 3 times, most recently from c6eb901 to 5b6036c Compare October 31, 2018 11:46
@watson
Copy link
Contributor

watson commented Oct 31, 2018

@danieljuhl looks like you found the answer your self by adding the if (semver.lt(process.version, '6.0.0')) process.exit() line and moving the require statement below that. Now there's just a few double quotes that's making our linter angry. When those are fixed I think the tests should pass fine 👍

@danieljuhl
Copy link
Contributor Author

@watson yes, I think I found the solution, and waiting for the tests to finally pass :)

@danieljuhl danieljuhl force-pushed the apollo-server branch 3 times, most recently from 495f55f to a7957bb Compare October 31, 2018 13:12
@danieljuhl
Copy link
Contributor Author

danieljuhl commented Oct 31, 2018

@watson it looks to me, as if #646 is also causing this PR to fail. Can you confirm? And what do you want me to do from here.

@watson
Copy link
Contributor

watson commented Oct 31, 2018

Sorry about that. I just merged #646 which should fix the issue you experienced. If you rebase with master, it should be all green now 😄

@watson
Copy link
Contributor

watson commented Oct 31, 2018

I actually haven't reviewed the PR yet btw, so we'll just do that as well. So if you want you can just wait rebasing until afterwards

Qard
Qard previously approved these changes Oct 31, 2018
Copy link
Contributor

@Qard Qard left a comment

Choose a reason for hiding this comment

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

Just one suggestion on how to improve the code. Other than that though, it looks good to me. 👍

Copy link
Contributor

@watson watson left a comment

Choose a reason for hiding this comment

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

Could I get you to add a row to this table in the documentation as well?

https://github.com/elastic/apm-agent-nodejs/blob/master/docs/compatibility.asciidoc#custom-transactions

@danieljuhl
Copy link
Contributor Author

Thanks @watson and @Qard, I’ll update the PR tomorrow morning (rebase and rewrite per the review)

@danieljuhl
Copy link
Contributor Author

@watson @Qard it still looks like there is some conflicts with the dependency tests. Can you guide me, if there is something I can do.

@watson
Copy link
Contributor

watson commented Nov 1, 2018

I've just tried to fix it. Let's see what the tests say...

@danieljuhl
Copy link
Contributor Author

I've just tried to fix it. Let's see what the tests say...

Still not a happy CI. Maybe we need to remove apollo-server-express before express-graphql?

@watson
Copy link
Contributor

watson commented Nov 1, 2018

I wish npm would remove the concept of peer dependencies. It's nothing but trouble 😞

I'm trying now to split the tests for apollo-server-express and express-graphql into two separate builds. That way they should not interfere with each other.

@watson
Copy link
Contributor

watson commented Nov 1, 2018

Didn't fix it... I'll have another look later

@watson
Copy link
Contributor

watson commented Nov 2, 2018

Finally got the tests to pass 😅

@Qard have your review comments been addressed?

@danieljuhl
Copy link
Contributor Author

Finally got the tests to pass 😅

Great! And thanks for the help..

@Qard have your review comments been addressed?

I've tried at least 😄and followed the review comments exactly, so I hope they have been addressed.

Copy link
Contributor

@Qard Qard left a comment

Choose a reason for hiding this comment

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

One last thing, and then it looks good to me. 👍

Co-Authored-By: danieljuhl <danieljuhl@gmail.com>
@watson watson merged commit 30fcb53 into elastic:master Nov 6, 2018
@danieljuhl danieljuhl deleted the apollo-server branch November 6, 2018 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants