Skip to content

Commit

Permalink
fix: make constant all caps
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurkale22 committed Sep 13, 2019
1 parent c75a76c commit c8b6411
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/opentelemetry-basic-tracer/src/BasicTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-basic-tracer/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions packages/opentelemetry-basic-tracer/src/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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
* user provided configurations.
*/
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) {
Expand Down

0 comments on commit c8b6411

Please sign in to comment.