-
Notifications
You must be signed in to change notification settings - Fork 806
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(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used #4649
Merged
pichlermarc
merged 5 commits into
open-telemetry:main
from
dynatrace-oss-contrib:fix/core-env-polyfill
Apr 26, 2024
Merged
fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used #4649
pichlermarc
merged 5 commits into
open-telemetry:main
from
dynatrace-oss-contrib:fix/core-env-polyfill
Apr 26, 2024
Conversation
This file contains 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
…efaults() when a process polyfill is used
1 task
1 task
maryliag
approved these changes
Apr 19, 2024
trentm
approved these changes
Apr 23, 2024
pichlermarc
commented
Apr 26, 2024
pichlermarc
added a commit
to dynatrace-oss-contrib/opentelemetry-js
that referenced
this pull request
May 6, 2024
…efaults() when a process polyfill is used (open-telemetry#4649) * fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used * Update CHANGELOG.md
pichlermarc
added a commit
that referenced
this pull request
May 15, 2024
…ents (#4705) * fix(resources): prevent circular import (resource -> detector -> resource -> ...) (#4653) * fix(resources): prevent circular import (resource -> detector -> resource -> ...) * fixup! fix(resources): prevent circular import (resource -> detector -> resource -> ...) * fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used (#4649) * fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used * Update CHANGELOG.md * fix(deps): update dependency import-in-the-middle to v1.7.4 (#4667) * fix(exporter-metrics-otlp-grpc) Add explicit otlp-exporter-base depen… (#4678) * fix(exporter-metrics-otlp-grpc) Add explicit otlp-exporter-base dependency to exporter-metrics-otlp-grpc * Update CHANGELOG.md --------- Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com> * chore: sync package-lock.json, adapt changelog * chore: prepare release 1.24.1/0.51.1 * chore: adjust changelog * chore: sync package-lock.json --------- Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Aksel Allas <allasaksel@gmail.com>
Zirak
pushed a commit
to Zirak/opentelemetry-js
that referenced
this pull request
Sep 14, 2024
…efaults() when a process polyfill is used (open-telemetry#4649) * fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used * Update CHANGELOG.md
Zirak
pushed a commit
to Zirak/opentelemetry-js
that referenced
this pull request
Sep 14, 2024
…ents (open-telemetry#4705) * fix(resources): prevent circular import (resource -> detector -> resource -> ...) (open-telemetry#4653) * fix(resources): prevent circular import (resource -> detector -> resource -> ...) * fixup! fix(resources): prevent circular import (resource -> detector -> resource -> ...) * fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used (open-telemetry#4649) * fix(core): align inconsistent behavior of getEnv() and getEnvWithoutDefaults() when a process polyfill is used * Update CHANGELOG.md * fix(deps): update dependency import-in-the-middle to v1.7.4 (open-telemetry#4667) * fix(exporter-metrics-otlp-grpc) Add explicit otlp-exporter-base depen… (open-telemetry#4678) * fix(exporter-metrics-otlp-grpc) Add explicit otlp-exporter-base dependency to exporter-metrics-otlp-grpc * Update CHANGELOG.md --------- Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com> * chore: sync package-lock.json, adapt changelog * chore: prepare release 1.24.1/0.51.1 * chore: adjust changelog * chore: sync package-lock.json --------- Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Aksel Allas <allasaksel@gmail.com>
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?
When running in a Browser and a
process
polyfill is used, getEnv() and getEnvWithoutDefaults() behave in different ways.getEnvWithoutDefaults()
will use the polyfilledprocess.env
andgetEnv()
will use_globalThis
. This aligns the behavior of both.The inconsistent behavior can lead to results where span-limits are configured differently based on if a polyfill is used or not. I'm not sure if anyone is actually using environment configuration via
_globalThis
, though. It feels to me like using this would be a weird choice for configuring things.Enables #4648, where we have to use a process polyfill to update to
karma-webpack@5.0.1
Type of change
How Has This Been Tested?