Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 4eaf539

Browse files
vmarchaudmayurkale22
authored andcommitted
only require userland CLS when needed (#435)
1 parent 04f1fee commit 4eaf539

File tree

1 file changed

+2
-1
lines changed
  • packages/opencensus-core/src/internal

1 file changed

+2
-1
lines changed

packages/opencensus-core/src/internal/cls.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ const useAsyncHooks: boolean = semver.satisfies(
2727
process.version, '>=8'); //&&
2828
// !!process.env.GCLOUD_TRACE_NEW_CONTEXT;
2929

30-
const cls: typeof CLS = useAsyncHooks ? require('./cls-ah') : CLS;
30+
const cls: typeof CLS =
31+
useAsyncHooks ? require('./cls-ah') : require('continuation-local-storage');
3132

3233

3334
const TRACE_NAMESPACE = 'opencensus.io';

0 commit comments

Comments
 (0)