From 209070e53ce60b54e26f8856d3943c4212df95a8 Mon Sep 17 00:00:00 2001 From: Gerhard Stoebich <18708370+Flarna@users.noreply.github.com> Date: Fri, 5 Feb 2021 16:24:38 +0100 Subject: [PATCH] chore: remove config from BasicTracerProvider#getTracer Api doesn't allow to pass a tracer config to getTracer. Also ProxyTracer and ProxyTracerProvider don't forward config. It seems it's better to remove this option from BasicTracerProvider to avoid confusions. --- packages/opentelemetry-tracing/src/BasicTracerProvider.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/opentelemetry-tracing/src/BasicTracerProvider.ts b/packages/opentelemetry-tracing/src/BasicTracerProvider.ts index a5c4b377cc..913b448ac5 100644 --- a/packages/opentelemetry-tracing/src/BasicTracerProvider.ts +++ b/packages/opentelemetry-tracing/src/BasicTracerProvider.ts @@ -52,13 +52,10 @@ export class BasicTracerProvider implements api.TracerProvider { }); } - getTracer(name: string, version?: string, config?: TracerConfig): Tracer { + getTracer(name: string, version?: string): Tracer { const key = `${name}@${version || ''}`; if (!this._tracers.has(key)) { - this._tracers.set( - key, - new Tracer({ name, version }, config || this._config, this) - ); + this._tracers.set(key, new Tracer({ name, version }, this._config, this)); } return this._tracers.get(key)!;