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

Issues when enabling tracing on gRPC service #952

Closed
a0viedo opened this issue Jan 16, 2019 · 2 comments
Closed

Issues when enabling tracing on gRPC service #952

a0viedo opened this issue Jan 16, 2019 · 2 comments
Assignees
Labels
api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. priority: p2 Moderately-important priority. Fix may not be included in next release. semver: patch A minor bug fix or small change. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@a0viedo
Copy link

a0viedo commented Jan 16, 2019

We were using the latest version of this module but after enabling it we couldn't see any traces whatsoever. After digging we found many of logs with

 severity:  "ERROR"  
 textPayload:  "original object and wrapper must be functions"

We believe it's because of the type checking one of the dependencies is doing (see PR). We found also that switching to versions older to v3.5.0 seems to solve the problem.

Any idea on how to solve the issue for the latest version?

@a0viedo
Copy link
Author

a0viedo commented Jan 16, 2019

Ok got a reproduction: new VM on GCP with this example running:

alejandro@instance-1:~/grpc/examples/node/dynamic_codegen/route_guide$ node -v
v8.15.0
alejandro@instance-1:~/grpc/examples/node/dynamic_codegen/route_guide$ node route_guide_server.js --db_path=./route_guide_db.json 
original object and wrapper must be functions
(node:3834) DeprecationWarning: Server#addProtoService: Use Server#addService instead

Run the client twice, first without any changes and the second time changing routeChat to be an async function. On Stackdriver I see both first calls but no routeChat for the second execution
image

@ofrobots ofrobots added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Jan 16, 2019
@kjin kjin self-assigned this Jan 16, 2019
@kjin kjin added status: investigating The issue is under investigation, which is determined to be non-trivial. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 16, 2019
@kjin
Copy link
Contributor

kjin commented Jan 16, 2019

Your shimmer PR should fix the problem! That being said this bug appears to be in all versions of the module -- it's not specific to 3.5.0.

Since grpc is the only module in which a user's function is directly wrapped via shimmer when it's patched for tracing, I'll go ahead and also open a PR to fix this issue here in case the shimmer PR takes too long to land.

Thanks for bringing this to our attention!

@kjin kjin added semver: patch A minor bug fix or small change. and removed status: investigating The issue is under investigation, which is determined to be non-trivial. labels Jan 16, 2019
@kjin kjin closed this as completed in #954 Jan 16, 2019
@google-cloud-label-sync google-cloud-label-sync bot added the api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. label Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. priority: p2 Moderately-important priority. Fix may not be included in next release. semver: patch A minor bug fix or small change. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants