Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Update README and CHANGELOG (#378)
Browse files Browse the repository at this point in the history
* minor fix

* update readme
  • Loading branch information
mayurkale22 committed Mar 1, 2019
1 parent a5c2971 commit cc980f2
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ All notable changes to this project will be documented in this file.
- Add proto files to exporter-ocagent package. Fixes issue [#174](https://github.com/census-instrumentation/opencensus-node/issues/174).
- Remove `ConfigStream` behavior from exporter-ocagent. This was unstable and is not currently supported by any other language instrumentation.
- Change default exporter-ocagent port to `55678` to match the default OC Agent port.
- Add support for recording gRPC stats.
- Add support for recording HTTP stats.
- Enforce `--strictNullChecks` and `--noUnusedLocals` Compiler Options on [opencensus-instrumentation-http], [opencensus-instrumentation-grpc] and [opencensus-propagation-tracecontext] packages.

## 0.0.9 - 2019-02-12
- Add Metrics API.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OpenCensus Libraries for Node.js
# OpenCensus - A stats collection and distributed tracing framework
[![Gitter chat][gitter-image]][gitter-url] ![Node Version][node-img] [![NPM Published Version][npm-img]][npm-url] [![codecov][codecov-image]][codecov-url] ![Apache License][license-image]

OpenCensus Node.js is an implementation of OpenCensus, a toolkit for collecting application performance and behavior monitoring data. Right now OpenCensus for Node.js supports custom tracing and automatic tracing for HTTP and HTTPS. Please visit the [OpenCensus Node.js package](https://github.com/census-instrumentation/opencensus-node/tree/master/packages/opencensus-nodejs) for usage.
OpenCensus Node.js is an implementation of OpenCensus, a toolkit for collecting application performance and behavior monitoring data. It currently includes 3 apis: stats, tracing and tags. Please visit the [OpenCensus Node.js package](https://github.com/census-instrumentation/opencensus-node/tree/master/packages/opencensus-nodejs) for tracing usage and [OpenCensus Core package](https://github.com/census-instrumentation/opencensus-node/tree/master/packages/opencensus-core) for stats usage.

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

Expand Down Expand Up @@ -31,6 +31,7 @@ OpenCensus collects distributed tracing. It is able to do so by propagating span
- [B3 Propagation](https://github.com/census-instrumentation/opencensus-node/blob/master/packages/opencensus-propagation-b3/README.md)
- [Stackdriver Propagation](https://github.com/census-instrumentation/opencensus-node/blob/master/packages/opencensus-propagation-stackdriver/README.md)
- [Trace Context Propagation](https://github.com/census-instrumentation/opencensus-node/blob/master/packages/opencensus-propagation-tracecontext/README.md)
- [Binary Format Propagation](https://github.com/census-instrumentation/opencensus-node/blob/master/packages/opencensus-propagation-binaryformat/README.md)

## Exporters

Expand Down
1 change: 0 additions & 1 deletion packages/opencensus-core/test/test-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ describe('Stats', () => {
globalStats.registerExporter(testExporter);
const measurement = {measure, value: 10};
globalStats.record([measurement]);
console.log(JSON.stringify(testExporter.recordedMeasurements));
assert.strictEqual(testExporter.recordedMeasurements.length, 2);
});

Expand Down
4 changes: 2 additions & 2 deletions packages/opencensus-example-automatic-tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ npm install @opencensus/nodejs
OpenCensus is able to automatically trace HTTP requests, therefore, you just need to require OpenCensus in your application with:

```javascript
var tracing = require('@opencensus/nodejs');
const tracing = require('@opencensus/nodejs');
tracing.start();

var http = require('http');
const http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.write('Hello World!');
Expand Down
6 changes: 3 additions & 3 deletions packages/opencensus-exporter-instana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ npm install @opencensus/exporter-instana
```

## Usage
To use Instana as your exporter, first ensure that you have an [Instana agent running on your system](https://docs.instana.io/quick_start/getting_started/) and reporting to your environment. The Instana OpenCensus exporter directly communicates with the Instana agent in order to transmit data to Instana.
To use Instana as your exporter, first ensure that you have an [Instana agent running on your system](https://docs.instana.io/quick_start/getting_started/) and reporting to your environment. The Instana OpenCensus exporter directly communicates with the Instana agent in order to transmit data to Instana.

```javascript
var tracing = require('@opencensus/nodejs');
var instana = require('@opencensus/exporter-instana');
const tracing = require('@opencensus/nodejs');
const instana = require('@opencensus/exporter-instana');

tracing.start({
exporter: new instana.InstanaTraceExporter()
Expand Down
2 changes: 1 addition & 1 deletion packages/opencensus-exporter-jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const options = {
port: 6832; // optional
maxPacketSize: 65000; // optional
}
var exporter = new JaegerTraceExporter(options);
const exporter = new JaegerTraceExporter(options);
```

Now, register the exporter and start tracing.
Expand Down
8 changes: 4 additions & 4 deletions packages/opencensus-exporter-ocagent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ npm install @opencensus/exporter-ocagent
Instance the exporter on your application. For javascript:

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

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

Expand Down Expand Up @@ -55,7 +55,7 @@ tracing.registerExporter(exporter).start();

The following options are available through the construtor options.

Option | Type | Description
Option | Type | Description
----------------|-------------------------|-
`serviceName` | string | Name of the service. Defaults to `Anonymous Service`.
`host` | string | Host or ip of the agent. Defaults to `localhost`.
Expand Down
2 changes: 1 addition & 1 deletion packages/opencensus-exporter-stackdriver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const tracing = require('@opencensus/nodejs');
const { StackdriverTraceExporter } = require('@opencensus/exporter-stackdriver');

// Add your project id to the Stackdriver options
var exporter = new StackdriverTraceExporter({projectId: "your-project-id"});
const exporter = new StackdriverTraceExporter({projectId: "your-project-id"});

tracing.registerExporter(exporter).start();
```
Expand Down
8 changes: 4 additions & 4 deletions packages/opencensus-exporter-zpages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ Zpages always runs on localhost, but you can change the port in the options. If
To use Zpages, instance the exporter on your application and pass the options. For javascript:

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

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

var exporter = new zpages.ZpagesExporter(options);
const exporter = new zpages.ZpagesExporter(options);
```

Similarly for Typescript:
Expand Down
7 changes: 3 additions & 4 deletions packages/opencensus-nodejs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OpenCensus for Node.js
[![Gitter chat][gitter-image]][gitter-url]

OpenCensus Node.js is an implementation of OpenCensus, a toolkit for collecting application performance and behavior monitoring data. Right now OpenCensus for Node.js supports custom tracing and automatic tracing for HTTP and HTTPS.
OpenCensus Node.js is an implementation of OpenCensus, a toolkit for collecting application performance and behavior monitoring data.

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

Expand All @@ -22,7 +22,7 @@ npm install @opencensus/nodejs
OpenCensus for Node.js has automatic instrumentation for [HTTP](https://github.com/census-instrumentation/opencensus-node/blob/master/packages/opencensus-instrumentation-http/README.md) and [HTTPS](https://github.com/census-instrumentation/opencensus-node/blob/master/packages/opencensus-instrumentation-https/README.md) out of the box. This means that spans are automatically created for operations of those packages. To use it, simply start the tracing instance.

```javascript
var tracing = require('@opencensus/nodejs');
const tracing = require('@opencensus/nodejs');
tracing.start();
```

Expand All @@ -35,7 +35,7 @@ tracing.start();

### Manually Instrument an Application

In addition to automatic tracing, it is possible to manually create your own root and child spans.
In addition to automatic tracing, it is possible to manually create your own root and child spans.

```typescript
const rootSpanOptions = { name: 'your root span' };
Expand Down Expand Up @@ -100,4 +100,3 @@ If no exporter is registered in the tracing instance, as default, a console log

[gitter-image]: https://badges.gitter.im/census-instrumentation/lobby.svg
[gitter-url]: https://gitter.im/census-instrumentation/lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

0 comments on commit cc980f2

Please sign in to comment.