Skip to content

Commit

Permalink
chore(deps): remove unused 'semver' deps from some packages (open-tel…
Browse files Browse the repository at this point in the history
  • Loading branch information
trentm authored Jan 9, 2025
1 parent 3b56060 commit 643f2bb
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 51 deletions.
2 changes: 1 addition & 1 deletion experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All notable changes to experimental packages in this project will be documented
* feat(exporter-prometheus)!: stop the using `type` field to enforce naming conventions [#5291](https://github.com/open-telemetry/opentelemetry-js/pull/5291) @chancancode
* Any non-monotonic sums will now be treated as counters and will therefore include the `_total` suffix.
* feat(shim-opencenus)!: stop mapping removed Instrument `type` to OpenTelemetry metrics [#5291](https://github.com/open-telemetry/opentelemetry-js/pull/5291) @chancancode
* The internal OpenTelemetry data model dropped the concept of instrument type on exported metrics, therefore mapping it is not necessary anymore.
* The internal OpenTelemetry data model dropped the concept of instrument type on exported metrics, therefore mapping it is not necessary anymore.
* feat(instrumentation-fetch)!: passthrough original response to `applyCustomAttributes` hook [#5281](https://github.com/open-telemetry/opentelemetry-js/pull/5281) @chancancode
* Previously, the fetch instrumentation code unconditionally clones every `fetch()` response in order to preserve the ability for the `applyCustomAttributes` hook to consume the response body. This is fundamentally unsound, as it forces the browser to buffer and retain the response body until it is fully received and read, which crates unnecessary memory pressure on large or long-running response streams. In extreme cases, this is effectively a memory leak and can cause the browser tab to crash. If your use case for `applyCustomAttributes` requires access to the response body, please chime in on [#5293](https://github.com/open-telemetry/opentelemetry-js/issues/5293).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,11 @@
"@protobuf-ts/runtime-rpc": "2.9.4",
"@types/mocha": "10.0.10",
"@types/node": "18.6.5",
"@types/semver": "7.5.8",
"@types/sinon": "17.0.3",
"cross-var": "1.1.0",
"lerna": "6.6.2",
"mocha": "10.8.2",
"nyc": "15.1.0",
"semver": "7.6.3",
"sinon": "15.1.2",
"typescript": "4.4.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"@types/mocha": "10.0.10",
"@types/node": "18.6.5",
"@types/request-promise-native": "1.0.21",
"@types/semver": "7.5.8",
"@types/sinon": "17.0.3",
"@types/superagent": "8.1.9",
"axios": "1.7.9",
Expand All @@ -78,8 +77,7 @@
"@opentelemetry/core": "1.30.0",
"@opentelemetry/instrumentation": "0.57.0",
"@opentelemetry/semantic-conventions": "1.28.0",
"forwarded-parse": "2.1.2",
"semver": "^7.5.2"
"forwarded-parse": "2.1.2"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http",
"sideEffects": false
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/opentelemetry-sdk-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Detect resources automatically from the environment using the default resource d

### contextManager

Use a custom context manager. Default: [AsyncHooksContextManager](../../../packages/opentelemetry-context-async-hooks/README.md)
Use a custom context manager. Default: [AsyncLocalStorageContextManager](../../../packages/opentelemetry-context-async-hooks/README.md)

### textMapPropagator

Expand Down
2 changes: 0 additions & 2 deletions experimental/packages/opentelemetry-sdk-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@
"@opentelemetry/exporter-jaeger": "1.30.0",
"@types/mocha": "10.0.10",
"@types/node": "18.6.5",
"@types/semver": "7.5.8",
"@types/sinon": "17.0.3",
"cross-var": "1.1.0",
"lerna": "6.6.2",
"mocha": "10.8.2",
"nyc": "15.1.0",
"semver": "7.6.3",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"typescript": "4.4.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import {
SpanProcessor,
} from '@opentelemetry/sdk-trace-base';
import * as assert from 'assert';
import * as semver from 'semver';
import * as Sinon from 'sinon';
import { NodeSDK } from '../src';
import { env } from 'process';
Expand Down Expand Up @@ -89,10 +88,6 @@ import {
} from '@opentelemetry/semantic-conventions';
import { ZipkinExporter } from '@opentelemetry/exporter-zipkin';

const DefaultContextManager = semver.gte(process.version, '14.8.0')
? AsyncLocalStorageContextManager
: AsyncHooksContextManager;

describe('Node SDK', () => {
let ctxManager: any;
let propagator: any;
Expand Down Expand Up @@ -257,7 +252,7 @@ describe('Node SDK', () => {

assert.ok(
context['_getContextManager']().constructor.name ===
DefaultContextManager.name
AsyncLocalStorageContextManager.name
);
assert.ok(
propagation['_getGlobalPropagator']() instanceof CompositePropagator
Expand Down
3 changes: 1 addition & 2 deletions experimental/packages/shim-opencensus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
"@opentelemetry/core": "1.30.0",
"@opentelemetry/resources": "1.30.0",
"@opentelemetry/sdk-metrics": "1.30.0",
"require-in-the-middle": "^7.1.1",
"semver": "^7.5.2"
"require-in-the-middle": "^7.1.1"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/shim-opencensus",
"sideEffects": false
Expand Down
44 changes: 13 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions packages/opentelemetry-sdk-trace-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@opentelemetry/semantic-conventions": "1.28.0",
"@types/mocha": "10.0.10",
"@types/node": "18.6.5",
"@types/semver": "7.5.8",
"@types/sinon": "17.0.3",
"cross-var": "1.1.0",
"lerna": "6.6.2",
Expand All @@ -67,8 +66,7 @@
"@opentelemetry/core": "1.30.0",
"@opentelemetry/propagator-b3": "1.30.0",
"@opentelemetry/propagator-jaeger": "1.30.0",
"@opentelemetry/sdk-trace-base": "1.30.0",
"semver": "^7.5.2"
"@opentelemetry/sdk-trace-base": "1.30.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node",
"sideEffects": false
Expand Down

0 comments on commit 643f2bb

Please sign in to comment.