You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
I am trying to create additional trace spans inside my gRPC rpc methods. I reviewed the API docs and examples but have not seen any firm guidance or working implementation. When I do call trace#createChildSpan, a null is returned. What am I doing wrong here? Here is an abbreviated code block from my server.js file:
Hi Everyone,
I am trying to create additional trace spans inside my gRPC rpc methods. I reviewed the API docs and examples but have not seen any firm guidance or working implementation. When I do call trace#createChildSpan, a null is returned. What am I doing wrong here? Here is an abbreviated code block from my server.js file:
const traceApi = require("@google-cloud/trace-agent").start({ projectId: "festivals-183900", keyFilename: googleSvcAccount }); server.addService(smtpTemplateProto.templatesPackage.SmtpTemplateSvc.service, { addBindable: (call: any, cb: any) => { let clientCn: Client; let data: Object; let rollBack: boolean = false; let spanAddBindable: any; try { // create spanAddBindable span spanAddBindable = traceApi.createChildSpan({ name: "Svc.BindableController#addBindable" }); console.log(spanAddBindable); <== evals as null! spanAddBindable.endSpan(); } catch(err) {} } }