Skip to content
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

feat(core)!: remove depreacted IdGenerator and RandomIdGenerator #5309

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

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

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
Loading