Skip to content

Commit

Permalink
chore: changing all env params to be required (#1328)
Browse files Browse the repository at this point in the history
  • Loading branch information
obecny authored Jul 21, 2020
1 parent 2d71b3a commit 3bf4e54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
/**
* Gets the environment variables
*/
export function getEnv(): ENVIRONMENT {
export function getEnv(): Required<ENVIRONMENT> {
const _window = window as typeof window & ENVIRONMENT_MAP;
const globalEnv = parseEnvironment(_window);
return Object.assign({}, DEFAULT_ENVIRONMENT, globalEnv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
/**
* Gets the environment variables
*/
export function getEnv(): ENVIRONMENT {
export function getEnv(): Required<ENVIRONMENT> {
const processEnv = parseEnvironment(process.env as ENVIRONMENT_MAP);
return Object.assign({}, DEFAULT_ENVIRONMENT, processEnv);
}
2 changes: 1 addition & 1 deletion packages/opentelemetry-core/src/utils/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ENVIRONMENT_NUMBERS: Partial<keyof ENVIRONMENT>[] = [
/**
* Default environment variables
*/
export const DEFAULT_ENVIRONMENT: ENVIRONMENT = {
export const DEFAULT_ENVIRONMENT: Required<ENVIRONMENT> = {
OTEL_NO_PATCH_MODULES: '',
OTEL_LOG_LEVEL: LogLevel.ERROR,
OTEL_SAMPLING_PROBABILITY: 1,
Expand Down

0 comments on commit 3bf4e54

Please sign in to comment.