Skip to content

Commit

Permalink
chore(tracing): dont use internal core type open-telemetry#2177
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarchaud committed May 8, 2021
1 parent 9ce9eea commit 139c0c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/opentelemetry-tracing/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
ParentBasedSampler,
TraceIdRatioBasedSampler,
} from '@opentelemetry/core';
import { ENVIRONMENT } from '@opentelemetry/core/src/utils/environment';

const env = getEnv();
const FALLBACK_OTEL_TRACES_SAMPLER = TracesSamplerValues.AlwaysOn;
Expand All @@ -48,7 +47,7 @@ export const DEFAULT_CONFIG = {
* @param env optional, by default uses getEnv(), but allows passing a value to reuse parsed environment
*/
export function buildSamplerFromEnv(
env: Required<ENVIRONMENT> = getEnv()
env: ReturnType<typeof getEnv> = getEnv()
): Sampler {
switch (env.OTEL_TRACES_SAMPLER) {
case TracesSamplerValues.AlwaysOn:
Expand Down Expand Up @@ -80,7 +79,7 @@ export function buildSamplerFromEnv(
const DEFAULT_RATIO = 1;

function getSamplerProbabilityFromEnv(
env: Required<ENVIRONMENT>
env: ReturnType<typeof getEnv>
): number | undefined {
if (
env.OTEL_TRACES_SAMPLER_ARG === undefined ||
Expand Down

0 comments on commit 139c0c4

Please sign in to comment.