From 329cf927c6c2c9977996cc2a18a3979af2e4474e Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Sat, 1 May 2021 03:00:40 -0400 Subject: [PATCH] fix: move initialization of const above first use #2170 (#2171) Co-authored-by: Valentin Marchaud --- packages/opentelemetry-tracing/src/config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/opentelemetry-tracing/src/config.ts b/packages/opentelemetry-tracing/src/config.ts index afc4db73df1..4e770eb5fae 100644 --- a/packages/opentelemetry-tracing/src/config.ts +++ b/packages/opentelemetry-tracing/src/config.ts @@ -26,6 +26,7 @@ import { import { ENVIRONMENT } from '@opentelemetry/core/src/utils/environment'; const env = getEnv(); +const FALLBACK_OTEL_TRACES_SAMPLER = TracesSamplerValues.AlwaysOn; /** * Default configuration. For fields with primitive values, any user-provided @@ -42,8 +43,6 @@ export const DEFAULT_CONFIG = { }, }; -const FALLBACK_OTEL_TRACES_SAMPLER = TracesSamplerValues.AlwaysOn; - /** * Based on environment, builds a sampler, complies with specification. * @param env optional, by default uses getEnv(), but allows passing a value to reuse parsed environment