Skip to content

Commit

Permalink
feat(core)!: remove depreacted IdGenerator and RandomIdGenerator (#5309)
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc authored Jan 10, 2025
1 parent d35fbab commit a37692a
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 208 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se
* refactor(sdk-trace-base)!: remove `new Span` constructor in favor of `Tracer.startSpan` API [#5048](https://github.com/open-telemetry/opentelemetry-js/pull/5048) @david-luna
* refactor(sdk-trace-base)!: remove `BasicTracerProvider.addSpanProcessor` API in favor of constructor options. [#5134](https://github.com/open-telemetry/opentelemetry-js/pull/5134) @david-luna
* refactor(sdk-trace-base)!: make `resource` property private in `BasicTracerProvider` and remove `getActiveSpanProcessor` API. [#5192](https://github.com/open-telemetry/opentelemetry-js/pull/5192) @david-luna
* feat(core)!: remove deprecated `IdGenerator` and `RandomIdGenerator` [#5309](https://github.com/open-telemetry/opentelemetry-js/pull/5309) @pichlermarc
* feat(core)!: remove deprecated type `InstrumentationLibrary` [#5308](https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
* (user-facing): please use equivalent type `InstrumentationScope` instead
* feat(sdk-trace-base)!: replace usages fo `InstrumentationLibrary` with `InstrumentationScope` [#5308](https://github.com/open-telemetry/opentelemetry-js/pull/5308) @pichlermarc
Expand Down
2 changes: 0 additions & 2 deletions packages/opentelemetry-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export const baggageUtils = {
parsePairKeyValue,
};
export {
RandomIdGenerator,
SDK_INFO,
_globalThis,
getEnv,
Expand All @@ -80,7 +79,6 @@ export {
W3CTraceContextPropagator,
parseTraceParent,
} from './trace/W3CTraceContextPropagator';
export { IdGenerator } from './trace/IdGenerator';
export {
RPCMetadata,
RPCType,
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/opentelemetry-core/src/platform/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
export { getEnvWithoutDefaults, getEnv } from './environment';
export { _globalThis } from './globalThis';
export { hexToBase64 } from './hex-to-base64';
export { RandomIdGenerator } from './RandomIdGenerator';
export { otperformance } from './performance';
export { SDK_INFO } from './sdk-info';
export { unrefTimer } from './timer-util';
1 change: 0 additions & 1 deletion packages/opentelemetry-core/src/platform/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/
export {
RandomIdGenerator,
SDK_INFO,
_globalThis,
getEnv,
Expand Down
58 changes: 0 additions & 58 deletions packages/opentelemetry-core/src/platform/node/RandomIdGenerator.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/opentelemetry-core/src/platform/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
export { getEnvWithoutDefaults, getEnv } from './environment';
export { _globalThis } from './globalThis';
export { hexToBase64 } from './hex-to-base64';
export { RandomIdGenerator } from './RandomIdGenerator';
export { otperformance } from './performance';
export { SDK_INFO } from './sdk-info';
export { unrefTimer } from './timer-util';
26 changes: 0 additions & 26 deletions packages/opentelemetry-core/src/trace/IdGenerator.ts

This file was deleted.

This file was deleted.

16 changes: 3 additions & 13 deletions packages/opentelemetry-core/test/propagation/composite.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ import {
} from '@opentelemetry/api';
import { Context, ROOT_CONTEXT } from '@opentelemetry/api';
import * as assert from 'assert';
import {
CompositePropagator,
W3CTraceContextPropagator,
RandomIdGenerator,
} from '../../src';
import { CompositePropagator, W3CTraceContextPropagator } from '../../src';
import {
TRACE_PARENT_HEADER,
TRACE_STATE_HEADER,
Expand All @@ -52,14 +48,8 @@ class DummyPropagator implements TextMapPropagator {
}

describe('Composite Propagator', () => {
let traceId: string;
let spanId: string;

beforeEach(() => {
const idGenerator = new RandomIdGenerator();
traceId = idGenerator.generateTraceId();
spanId = idGenerator.generateSpanId();
});
const traceId = 'd4cda95b652f4a1592b449d5929fda1b';
const spanId = '6e0c63257de34c92';

describe('inject', () => {
let carrier: { [key: string]: unknown };
Expand Down

0 comments on commit a37692a

Please sign in to comment.