TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

OpenCensus Zpages Exporter for Node.js

Gitter chat

OpenCensus Zpages Exporter implements a collection of HTML pages that display stats and trace data sent from OpenCensus Node.js.

This project is still at an early stage of development. It's subject to change.


npm install @deal/opencensus-nodejs
npm install @deal/opencensus-exporter-zpages


Zpages always runs on localhost, but you can change the port in the options. If the option startServer is set to true, Zpages server will start when a new Zpages instance is created. It's also possible to predefined some span names. These empty spans will be listed on Zpages.

To use Zpages, instance the exporter on your application and pass the options. For javascript:

var tracing = require('@deal/opencensus-nodejs');
var zpages = require('@deal/opencensus-exporter-zipkin');

// Add your zipkin url and application name to the Zipkin options
var options = {
  port: 8080,   // default
  startServer: true,  // default
  spanNames: ['predefined/span1', 'predefined/span2']

var exporter = new zpages.ZpagesExporter(options);

Similarly for Typescript:

import * as tracing from '@deal/opencensus-nodejs';
import {ZpagesExporter, ZpagesExporterOptions} from '@deal/opencensus-zpages-exporter';

// Add your zipkin url and application name to the Zipkin options
const options = {
  port: 8080,   // default
  startServer: true,  // default
  spanNames: ['predefined/span1', 'predefined/span2']
} as ZpagesExporterOptions;

const exporter = new ZpagesExporter(options);

Now, register the exporter and start tracing.

tracing.start({'exporter': exporter});



Starting the Zpages server

If options.startServer is set to false, the server can be started by calling startServer method:


The server will run at http:\\localhost:port.

Browsing the Zpages pages

There are four pages you can browse.

  • /tracez: Trace list.

  • /traceconfigz: Trace settings.

  • /rpcz: RPC stats (not yet implemented).

  • /stats: Stats page (not yet implemented).

Stoping the Zpages server

If it is necessary to stop the server programmatically, use the following command:


Useful links

Package Sidebar


npm i @deal/opencensus-exporter-zpages

Weekly Downloads






Unpacked Size

112 kB

Total Files


Last publish


  • curated-infra
  • dealeng
  • curated-dependabot