How to use the @opencensus/instrumentation-http.HttpPlugin.ATTRIBUTE_HTTP_ERROR_MESSAGE function in @opencensus/instrumentation-http

To help you get started, we’ve selected a few @opencensus/instrumentation-http examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github census-instrumentation / opencensus-node / packages / opencensus-instrumentation-http2 / src / http2.ts View on Github external
request.on('error', (err: Error) => {
        span.addAttribute(HttpPlugin.ATTRIBUTE_HTTP_ERROR_NAME, err.name);
        span.addAttribute(HttpPlugin.ATTRIBUTE_HTTP_ERROR_MESSAGE, err.message);

        span.end();
      });