Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@fetsorn/opentelemetry-console-exporter

fetsorn159MIT0.0.3TypeScript support: included

OpenTelemetry Console Exporter allows the user to send collected traces to the console.

opentelemetry, nodejs, tracing

readme

OpenTelemetry Console Trace Exporter

NPM Published Version

OpenTelemetry Console Trace Exporter allows the user to send collected traces to console.debug.

Setup

Google Cloud Trace is a managed service provided by Google Cloud Platform.

Installation

npm install --save @fetsorn/opentelemetry-console-exporter

Usage

Install the exporter on your application, register the exporter, and start tracing.

const { ConsoleExporter } = require('@fetsorn/opentelemetry-console-exporter');

const exporter = new TraceExporter({
  // If you want more detailed view, you will need to specify `isDetailed = true` here
});

Now, register the exporter.

provider.addSpanProcessor(new BatchSpanProcessor(exporter));

Exporter requires BatchSpanProcessor to analyze the trace hierarchy.

  • BatchSpanProcessor: The implementation of the SpanProcessor that batches ended spans and pushes them to the configured SpanExporter.