@deal/opencensus-exporter-prometheus
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

OpenCensus Prometheus Exporter for Node.js

Gitter chat

The OpenCensus Prometheus Exporter allows the user to send collected stats with OpenCensus Node.js to Prometheus.

This package is still at an early stage of development, and is subject to change.

Installation

Install OpenCensus Prometheus Exporter with:

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

Usage

Instance the exporter on your application. For javascript:

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

var exporter = new prometheus.PrometheusTraceExporter();

tracing.registerExporter(exporter).start();

Similarly for Typescript:

import * as tracing from '@deal/opencensus-nodejs';
import { PrometheusTraceExporter } from '@deal/opencensus-exporter-prometheus';

const exporter = new PrometheusTraceExporter();

Now, register the exporter and start tracing.

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

or

tracing.registerExporter(exporter).start();

Useful links

Package Sidebar

Install

npm i @deal/opencensus-exporter-prometheus

Weekly Downloads

14

Version

0.0.7

License

Apache-2.0

Unpacked Size

26.1 kB

Total Files

7

Last publish

Collaborators

  • curated-infra
  • dealeng
  • curated-dependabot