From c8b64111883afeefa3a9d0712fc3143547cedf3b Mon Sep 17 00:00:00 2001 From: Mayur Kale Date: Fri, 13 Sep 2019 09:50:22 -0700 Subject: [PATCH] fix: make constant all caps --- packages/opentelemetry-basic-tracer/src/BasicTracer.ts | 4 ++-- packages/opentelemetry-basic-tracer/src/config.ts | 2 +- packages/opentelemetry-basic-tracer/src/utility.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/opentelemetry-basic-tracer/src/BasicTracer.ts b/packages/opentelemetry-basic-tracer/src/BasicTracer.ts index 62411c3616b..0291f8cf834 100644 --- a/packages/opentelemetry-basic-tracer/src/BasicTracer.ts +++ b/packages/opentelemetry-basic-tracer/src/BasicTracer.ts @@ -35,7 +35,7 @@ import { mergeConfig } from './utility'; import { SpanProcessor } from './SpanProcessor'; import { NoopSpanProcessor } from './NoopSpanProcessor'; import { MultiSpanProcessor } from './MultiSpanProcessor'; -import { defaultConfig } from './config'; +import { DEFAULT_CONFIG } from './config'; /** * This class represents a basic tracer. @@ -54,7 +54,7 @@ export class BasicTracer implements types.Tracer { /** * Constructs a new Tracer instance. */ - constructor(config: BasicTracerConfig = defaultConfig) { + constructor(config: BasicTracerConfig = DEFAULT_CONFIG) { const localConfig = mergeConfig(config); this._binaryFormat = localConfig.binaryFormat; this._defaultAttributes = localConfig.defaultAttributes; diff --git a/packages/opentelemetry-basic-tracer/src/config.ts b/packages/opentelemetry-basic-tracer/src/config.ts index b458fdcb39d..66a1a5540e1 100644 --- a/packages/opentelemetry-basic-tracer/src/config.ts +++ b/packages/opentelemetry-basic-tracer/src/config.ts @@ -35,7 +35,7 @@ export const DEFAULT_MAX_LINKS_PER_SPAN = 32; * non-primitive values (like `traceParams`), the user-provided value will be * used to extend the default value. */ -export const defaultConfig = { +export const DEFAULT_CONFIG = { defaultAttributes: {}, binaryFormat: new BinaryTraceContext(), httpTextFormat: new HttpTraceContext(), diff --git a/packages/opentelemetry-basic-tracer/src/utility.ts b/packages/opentelemetry-basic-tracer/src/utility.ts index 2c037b50bcf..9115083bba8 100644 --- a/packages/opentelemetry-basic-tracer/src/utility.ts +++ b/packages/opentelemetry-basic-tracer/src/utility.ts @@ -20,7 +20,7 @@ import { DEFAULT_MAX_EVENTS_PER_SPAN, DEFAULT_MAX_LINKS_PER_SPAN, } from './config'; -import { defaultConfig } from './config'; +import { DEFAULT_CONFIG } from './config'; /** * Function to merge Default configuration (as specified in './config') with @@ -28,7 +28,7 @@ import { defaultConfig } from './config'; */ export function mergeConfig(userConfig: BasicTracerConfig) { const traceParams = userConfig.traceParams; - const target = Object.assign({}, defaultConfig, userConfig); + const target = Object.assign({}, DEFAULT_CONFIG, userConfig); // the user-provided value will be used to extend the default value. if (traceParams) {