Skip to content

Commit

Permalink
fixup! feat(resources)!: do not read environment variables from window
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc committed Feb 12, 2025
1 parent 7bf3d90 commit 8255f87
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se
* (user-facing): `baggageUtils.parsePairKeyValue` was an internal utility function that was unintentionally exported. It has been removed without replacement.
* (user-facing): `TimeOriginLegacy` has been removed without replacement.
* (user-facing): `isAttributeKey` was an internal utility function that was unintentionally exported. It has been removed without replacement.
* feat(resources)!: do not read environment variables from window in browsers [#5445](https://github.com/open-telemetry/opentelemetry-js/pull/5455) @pichlermarc
* (user-facing): all configuration previously possible via `window.OTEL_*` is now not supported anymore, please pass configuration options to constructors instead.
* Note: Node.js environment variable configuration continues to work as-is.

### :rocket: (Enhancement)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { envDetector } from '../../../src';
import { describeBrowser } from '../../util';
import { assertEmptyResource } from '../../util/resource-assertions';

describeBrowser('envDetector() on web browser', () => {
it('should return empty resource', async () => {
const resource = envDetector.detect();
assertEmptyResource(resource);
});
});

0 comments on commit 8255f87

Please sign in to comment.