Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move initialization of const above first use #2170 #2171

Merged
merged 2 commits into from
May 1, 2021

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Apr 30, 2021

Fixes #2170

The basic bug being fixed is illustrated by this:

image

Because the function is hoisted above the point of first use by the JS runtime.

@codecov
Copy link

codecov bot commented Apr 30, 2021

Codecov Report

Merging #2171 (c8ccab0) into main (25c205a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2171      +/-   ##
==========================================
+ Coverage   92.80%   92.82%   +0.01%     
==========================================
  Files         140      140              
  Lines        5002     5002              
  Branches     1029     1029              
==========================================
+ Hits         4642     4643       +1     
+ Misses        360      359       -1     
Impacted Files Coverage Δ
packages/opentelemetry-tracing/src/config.ts 86.84% <100.00%> (ø)
...emetry-core/src/platform/node/RandomIdGenerator.ts 93.75% <0.00%> (+6.25%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReferenceError: Cannot access 'FALLBACK_OTEL_TRACES_SAMPLER' before initialization
4 participants