diff --git a/packages/opentelemetry-core/test/baggage/W3CBaggagePropagator.test.ts b/packages/opentelemetry-core/test/baggage/W3CBaggagePropagator.test.ts index 801496513fa..50f110d74a7 100644 --- a/packages/opentelemetry-core/test/baggage/W3CBaggagePropagator.test.ts +++ b/packages/opentelemetry-core/test/baggage/W3CBaggagePropagator.test.ts @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - import { Baggage, BaggageEntry, @@ -22,10 +21,10 @@ import { propagation, baggageEntryMetadataFromString, } from '@opentelemetry/api'; +import { W3CBaggagePropagator } from '../../src/baggage/propagation/W3CBaggagePropagator.js'; +import { BAGGAGE_HEADER } from '../../src/baggage/constants.js'; import { ROOT_CONTEXT } from '@opentelemetry/api'; import * as assert from 'assert'; -import { W3CBaggagePropagator } from '../../src/baggage/propagation/W3CBaggagePropagator'; -import { BAGGAGE_HEADER } from '../../src/baggage/constants'; describe('W3CBaggagePropagator', () => { const httpBaggagePropagator = new W3CBaggagePropagator(); diff --git a/packages/opentelemetry-core/test/common/anchored-clock.test.ts b/packages/opentelemetry-core/test/common/anchored-clock.test.ts index 4c6aa2d1688..4975ff2a0db 100644 --- a/packages/opentelemetry-core/test/common/anchored-clock.test.ts +++ b/packages/opentelemetry-core/test/common/anchored-clock.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import assert = require('assert'); +import * as assert from 'assert'; import { AnchoredClock } from '../../src/common/anchored-clock.js'; import { otperformance } from '../../src/platform/node/performance.js'; diff --git a/packages/opentelemetry-core/test/common/attributes.test.ts b/packages/opentelemetry-core/test/common/attributes.test.ts index 8524135b187..c93901b7553 100644 --- a/packages/opentelemetry-core/test/common/attributes.test.ts +++ b/packages/opentelemetry-core/test/common/attributes.test.ts @@ -18,7 +18,7 @@ import * as assert from 'assert'; import { isAttributeValue, sanitizeAttributes, -} from '../../src/common/attributes'; +} from '../../src/common/attributes.js'; describe('attributes', () => { describe('#isAttributeValue', () => { diff --git a/packages/opentelemetry-core/test/common/global-error-handler.test.ts b/packages/opentelemetry-core/test/common/global-error-handler.test.ts index 9dcdb3036f3..34920c2a536 100644 --- a/packages/opentelemetry-core/test/common/global-error-handler.test.ts +++ b/packages/opentelemetry-core/test/common/global-error-handler.test.ts @@ -16,7 +16,10 @@ import * as assert from 'assert'; import * as sinon from 'sinon'; -import { globalErrorHandler, setGlobalErrorHandler } from '../../src'; +import { + globalErrorHandler, + setGlobalErrorHandler, +} from '../../src/common/global-error-handler.js'; import { Exception } from '@opentelemetry/api'; describe('globalErrorHandler', () => { diff --git a/packages/opentelemetry-core/test/common/logging-error-handler.test.ts b/packages/opentelemetry-core/test/common/logging-error-handler.test.ts index e89a69d0396..2026a876640 100644 --- a/packages/opentelemetry-core/test/common/logging-error-handler.test.ts +++ b/packages/opentelemetry-core/test/common/logging-error-handler.test.ts @@ -17,7 +17,8 @@ import { diag } from '@opentelemetry/api'; import * as assert from 'assert'; import * as sinon from 'sinon'; -import { ErrorHandler, loggingErrorHandler } from '../../src'; +import { loggingErrorHandler } from '../../src/common/logging-error-handler.js'; +import { ErrorHandler } from '../../src/common/types.js'; describe('loggingErrorHandler', () => { let handler: ErrorHandler; diff --git a/packages/opentelemetry-core/test/common/time.test.ts b/packages/opentelemetry-core/test/common/time.test.ts index bf691c70717..0a64be3f3d4 100644 --- a/packages/opentelemetry-core/test/common/time.test.ts +++ b/packages/opentelemetry-core/test/common/time.test.ts @@ -15,7 +15,7 @@ */ import * as assert from 'assert'; -import { otperformance as performance } from '../../src/platform'; +import { otperformance as performance } from '../../src/platform/node/performance.js'; import * as sinon from 'sinon'; import * as api from '@opentelemetry/api'; import { diff --git a/packages/opentelemetry-core/test/internal/exporter.test.ts b/packages/opentelemetry-core/test/internal/exporter.test.ts index 1ca256d659f..37abc7509e9 100644 --- a/packages/opentelemetry-core/test/internal/exporter.test.ts +++ b/packages/opentelemetry-core/test/internal/exporter.test.ts @@ -16,9 +16,9 @@ import * as assert from 'assert'; import * as sinon from 'sinon'; -import { ExportResult, ExportResultCode } from '../../src'; -import * as suppress from '../../src/trace/suppress-tracing'; -import { _export } from '../../src/internal/exporter'; +import { ExportResult, ExportResultCode } from '../../src/ExportResult.js'; +import * as suppress from '../../src/trace/suppress-tracing.js'; +import { _export } from '../../src/internal/exporter.js'; describe('exporter', () => { const sandbox = sinon.createSandbox(); diff --git a/packages/opentelemetry-core/test/internal/validators.test.ts b/packages/opentelemetry-core/test/internal/validators.test.ts index 58dc7b596d3..235b24ef6da 100644 --- a/packages/opentelemetry-core/test/internal/validators.test.ts +++ b/packages/opentelemetry-core/test/internal/validators.test.ts @@ -15,7 +15,7 @@ */ import * as assert from 'assert'; -import { validateKey, validateValue } from '../../src/internal/validators'; +import { validateKey, validateValue } from '../../src/internal/validators.js'; describe('validators', () => { describe('validateKey', () => { diff --git a/packages/opentelemetry-core/test/platform/RandomIdGenerator.test.ts b/packages/opentelemetry-core/test/platform/RandomIdGenerator.test.ts index 2400fa6ccca..e9255d98ec0 100644 --- a/packages/opentelemetry-core/test/platform/RandomIdGenerator.test.ts +++ b/packages/opentelemetry-core/test/platform/RandomIdGenerator.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import * as assert from 'assert'; -import { RandomIdGenerator } from '../../src/platform'; +import { RandomIdGenerator } from '../../src/platform/node/RandomIdGenerator.js'; const idGenerator = new RandomIdGenerator(); diff --git a/packages/opentelemetry-core/test/platform/hex-to-base64.test.ts b/packages/opentelemetry-core/test/platform/hex-to-base64.test.ts index 3249621072f..ec4284b956c 100644 --- a/packages/opentelemetry-core/test/platform/hex-to-base64.test.ts +++ b/packages/opentelemetry-core/test/platform/hex-to-base64.test.ts @@ -15,7 +15,7 @@ */ import * as assert from 'assert'; -import { hexToBase64 } from '../../src/platform'; +import { hexToBase64 } from '../../src/platform/node/hex-to-base64.js'; describe('hexToBase64', () => { it('convert hex to base64', () => { diff --git a/packages/opentelemetry-core/test/trace/AlwaysOffSampler.test.ts b/packages/opentelemetry-core/test/trace/AlwaysOffSampler.test.ts index bda93eddd38..98cbfecef73 100644 --- a/packages/opentelemetry-core/test/trace/AlwaysOffSampler.test.ts +++ b/packages/opentelemetry-core/test/trace/AlwaysOffSampler.test.ts @@ -15,7 +15,7 @@ */ import * as assert from 'assert'; import * as api from '@opentelemetry/api'; -import { AlwaysOffSampler } from '../../src/trace/sampler/AlwaysOffSampler'; +import { AlwaysOffSampler } from '../../src/trace/sampler/AlwaysOffSampler.js'; describe('AlwaysOffSampler', () => { it('should reflect sampler name', () => { diff --git a/packages/opentelemetry-core/test/trace/AlwaysOnSampler.test.ts b/packages/opentelemetry-core/test/trace/AlwaysOnSampler.test.ts index fce88b19bba..44828bfd048 100644 --- a/packages/opentelemetry-core/test/trace/AlwaysOnSampler.test.ts +++ b/packages/opentelemetry-core/test/trace/AlwaysOnSampler.test.ts @@ -15,7 +15,7 @@ */ import * as assert from 'assert'; import * as api from '@opentelemetry/api'; -import { AlwaysOnSampler } from '../../src/trace/sampler/AlwaysOnSampler'; +import { AlwaysOnSampler } from '../../src/trace/sampler/AlwaysOnSampler.js'; describe('AlwaysOnSampler', () => { it('should reflect sampler name', () => { diff --git a/packages/opentelemetry-core/test/trace/ParentBasedSampler.test.ts b/packages/opentelemetry-core/test/trace/ParentBasedSampler.test.ts index 828a32fa3ea..e350ea38aa9 100644 --- a/packages/opentelemetry-core/test/trace/ParentBasedSampler.test.ts +++ b/packages/opentelemetry-core/test/trace/ParentBasedSampler.test.ts @@ -15,11 +15,11 @@ */ import * as assert from 'assert'; import * as api from '@opentelemetry/api'; -import { AlwaysOnSampler } from '../../src/trace/sampler/AlwaysOnSampler'; -import { ParentBasedSampler } from '../../src/trace/sampler/ParentBasedSampler'; +import { AlwaysOnSampler } from '../../src/trace/sampler/AlwaysOnSampler.js'; +import { ParentBasedSampler } from '../../src/trace/sampler/ParentBasedSampler.js'; import { TraceFlags, SpanKind, trace } from '@opentelemetry/api'; -import { AlwaysOffSampler } from '../../src/trace/sampler/AlwaysOffSampler'; -import { TraceIdRatioBasedSampler } from '../../src'; +import { AlwaysOffSampler } from '../../src/trace/sampler/AlwaysOffSampler.js'; +import { TraceIdRatioBasedSampler } from '../../src/trace/sampler/TraceIdRatioBasedSampler.js'; const traceId = 'd4cda95b652f4a1592b449d5929fda1b'; const spanId = '6e0c63257de34c92'; diff --git a/packages/opentelemetry-core/test/trace/TraceIdRatioBasedSampler.test.ts b/packages/opentelemetry-core/test/trace/TraceIdRatioBasedSampler.test.ts index c94534c776f..8e2f6adeb50 100644 --- a/packages/opentelemetry-core/test/trace/TraceIdRatioBasedSampler.test.ts +++ b/packages/opentelemetry-core/test/trace/TraceIdRatioBasedSampler.test.ts @@ -16,7 +16,7 @@ import * as assert from 'assert'; import * as api from '@opentelemetry/api'; -import { TraceIdRatioBasedSampler } from '../../src/trace/sampler/TraceIdRatioBasedSampler'; +import { TraceIdRatioBasedSampler } from '../../src/trace/sampler/TraceIdRatioBasedSampler.js'; const spanContext = (traceId = '1') => ({ traceId, diff --git a/packages/opentelemetry-core/test/trace/W3CTraceContextPropagator.test.ts b/packages/opentelemetry-core/test/trace/W3CTraceContextPropagator.test.ts index 2df3395f50d..14e6ba4afea 100644 --- a/packages/opentelemetry-core/test/trace/W3CTraceContextPropagator.test.ts +++ b/packages/opentelemetry-core/test/trace/W3CTraceContextPropagator.test.ts @@ -29,9 +29,9 @@ import { W3CTraceContextPropagator, TRACE_PARENT_HEADER, TRACE_STATE_HEADER, -} from '../../src/trace/W3CTraceContextPropagator'; -import { suppressTracing } from '../../src/trace/suppress-tracing'; -import { TraceState } from '../../src/trace/TraceState'; +} from '../../src/trace/W3CTraceContextPropagator.js'; +import { suppressTracing } from '../../src/trace/suppress-tracing.js'; +import { TraceState } from '../../src/trace/TraceState.js'; describe('W3CTraceContextPropagator', () => { const httpTraceContext = new W3CTraceContextPropagator(); diff --git a/packages/opentelemetry-core/test/trace/tracestate.test.ts b/packages/opentelemetry-core/test/trace/tracestate.test.ts index 8f4e8501999..9e3500143f7 100644 --- a/packages/opentelemetry-core/test/trace/tracestate.test.ts +++ b/packages/opentelemetry-core/test/trace/tracestate.test.ts @@ -15,7 +15,7 @@ */ import * as assert from 'assert'; -import { TraceState } from '../../src/trace/TraceState'; +import { TraceState } from '../../src/trace/TraceState.js'; describe('TraceState', () => { describe('.serialize()', () => { diff --git a/packages/opentelemetry-core/test/utils/callback.test.ts b/packages/opentelemetry-core/test/utils/callback.test.ts index 0acf2821e6a..0cdc07be393 100644 --- a/packages/opentelemetry-core/test/utils/callback.test.ts +++ b/packages/opentelemetry-core/test/utils/callback.test.ts @@ -16,8 +16,8 @@ import * as assert from 'assert'; import * as sinon from 'sinon'; -import { BindOnceFuture } from '../../src'; -import { assertRejects } from '../test-utils'; +import { BindOnceFuture } from '../../src/utils/callback.js'; +import { assertRejects } from '../test-utils.js'; describe('callback', () => { describe('BindOnceFuture', () => { diff --git a/packages/opentelemetry-core/test/utils/environment.test.ts b/packages/opentelemetry-core/test/utils/environment.test.ts index 8fa8b08f1e6..901f7f87fbb 100644 --- a/packages/opentelemetry-core/test/utils/environment.test.ts +++ b/packages/opentelemetry-core/test/utils/environment.test.ts @@ -14,16 +14,16 @@ * limitations under the License. */ -import { getEnv } from '../../src/platform'; +import { getEnv } from '../../src/platform/node/environment.js'; import { DEFAULT_ENVIRONMENT, ENVIRONMENT, RAW_ENVIRONMENT, -} from '../../src/utils/environment'; +} from '../../src/utils/environment.js'; import * as assert from 'assert'; import * as sinon from 'sinon'; import { DiagLogLevel } from '@opentelemetry/api'; -import { TracesSamplerValues } from '../../src'; +import { TracesSamplerValues } from '../../src/utils/sampling.js'; let lastMock: RAW_ENVIRONMENT = {}; diff --git a/packages/opentelemetry-core/test/utils/merge.test.ts b/packages/opentelemetry-core/test/utils/merge.test.ts index 56c08c83215..bbc26dc4dd4 100644 --- a/packages/opentelemetry-core/test/utils/merge.test.ts +++ b/packages/opentelemetry-core/test/utils/merge.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import * as assert from 'assert'; -import { merge } from '../../src/utils/merge'; +import { merge } from '../../src/utils/merge.js'; const tests: TestResult[] = []; diff --git a/packages/opentelemetry-core/test/utils/promise.test.ts b/packages/opentelemetry-core/test/utils/promise.test.ts index cf97fdf3b1b..1df5abdb68c 100644 --- a/packages/opentelemetry-core/test/utils/promise.test.ts +++ b/packages/opentelemetry-core/test/utils/promise.test.ts @@ -15,8 +15,8 @@ */ import * as assert from 'assert'; -import { Deferred } from '../../src/utils/promise'; -import { assertRejects } from '../test-utils'; +import { Deferred } from '../../src/utils/promise.js'; +import { assertRejects } from '../test-utils.js'; describe('promise', () => { describe('Deferred', () => { diff --git a/packages/opentelemetry-core/test/utils/url.test.ts b/packages/opentelemetry-core/test/utils/url.test.ts index 8855cff23c3..f1186e8b0a9 100644 --- a/packages/opentelemetry-core/test/utils/url.test.ts +++ b/packages/opentelemetry-core/test/utils/url.test.ts @@ -16,7 +16,7 @@ import * as assert from 'assert'; -import { isUrlIgnored } from '../../src'; +import { isUrlIgnored } from '../../src/utils/url.js'; const urlIgnored = 'url should be ignored'; const urlNotIgnored = 'url should NOT be ignored'; diff --git a/packages/opentelemetry-core/test/utils/wrap.test.ts b/packages/opentelemetry-core/test/utils/wrap.test.ts index 5c9b91f85de..c57fbc1a0b4 100644 --- a/packages/opentelemetry-core/test/utils/wrap.test.ts +++ b/packages/opentelemetry-core/test/utils/wrap.test.ts @@ -16,7 +16,8 @@ import * as assert from 'assert'; -import { isWrapped, ShimWrapped } from '../../src'; +import { isWrapped } from '../../src/utils/wrap.js'; +import { ShimWrapped } from '../../src/common/types.js'; function makeWrapped( wrapped: unknown,