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

Commit fa1ea7f

Browse files
authored
Exporter/Zipkin: Enforce strictNullChecks and noUnusedLocals (#381)
* Exporter/Zipkin: Enforce strictNullChecks and noUnusedLocals * minor fix
1 parent 7f23366 commit fa1ea7f

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
1414
- Add support for recording gRPC stats.
1515
- Add support for recording HTTP stats.
1616
- Enforce `--strictNullChecks` and `--noUnusedLocals` Compiler Options on [opencensus-instrumentation-http], [opencensus-instrumentation-grpc] and [opencensus-propagation-tracecontext] packages.
17+
- Enforce `--strictNullChecks` and `--noUnusedLocals` Compiler Options on [opencensus-exporter-zipkin] packages.
1718

1819
## 0.0.9 - 2019-02-12
1920
- Add Metrics API.

packages/opencensus-exporter-zipkin/README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# OpenCensus Zipkin Exporter for Node.js
1+
# OpenCensus Zipkin Trace Exporter
22
[![Gitter chat][gitter-image]][gitter-url]
33

4-
OpenCensus Zipkin Exporter allows the user to send collected traces with [OpenCensus Node.js](https://github.com/census-instrumentation/opencensus-node) to Zipkin.
4+
OpenCensus Zipkin Trace Exporter allows the user to send collected traces with [OpenCensus Node.js](https://github.com/census-instrumentation/opencensus-node) to Zipkin.
5+
6+
[Zipkin](http://zipkin.io/) is a distributed
7+
tracing system. It helps gather timing data needed to troubleshoot
8+
latency problems in microservice architectures. It manages both the
9+
collection and lookup of this data.
510

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

@@ -15,7 +20,7 @@ npm install @opencensus/exporter-zipkin
1520

1621
## Usage
1722

18-
To use Zipkin as your exporter, first, download from any of the three available options on [Quickstart](https://zipkin.io/pages/quickstart.html): through Docker, on Java or manually compiling the source code. Tests were executed running Zipkin with Java, through the following commands on terminal:
23+
To use [Zipkin](http://zipkin.io/) as your exporter, first, download from any of the three available options on [Quickstart](https://zipkin.io/pages/quickstart.html): through Docker, on Java or manually compiling the source code. Tests were executed running Zipkin with Java, through the following commands on terminal:
1924

2025
```bash
2126
wget -O zipkin.jar 'https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec'

packages/opencensus-exporter-zipkin/src/zipkin.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface ZipkinExporterOptions extends ExporterConfig {
3535
serviceName: string;
3636
}
3737

38-
interface TranslatedSpan {
38+
export interface TranslatedSpan {
3939
traceId: string;
4040
name: string;
4141
id: string;
@@ -50,7 +50,7 @@ interface TranslatedSpan {
5050
tags: {[key: string]: string};
5151
}
5252

53-
interface Annotation {
53+
export interface Annotation {
5454
timestamp?: number; // in microseconds
5555
value?: string;
5656
}

packages/opencensus-exporter-zipkin/test/test-zipkin.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ const postPath = '/api/v2/spans';
2929
* true to use a real zipkin service
3030
* false to use a nock server
3131
*/
32-
const OPENCENSUS_NETWORK_TESTS =
33-
['true', 'TRUE', '1'].indexOf(process.env.OPENCENSUS_NETWORK_TESTS) > -1;
32+
const OPENCENSUS_NETWORK_TESTS = process.env.OPENCENSUS_NETWORK_TESTS;
3433

3534
/** Default options for zipkin tests */
3635
const zipkinOptions = {

packages/opencensus-exporter-zipkin/tsconfig.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"pretty": true,
77
"module": "commonjs",
88
"target": "es6",
9-
"strictNullChecks": false
9+
"strictNullChecks": true,
10+
"noUnusedLocals": true
1011
},
1112
"include": [
1213
"src/**/*.ts",
@@ -15,4 +16,4 @@
1516
"exclude": [
1617
"node_modules"
1718
]
18-
}
19+
}

0 commit comments

Comments
 (0)