Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opencensus/exporter-ocagent

Package Overview
Dependencies
Maintainers
6
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencensus/exporter-ocagent

OpenCensus Agent Exporter allows user to send collected trace to the OpenCensus Agent

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.7K
increased by130.23%
Maintainers
6
Weekly downloads
 
Created
Source

OpenCensus Agent Exporter for Node.js

Gitter chat

OpenCensus Agent Exporter allows the user to send collected traces with OpenCensus Node.js to the OpenCensus Agent or Collector.

The library is in alpha stage and the API is subject to change.

Installation

Install OpenCensus Agent Exporter with:

npm install @opencensus/nodejs
npm install @opencensus/exporter-ocagent

Usage

Instance the exporter on your application. For javascript:

const tracing = require('@opencensus/nodejs');
const ocagent = require('@opencensus/exporter-ocagent');

const exporter = new ocagent.OCAgentExporter({
  // ... configuration options ...
});

tracing.registerExporter(exporter).start();

Similarly for Typescript:

import * as tracing from '@opencensus/nodejs';
import { OCAgentExporter } from '@opencensus/exporter-ocagent';

const exporter = new OCAgentExporter({
  // ... configuration options ...
});

Now, register the exporter and start tracing.

tracing.start({exporter: exporter});

or

tracing.registerExporter(exporter).start();

Configuration Options

The following options are available through the construtor options.

OptionTypeDescription
serviceNamestringName of the service. Defaults to Anonymous Service.
hoststringHost or ip of the agent. Defaults to localhost.
portnumberPort of the agent. Defaults to 55678.
credentialsgrpc.ChannelCredentialsCredentials to use for grpc connection to agent. Defaults to grpc.credentials.createInsecure().
attributes{[key: string]: string}Map of key-value pairs to associate with the Node.
bufferSizenumberMaximum size of the span buffer.
bufferTimeoutnumberMax time (in milliseconds) for the buffer can wait before exporting spans.
loggerLoggerLogger to use for output.

Keywords

FAQs

Package last updated on 27 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc