From cc4923b697a2f3268a726a38d51a8951a9dced5a Mon Sep 17 00:00:00 2001 From: JamieDanielson Date: Fri, 5 Jan 2024 18:10:04 -0500 Subject: [PATCH] more updates to otel-core for esm --- packages/opentelemetry-core/src/index.ts | 1 + .../src/platform/browser/RandomIdGenerator.ts | 2 +- .../src/platform/browser/environment.ts | 4 ++-- .../src/platform/browser/hex-to-base64.ts | 2 +- .../src/platform/browser/index.ts | 14 +++++++------- .../src/platform/browser/sdk-info.ts | 2 +- .../src/platform/node/RandomIdGenerator.ts | 2 +- .../src/platform/node/environment.ts | 2 +- .../src/platform/node/hex-to-base64.ts | 2 +- .../opentelemetry-core/src/platform/node/index.ts | 14 +++++++------- .../src/platform/node/sdk-info.ts | 2 +- 11 files changed, 24 insertions(+), 23 deletions(-) diff --git a/packages/opentelemetry-core/src/index.ts b/packages/opentelemetry-core/src/index.ts index 552e88db28d..de735d46d01 100644 --- a/packages/opentelemetry-core/src/index.ts +++ b/packages/opentelemetry-core/src/index.ts @@ -24,6 +24,7 @@ export * from './common/types.js'; export * from './common/hex-to-binary.js'; export * from './ExportResult.js'; export * as baggageUtils from './baggage/utils.js'; +export * from './platform'; export * from './propagation/composite.js'; export * from './trace/W3CTraceContextPropagator.js'; export * from './trace/IdGenerator.js'; diff --git a/packages/opentelemetry-core/src/platform/browser/RandomIdGenerator.ts b/packages/opentelemetry-core/src/platform/browser/RandomIdGenerator.ts index 634ba0a32f1..d7809fa9dc1 100644 --- a/packages/opentelemetry-core/src/platform/browser/RandomIdGenerator.ts +++ b/packages/opentelemetry-core/src/platform/browser/RandomIdGenerator.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { IdGenerator } from '../../trace/IdGenerator'; +import { IdGenerator } from '../../trace/IdGenerator.js'; const SPAN_ID_BYTES = 8; const TRACE_ID_BYTES = 16; diff --git a/packages/opentelemetry-core/src/platform/browser/environment.ts b/packages/opentelemetry-core/src/platform/browser/environment.ts index 0c1409671b8..1704b32306d 100644 --- a/packages/opentelemetry-core/src/platform/browser/environment.ts +++ b/packages/opentelemetry-core/src/platform/browser/environment.ts @@ -19,8 +19,8 @@ import { ENVIRONMENT, RAW_ENVIRONMENT, parseEnvironment, -} from '../../utils/environment'; -import { _globalThis } from './globalThis'; +} from '../../utils/environment.js'; +import { _globalThis } from './globalThis.js'; /** * Gets the environment variables diff --git a/packages/opentelemetry-core/src/platform/browser/hex-to-base64.ts b/packages/opentelemetry-core/src/platform/browser/hex-to-base64.ts index dee61ec727d..4e07991285f 100644 --- a/packages/opentelemetry-core/src/platform/browser/hex-to-base64.ts +++ b/packages/opentelemetry-core/src/platform/browser/hex-to-base64.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { hexToBinary } from '../../common/hex-to-binary'; +import { hexToBinary } from '../../common/hex-to-binary.js'; export function hexToBase64(hexStr: string): string { return btoa(String.fromCharCode(...hexToBinary(hexStr))); diff --git a/packages/opentelemetry-core/src/platform/browser/index.ts b/packages/opentelemetry-core/src/platform/browser/index.ts index e2860192ef2..ae34e3b5bb9 100644 --- a/packages/opentelemetry-core/src/platform/browser/index.ts +++ b/packages/opentelemetry-core/src/platform/browser/index.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -export * from './environment'; -export * from './globalThis'; -export * from './hex-to-base64'; -export * from './RandomIdGenerator'; -export * from './performance'; -export * from './sdk-info'; -export * from './timer-util'; +export * from './environment.js'; +export * from './globalThis.js'; +export * from './hex-to-base64.js'; +export * from './RandomIdGenerator.js'; +export * from './performance.js'; +export * from './sdk-info.js'; +export * from './timer-util.js'; diff --git a/packages/opentelemetry-core/src/platform/browser/sdk-info.ts b/packages/opentelemetry-core/src/platform/browser/sdk-info.ts index b804cd3c852..7cf1b219a8e 100644 --- a/packages/opentelemetry-core/src/platform/browser/sdk-info.ts +++ b/packages/opentelemetry-core/src/platform/browser/sdk-info.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { VERSION } from '../../version'; +import { VERSION } from '../../version.js'; import { TelemetrySdkLanguageValues, SemanticResourceAttributes, diff --git a/packages/opentelemetry-core/src/platform/node/RandomIdGenerator.ts b/packages/opentelemetry-core/src/platform/node/RandomIdGenerator.ts index 34d4971e559..9b4cb40576e 100644 --- a/packages/opentelemetry-core/src/platform/node/RandomIdGenerator.ts +++ b/packages/opentelemetry-core/src/platform/node/RandomIdGenerator.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { IdGenerator } from '../../trace/IdGenerator'; +import { IdGenerator } from '../../trace/IdGenerator.js'; const SPAN_ID_BYTES = 8; const TRACE_ID_BYTES = 16; diff --git a/packages/opentelemetry-core/src/platform/node/environment.ts b/packages/opentelemetry-core/src/platform/node/environment.ts index 749633f08ba..fecd8040ccc 100644 --- a/packages/opentelemetry-core/src/platform/node/environment.ts +++ b/packages/opentelemetry-core/src/platform/node/environment.ts @@ -20,7 +20,7 @@ import { ENVIRONMENT, RAW_ENVIRONMENT, parseEnvironment, -} from '../../utils/environment'; +} from '../../utils/environment.js'; /** * Gets the environment variables diff --git a/packages/opentelemetry-core/src/platform/node/hex-to-base64.ts b/packages/opentelemetry-core/src/platform/node/hex-to-base64.ts index 7be359e6512..406565ebe7f 100644 --- a/packages/opentelemetry-core/src/platform/node/hex-to-base64.ts +++ b/packages/opentelemetry-core/src/platform/node/hex-to-base64.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { hexToBinary } from '../../common/hex-to-binary'; +import { hexToBinary } from '../../common/hex-to-binary.js'; export function hexToBase64(hexStr: string): string { return Buffer.from(hexToBinary(hexStr)).toString('base64'); diff --git a/packages/opentelemetry-core/src/platform/node/index.ts b/packages/opentelemetry-core/src/platform/node/index.ts index e2860192ef2..ae34e3b5bb9 100644 --- a/packages/opentelemetry-core/src/platform/node/index.ts +++ b/packages/opentelemetry-core/src/platform/node/index.ts @@ -14,10 +14,10 @@ * limitations under the License. */ -export * from './environment'; -export * from './globalThis'; -export * from './hex-to-base64'; -export * from './RandomIdGenerator'; -export * from './performance'; -export * from './sdk-info'; -export * from './timer-util'; +export * from './environment.js'; +export * from './globalThis.js'; +export * from './hex-to-base64.js'; +export * from './RandomIdGenerator.js'; +export * from './performance.js'; +export * from './sdk-info.js'; +export * from './timer-util.js'; diff --git a/packages/opentelemetry-core/src/platform/node/sdk-info.ts b/packages/opentelemetry-core/src/platform/node/sdk-info.ts index 6c7c4c5f02b..2dcd4031062 100644 --- a/packages/opentelemetry-core/src/platform/node/sdk-info.ts +++ b/packages/opentelemetry-core/src/platform/node/sdk-info.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { VERSION } from '../../version'; +import { VERSION } from '../../version.js'; import { TelemetrySdkLanguageValues, SemanticResourceAttributes,