Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including moleculer-console-tracer with all npm packages installed. Try it out:

require("moleculer/package.json"); // moleculer is a peer dependency. var moleculerConsoleTracer = require("moleculer-console-tracer")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

moleculer-console-tracer v0.2.0

Simple tracer service to print metric traces to the console.

Moleculer logo

moleculer-console-tracer NPM version

Simple tracer service to print metric traces to the console. Do not use it in production. Just for prototyping and testing.

Console Tracing screenshot

Don't execute multiple instances because it is not a centralized tracing solution.

Features

Install

$ npm install moleculer-console-tracer

Usage

// services/metrics.tracer.js

const Tracer = require("moleculer-console-tracer");

module.exports = {
    mixins: [Tracer],
    settings: {
        width: 100,
        gaugeWidth: 50
    }
});

// moleculer.config.js
module.exports = {
    // ...
    metrics: true,
    // ...
}

Settings

| Property | Type | Default | Description | | -------- | ---- | ------- | ----------- | | `width` | `Number` | `80` | Table width. | | `gaugeWidth` | `Number` | `40` | Gauge width. |
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free