Created
November 11, 2020 23:28
-
-
Save tedsuo/42ce479dd3e8e7232ddc00b7478950ac to your computer and use it in GitHub Desktop.
node_errors.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
throw ("ooops"); | |
} catch (error) { | |
// Add the exception as a properly formatted event. | |
span.recordException(error); | |
// Set the status code to make the exception count | |
// as an error. | |
span.setStatus({ code: | |
opentelemetry.CanonicalCode.UNKNOWN }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment