We are trying to set up trace across a number of node.js microservices.
node v10.14.2
google-cloud/pubsub v0.19.1
google-cloud/trace-agent v3.5.0
Services got http endpoint and pubsub integrtion. All services are talking to each other via pubsub.
Trace-agent picks up http requests and all other traces (ie mysql and pubsub.publish) correctly.
However, when a service get a message on a pubsub subscription, trace-agent see nothing.
Other trace (mysql and pubsub.publishing) are also not picked up when first request comming via pubsub.subscription.
We are using pull subscriptions that are listening for a message:
subscription.on('message', processMessage);
How to enable trace-agent to pick up those traces that are comming via pubsub subscription?
Update 1:
Enabled logs to include debug messages with start({ logLevel: 4 });
and found that a lot of trace messages are there, but not attached to the root span: 'Creating phantom child span because there is no root span.'