Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sdk-trace-base): don't load envs top level
Right now `@opentelemetry/sdk-trace-base` loads `OTEL_*` env vars when it is loaded, regardless of if `loadDefaultConfig` is ever called. In runtimes with a permission model like Deno, this may cause a bunch of permission prompts right on startup. This PR changes the env vars to all be loaded when `loadDefaultConfig` is called. Interestingly, previously only `buildSamplerFromEnv` used the "global" env vars. For all other options the env vars are re-read on every call to `loadDefaultConfig`.
- Loading branch information