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 has been archived by the owner on Oct 3, 2023. It is now read-only.
(node:8056) UnhandledPromiseRejectionWarning: Error: Unsupported type : undefined
at createAttributeValue (/path/to/project/node_modules/@opencensus/exporter-stackdriver/build/src/stackdriver-cloudtrace-utils.js:149:19)
at createAttributesBuilder (/path/to/project/node_modules/@opencensus/exporter-stackdriver/build/src/stackdriver-cloudtrace-utils.js:128:32)
at Object.createAttributes (/path/to/project/node_modules/@opencensus/exporter-stackdriver/build/src/stackdriver-cloudtrace-utils.js:58:31)
at StackdriverTraceExporter.createSpan (/path/to/project/node_modules/@opencensus/exporter-stackdriver/build/src/stackdriver-cloudtrace.js:102:56)
at /path/to/project/node_modules/@opencensus/exporter-stackdriver/build/src/stackdriver-cloudtrace.js:85:36
at Array.forEach (<anonymous>)
at StackdriverTraceExporter.<anonymous> (/path/to/project/node_modules/@opencensus/exporter-stackdriver/build/src/stackdriver-cloudtrace.js:83:19)
at Generator.next (<anonymous>)
at fulfilled (/path/to/project/node_modules/@opencensus/exporter-stackdriver/build/src/stackdriver-cloudtrace.js:19:58)
(node:8056) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8056) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Additional context
The reason why the error happened is the value of req.body.variable was undefined, but it was hard to understand why the error has happened by seeing that error message. Actually I needed to read '@opencensus/exporter-stackdriver' module to fix it.
Then I think we should allow undefined or replace it with an empty string or 'undefined' string otherwise we have to consider the possibility of becoming null or undefined for all values
Please answer these questions before submitting a bug report.
To be honest, I'm not sure this is a bug or not. I apologize if it's not suited for the bug issue.
What version of OpenCensus are you using?
What version of Node are you using?
v12.13.1
What did you do?
If possible, provide a recipe for reproducing the error.
Got an error when I start rootSpan by below codes
What did you expect to see?
traces will be outputted to stack driver
What did you see instead?
error message
Additional context
The reason why the error happened is the value of
req.body.variable
wasundefined
, but it was hard to understand why the error has happened by seeing that error message. Actually I needed to read '@opencensus/exporter-stackdriver' module to fix it.Then I think we should allow undefined or replace it with an empty string or 'undefined' string otherwise we have to consider the possibility of becoming null or undefined for all values
I think we can do this just check undefined or not here.
https://github.com/census-instrumentation/opencensus-node/blob/master/packages/opencensus-exporter-stackdriver/src/stackdriver-cloudtrace-utils.ts#L146
The text was updated successfully, but these errors were encountered: