From cbce1427643c05f6a4c9ec4e6cb5bc5eaf16b4e0 Mon Sep 17 00:00:00 2001 From: Fabio Silva <37403306+fabiogomessilva@users.noreply.github.com> Date: Mon, 7 May 2018 13:16:14 -0300 Subject: [PATCH] refactor: fix some dependencies, file copyright and typos (#5) PR-URL: #5 --- packages/opencensus-core/package.json | 1 - packages/opencensus-core/src/trace/model/tracer.ts | 4 ++-- packages/opencensus-core/test/test-console-exporter.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/opencensus-core/package.json b/packages/opencensus-core/package.json index f0266ed1d..70c610928 100644 --- a/packages/opencensus-core/package.json +++ b/packages/opencensus-core/package.json @@ -54,7 +54,6 @@ "nyc": "11.6.0" }, "dependencies": { - "async_hooks": "^1.0.0", "continuation-local-storage": "^3.2.1", "debug": "^3.1.0", "intercept-stdout": "^0.1.2", diff --git a/packages/opencensus-core/src/trace/model/tracer.ts b/packages/opencensus-core/src/trace/model/tracer.ts index 704e95013..fadb36fb7 100644 --- a/packages/opencensus-core/src/trace/model/tracer.ts +++ b/packages/opencensus-core/src/trace/model/tracer.ts @@ -116,11 +116,11 @@ export class Tracer implements types.Tracer { } } const aRoot = new RootSpan(this, options); - const sampleDecisition: boolean = propagatedSample ? + const sampleDecision: boolean = propagatedSample ? propagatedSample : this.sampler.shouldSample(aRoot.traceId); - if (sampleDecisition) { + if (sampleDecision) { aRoot.start(); this.currentRootSpan = aRoot; newRoot = aRoot; diff --git a/packages/opencensus-core/test/test-console-exporter.ts b/packages/opencensus-core/test/test-console-exporter.ts index 22b81b9b6..82bc79a2e 100644 --- a/packages/opencensus-core/test/test-console-exporter.ts +++ b/packages/opencensus-core/test/test-console-exporter.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018 Google LLC. All Rights Reserved. + * Copyright 2018, OpenCensus Authors * * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License.