Skip to content

Commit

Permalink
chore: remove unused default argument in Tracer (#913)
Browse files Browse the repository at this point in the history
A Tracer is always created by a TracerProvider and this one always passes it's config
therefore no need to default in construtor.
  • Loading branch information
Flarna committed Mar 30, 2020
1 parent 01b10f8 commit ce6a5eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/opentelemetry-tracing/src/Tracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
} from '@opentelemetry/core';
import { Resource } from '@opentelemetry/resources';
import { BasicTracerProvider } from './BasicTracerProvider';
import { DEFAULT_CONFIG } from './config';
import { Span } from './Span';
import { TraceParams, TracerConfig } from './types';
import { mergeConfig } from './utility';
Expand All @@ -46,7 +45,7 @@ export class Tracer implements api.Tracer {
* Constructs a new Tracer instance.
*/
constructor(
config: TracerConfig = DEFAULT_CONFIG,
config: TracerConfig,
private _tracerProvider: BasicTracerProvider
) {
const localConfig = mergeConfig(config);
Expand Down Expand Up @@ -163,7 +162,7 @@ function getParent(
return getParentSpanContext(context);
}

function getContext(span: api.Span | api.SpanContext) {
function getContext(span: api.Span | api.SpanContext): api.SpanContext {
return isSpan(span) ? span.context() : span;
}

Expand Down

0 comments on commit ce6a5eb

Please sign in to comment.