Add platform agnostic way to read environment variables#1191
Merged
mayurkale22 merged 6 commits intoopen-telemetry:masterfrom Jun 26, 2020
Merged
Add platform agnostic way to read environment variables#1191mayurkale22 merged 6 commits intoopen-telemetry:masterfrom
mayurkale22 merged 6 commits intoopen-telemetry:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1191 +/- ##
=======================================
Coverage 93.29% 93.29%
=======================================
Files 124 126 +2
Lines 3567 3597 +30
Branches 715 724 +9
=======================================
+ Hits 3328 3356 +28
- Misses 239 241 +2
|
markwolff
reviewed
Jun 12, 2020
dyladan
reviewed
Jun 12, 2020
markwolff
reviewed
Jun 12, 2020
naseemkullah
approved these changes
Jun 18, 2020
legendecas
reviewed
Jun 19, 2020
packages/opentelemetry-core/src/platform/browser/environment.ts
Outdated
Show resolved
Hide resolved
Member
Author
|
@open-telemetry/javascript-maintainers @open-telemetry/javascript-approvers ^^ |
markwolff
approved these changes
Jun 23, 2020
dyladan
reviewed
Jun 23, 2020
| * Gets the environment variables | ||
| */ | ||
| export function getEnv(): ENVIRONMENT { | ||
| const globalEnv = parseEnvironment((window as unknown) as ENVIRONMENT_MAP); |
Member
There was a problem hiding this comment.
instead of asserting window twice can we do const _window = window as typeof window & ENVIRONMENT_MAP like we did in the API package for global?
Member
There was a problem hiding this comment.
ENVIRONMENT_MAP should be made partial. The types will not force you to check if a value exists in this current setup.
Member
Author
There was a problem hiding this comment.
not sure if I understand correctly your last sentence about partial ?
dyladan
approved these changes
Jun 25, 2020
mayurkale22
approved these changes
Jun 25, 2020
vmarchaud
approved these changes
Jun 26, 2020
pichlermarc
pushed a commit
to dynatrace-oss-contrib/opentelemetry-js
that referenced
this pull request
Dec 15, 2023
* fix(restify): upgrade package to fix type problem * fix(restify): updated so types are not leaking through open-telemetry#1132 * fix(restify): lint fix * fix(restify): final fix up for linter * style: avoid checking in manually edited package.json * test: require restify again for every test * test: differenciate between thorwing and failing gracefully * test: use custom error * feat: support restify@5 * feat: support restify@7 * feat: support restify@8 * test: cleanup * test: anyfy arguments on the anonymous handler * chore: add tav + update supported versions * fix: turn off tests on node@18 which is not supported for restify * refactor: remove the import to after setting up instrumentation Co-authored-by: jscherer92 <jscherer92@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Short description of the changes