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

Commit cc980f2

Browse files
authored
Update README and CHANGELOG (#378)
* minor fix * update readme
1 parent a5c2971 commit cc980f2

File tree

10 files changed

+23
-22
lines changed

10 files changed

+23
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ All notable changes to this project will be documented in this file.
1111
- Add proto files to exporter-ocagent package. Fixes issue [#174](https://github.com/census-instrumentation/opencensus-node/issues/174).
1212
- Remove `ConfigStream` behavior from exporter-ocagent. This was unstable and is not currently supported by any other language instrumentation.
1313
- Change default exporter-ocagent port to `55678` to match the default OC Agent port.
14+
- Add support for recording gRPC stats.
1415
- Add support for recording HTTP stats.
16+
- Enforce `--strictNullChecks` and `--noUnusedLocals` Compiler Options on [opencensus-instrumentation-http], [opencensus-instrumentation-grpc] and [opencensus-propagation-tracecontext] packages.
1517

1618
## 0.0.9 - 2019-02-12
1719
- Add Metrics API.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# OpenCensus Libraries for Node.js
1+
# OpenCensus - A stats collection and distributed tracing framework
22
[![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]
33

4-
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.
4+
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.
55

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

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

3536
## Exporters
3637

packages/opencensus-core/test/test-stats.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ describe('Stats', () => {
185185
globalStats.registerExporter(testExporter);
186186
const measurement = {measure, value: 10};
187187
globalStats.record([measurement]);
188-
console.log(JSON.stringify(testExporter.recordedMeasurements));
189188
assert.strictEqual(testExporter.recordedMeasurements.length, 2);
190189
});
191190

packages/opencensus-example-automatic-tracing/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ npm install @opencensus/nodejs
1515
OpenCensus is able to automatically trace HTTP requests, therefore, you just need to require OpenCensus in your application with:
1616

1717
```javascript
18-
var tracing = require('@opencensus/nodejs');
18+
const tracing = require('@opencensus/nodejs');
1919
tracing.start();
2020

21-
var http = require('http');
21+
const http = require('http');
2222
http.createServer(function (req, res) {
2323
res.writeHead(200, { 'Content-Type': 'text/html' });
2424
res.write('Hello World!');

packages/opencensus-exporter-instana/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ npm install @opencensus/exporter-instana
1414
```
1515

1616
## Usage
17-
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.
17+
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.
1818

1919
```javascript
20-
var tracing = require('@opencensus/nodejs');
21-
var instana = require('@opencensus/exporter-instana');
20+
const tracing = require('@opencensus/nodejs');
21+
const instana = require('@opencensus/exporter-instana');
2222

2323
tracing.start({
2424
exporter: new instana.InstanaTraceExporter()

packages/opencensus-exporter-jaeger/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const options = {
3030
port: 6832; // optional
3131
maxPacketSize: 65000; // optional
3232
}
33-
var exporter = new JaegerTraceExporter(options);
33+
const exporter = new JaegerTraceExporter(options);
3434
```
3535

3636
Now, register the exporter and start tracing.

packages/opencensus-exporter-ocagent/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ npm install @opencensus/exporter-ocagent
1818
Instance the exporter on your application. For javascript:
1919

2020
```javascript
21-
var tracing = require('@opencensus/nodejs');
22-
var ocagent = require('@opencensus/exporter-ocagent');
21+
const tracing = require('@opencensus/nodejs');
22+
const ocagent = require('@opencensus/exporter-ocagent');
2323

24-
var exporter = new ocagent.OCAgentExporter({
24+
const exporter = new ocagent.OCAgentExporter({
2525
// ... configuration options ...
2626
});
2727

@@ -55,7 +55,7 @@ tracing.registerExporter(exporter).start();
5555

5656
The following options are available through the construtor options.
5757

58-
Option | Type | Description
58+
Option | Type | Description
5959
----------------|-------------------------|-
6060
`serviceName` | string | Name of the service. Defaults to `Anonymous Service`.
6161
`host` | string | Host or ip of the agent. Defaults to `localhost`.

packages/opencensus-exporter-stackdriver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const tracing = require('@opencensus/nodejs');
3030
const { StackdriverTraceExporter } = require('@opencensus/exporter-stackdriver');
3131

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

3535
tracing.registerExporter(exporter).start();
3636
```

packages/opencensus-exporter-zpages/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ Zpages always runs on localhost, but you can change the port in the options. If
1919
To use Zpages, instance the exporter on your application and pass the options. For javascript:
2020

2121
```javascript
22-
var tracing = require('@opencensus/nodejs');
23-
var zpages = require('@opencensus/exporter-zipkin');
22+
const tracing = require('@opencensus/nodejs');
23+
const zpages = require('@opencensus/exporter-zipkin');
2424

2525
// Add your zipkin url and application name to the Zipkin options
26-
var options = {
26+
const options = {
2727
port: 8080, // default
2828
startServer: true, // default
2929
spanNames: ['predefined/span1', 'predefined/span2']
3030
}
3131

32-
var exporter = new zpages.ZpagesExporter(options);
32+
const exporter = new zpages.ZpagesExporter(options);
3333
```
3434

3535
Similarly for Typescript:

packages/opencensus-nodejs/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# OpenCensus for Node.js
22
[![Gitter chat][gitter-image]][gitter-url]
33

4-
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.
4+
OpenCensus Node.js is an implementation of OpenCensus, a toolkit for collecting application performance and behavior monitoring data.
55

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

@@ -22,7 +22,7 @@ npm install @opencensus/nodejs
2222
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.
2323

2424
```javascript
25-
var tracing = require('@opencensus/nodejs');
25+
const tracing = require('@opencensus/nodejs');
2626
tracing.start();
2727
```
2828

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

3636
### Manually Instrument an Application
3737

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

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

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

0 commit comments

Comments
 (0)