From 59c5d5cb99afda992f8e1320e11a32551d3fa6b5 Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 21 May 2025 12:06:06 +0200 Subject: [PATCH 1/4] chore: set `isolatedModules` compilation option --- tsconfig.base.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.base.json b/tsconfig.base.json index e70510bbb7..32da32b4b4 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -8,6 +8,7 @@ "forceConsistentCasingInFileNames": true, "incremental": true, "inlineSources": true, + "isolatedModules": true, "module": "node16", "moduleResolution": "node16", "newLine": "LF", From beaaeefd0c1e6cd9c235800a283718a65f5c960b Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 21 May 2025 13:18:32 +0200 Subject: [PATCH 2/4] chore: set explicit exports --- .../src/detectors/index.ts | 2 +- .../src/index.ts | 2 +- .../src/index.ts | 4 ++-- .../auto-instrumentations-node/src/index.ts | 3 +-- .../auto-instrumentations-web/src/index.ts | 4 ++-- .../baggage-log-record-processor/src/index.ts | 3 ++- packages/baggage-span-processor/src/index.ts | 3 ++- .../opentelemetry-host-metrics/src/index.ts | 7 +++--- .../src/index.ts | 2 +- .../src/platform/browser/index.ts | 2 +- .../src/platform/index.ts | 2 +- .../src/platform/node/index.ts | 2 +- .../opentelemetry-test-utils/src/index.ts | 5 ++--- .../src/instrumentations/index.ts | 14 +++++++++--- .../node/instrumentation-amqplib/src/index.ts | 22 +++++++++++++++++-- .../instrumentation-cucumber/src/index.ts | 5 +++-- .../instrumentation-dataloader/src/index.ts | 4 ++-- plugins/node/instrumentation-fs/src/index.ts | 14 ++++++++++-- .../node/instrumentation-kafkajs/src/index.ts | 10 +++++++-- .../instrumentation-lru-memoizer/src/index.ts | 2 +- .../instrumentation-mongoose/src/index.ts | 10 +++++++-- .../instrumentation-runtime-node/src/index.ts | 4 ++-- .../instrumentation-socket.io/src/index.ts | 11 +++++++--- .../node/instrumentation-tedious/src/index.ts | 4 ++-- .../node/instrumentation-typeorm/src/index.ts | 9 ++++++-- .../src/utils/index.ts | 7 ++++-- .../node/instrumentation-undici/src/index.ts | 12 ++++++++-- .../src/index.ts | 12 ++++++++-- .../src/index.ts | 16 ++++++++++++-- .../src/index.ts | 6 ++--- .../src/index.ts | 10 +++++++-- .../src/index.ts | 8 +++++-- .../src/index.ts | 2 +- .../src/index.ts | 15 +++++++++---- .../src/index.ts | 14 +++++++++--- .../src/index.ts | 2 +- .../src/index.ts | 8 +++++-- .../src/index.ts | 4 ++-- .../src/index.ts | 11 ++++++++-- .../src/index.ts | 4 ++-- .../src/index.ts | 11 +++++++--- .../src/index.ts | 4 ++-- .../src/index.ts | 11 ++++++++-- .../src/index.ts | 4 ++-- .../src/index.ts | 8 +++++-- .../src/index.ts | 4 ++-- .../src/index.ts | 4 ++-- .../src/index.ts | 11 ++++++++-- .../src/index.ts | 12 +++++++--- .../src/index.ts | 4 ++-- .../src/index.ts | 8 +++++-- .../src/index.ts | 9 ++++++-- .../src/index.ts | 11 +++++++--- .../src/index.ts | 4 ++-- .../src/index.ts | 4 ++-- .../src/index.ts | 10 ++++++--- .../src/index.ts | 10 +++++++-- .../src/index.ts | 10 ++++++--- .../src/index.ts | 4 ++-- .../src/index.ts | 8 ++++++- 60 files changed, 311 insertions(+), 121 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-github/src/detectors/index.ts b/detectors/node/opentelemetry-resource-detector-github/src/detectors/index.ts index 1927c949d4..7a22440b66 100644 --- a/detectors/node/opentelemetry-resource-detector-github/src/detectors/index.ts +++ b/detectors/node/opentelemetry-resource-detector-github/src/detectors/index.ts @@ -13,4 +13,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './GitHubDetector'; +export { gitHubDetector } from './GitHubDetector'; diff --git a/detectors/node/opentelemetry-resource-detector-github/src/index.ts b/detectors/node/opentelemetry-resource-detector-github/src/index.ts index 9bfde8defd..7c42591dc4 100644 --- a/detectors/node/opentelemetry-resource-detector-github/src/index.ts +++ b/detectors/node/opentelemetry-resource-detector-github/src/index.ts @@ -13,4 +13,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './detectors'; +export { gitHubDetector } from './detectors'; diff --git a/incubator/opentelemetry-sampler-aws-xray/src/index.ts b/incubator/opentelemetry-sampler-aws-xray/src/index.ts index 7051864c14..b273f66917 100644 --- a/incubator/opentelemetry-sampler-aws-xray/src/index.ts +++ b/incubator/opentelemetry-sampler-aws-xray/src/index.ts @@ -13,5 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './remote-sampler'; -export { AWSXRayRemoteSamplerConfig } from './types'; +export { AWSXRayRemoteSampler, _AWSXRayRemoteSampler } from './remote-sampler'; +export type { AWSXRayRemoteSamplerConfig } from './types'; diff --git a/metapackages/auto-instrumentations-node/src/index.ts b/metapackages/auto-instrumentations-node/src/index.ts index 669066d0a9..8b5476fc98 100644 --- a/metapackages/auto-instrumentations-node/src/index.ts +++ b/metapackages/auto-instrumentations-node/src/index.ts @@ -13,9 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - export { getNodeAutoInstrumentations, getResourceDetectorsFromEnv as getResourceDetectors, - InstrumentationConfigMap, } from './utils'; +export type { InstrumentationConfigMap } from './utils'; diff --git a/metapackages/auto-instrumentations-web/src/index.ts b/metapackages/auto-instrumentations-web/src/index.ts index 65640412e6..aa59e0d9c7 100644 --- a/metapackages/auto-instrumentations-web/src/index.ts +++ b/metapackages/auto-instrumentations-web/src/index.ts @@ -13,5 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -export { getWebAutoInstrumentations, InstrumentationConfigMap } from './utils'; +export { getWebAutoInstrumentations } from './utils'; +export type { InstrumentationConfigMap } from './utils'; diff --git a/packages/baggage-log-record-processor/src/index.ts b/packages/baggage-log-record-processor/src/index.ts index afdea6c6f8..d9c06e9ac7 100644 --- a/packages/baggage-log-record-processor/src/index.ts +++ b/packages/baggage-log-record-processor/src/index.ts @@ -15,4 +15,5 @@ */ export { BaggageLogRecordProcessor } from './baggage-log-record-processor'; -export { ALLOW_ALL_BAGGAGE_KEYS, BaggageKeyPredicate } from './types'; +export { ALLOW_ALL_BAGGAGE_KEYS } from './types'; +export type { BaggageKeyPredicate } from './types'; diff --git a/packages/baggage-span-processor/src/index.ts b/packages/baggage-span-processor/src/index.ts index 2faf967b81..9b93c247a2 100644 --- a/packages/baggage-span-processor/src/index.ts +++ b/packages/baggage-span-processor/src/index.ts @@ -15,4 +15,5 @@ */ export { BaggageSpanProcessor } from './baggage-span-processor'; -export { ALLOW_ALL_BAGGAGE_KEYS, BaggageKeyPredicate } from './types'; +export { ALLOW_ALL_BAGGAGE_KEYS } from './types'; +export type { BaggageKeyPredicate } from './types'; diff --git a/packages/opentelemetry-host-metrics/src/index.ts b/packages/opentelemetry-host-metrics/src/index.ts index 4554d5dbfa..66b4e8cede 100644 --- a/packages/opentelemetry-host-metrics/src/index.ts +++ b/packages/opentelemetry-host-metrics/src/index.ts @@ -14,6 +14,7 @@ * limitations under the License. */ -export * from './BaseMetrics'; -export * from './metric'; -export * from './types'; +export { BaseMetrics } from './BaseMetrics'; +export type { MetricsCollectorConfig } from './BaseMetrics'; +export { HostMetrics } from './metric'; +export type { CpuUsageData, MemoryData, ProcessCpuUsageData } from './types'; diff --git a/packages/opentelemetry-id-generator-aws-xray/src/index.ts b/packages/opentelemetry-id-generator-aws-xray/src/index.ts index e76b3a3593..f834004a9a 100644 --- a/packages/opentelemetry-id-generator-aws-xray/src/index.ts +++ b/packages/opentelemetry-id-generator-aws-xray/src/index.ts @@ -13,4 +13,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './platform'; +export { AWSXRayIdGenerator } from './platform'; diff --git a/packages/opentelemetry-id-generator-aws-xray/src/platform/browser/index.ts b/packages/opentelemetry-id-generator-aws-xray/src/platform/browser/index.ts index 2f90698a9e..85e49dcc8a 100644 --- a/packages/opentelemetry-id-generator-aws-xray/src/platform/browser/index.ts +++ b/packages/opentelemetry-id-generator-aws-xray/src/platform/browser/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './AWSXRayIdGenerator'; +export { AWSXRayIdGenerator } from './AWSXRayIdGenerator'; diff --git a/packages/opentelemetry-id-generator-aws-xray/src/platform/index.ts b/packages/opentelemetry-id-generator-aws-xray/src/platform/index.ts index a12506ffa9..9850cae81a 100644 --- a/packages/opentelemetry-id-generator-aws-xray/src/platform/index.ts +++ b/packages/opentelemetry-id-generator-aws-xray/src/platform/index.ts @@ -13,4 +13,4 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './node'; +export { AWSXRayIdGenerator } from './node'; diff --git a/packages/opentelemetry-id-generator-aws-xray/src/platform/node/index.ts b/packages/opentelemetry-id-generator-aws-xray/src/platform/node/index.ts index 2f90698a9e..85e49dcc8a 100644 --- a/packages/opentelemetry-id-generator-aws-xray/src/platform/node/index.ts +++ b/packages/opentelemetry-id-generator-aws-xray/src/platform/node/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './AWSXRayIdGenerator'; +export { AWSXRayIdGenerator } from './AWSXRayIdGenerator'; diff --git a/packages/opentelemetry-test-utils/src/index.ts b/packages/opentelemetry-test-utils/src/index.ts index 3485a94b6e..6853e6970c 100644 --- a/packages/opentelemetry-test-utils/src/index.ts +++ b/packages/opentelemetry-test-utils/src/index.ts @@ -28,20 +28,19 @@ export { OtlpSpanKind } from './otlp-types'; export { createTestNodeSdk, runTestFixture, - TestSpan, - RunTestFixtureOptions, TestCollector, } from './test-fixtures'; +export type { TestSpan, RunTestFixtureOptions } from './test-fixtures'; export { assertPropagation, assertSpan, cleanUpDocker, getPackageVersion, initMeterProvider, - TimedEvent, startDocker, TestMetricReader, } from './test-utils'; +export type { TimedEvent } from './test-utils'; export { getInstrumentation, getTestMemoryExporter, diff --git a/packages/opentelemetry-test-utils/src/instrumentations/index.ts b/packages/opentelemetry-test-utils/src/instrumentations/index.ts index 6d457a3aa3..1272085f52 100644 --- a/packages/opentelemetry-test-utils/src/instrumentations/index.ts +++ b/packages/opentelemetry-test-utils/src/instrumentations/index.ts @@ -20,9 +20,17 @@ import { getInstrumentation } from './instrumentation-singleton'; import { registerInstrumentationTestingProvider } from './otel-default-provider'; import { resetMemoryExporter } from './otel-provider-api'; -export * from './instrumentation-singleton'; -export * from './otel-provider-api'; -export * from './otel-default-provider'; +export { + getInstrumentation, + registerInstrumentationTesting, +} from './instrumentation-singleton'; +export { + getTestMemoryExporter, + getTestSpans, + resetMemoryExporter, + setTestMemoryExporter, +} from './otel-provider-api'; +export { registerInstrumentationTestingProvider } from './otel-default-provider'; export const mochaHooks = { beforeAll(done: Function) { diff --git a/plugins/node/instrumentation-amqplib/src/index.ts b/plugins/node/instrumentation-amqplib/src/index.ts index 1fe4b66e4d..307d4207ab 100644 --- a/plugins/node/instrumentation-amqplib/src/index.ts +++ b/plugins/node/instrumentation-amqplib/src/index.ts @@ -13,5 +13,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './amqplib'; -export * from './types'; +export { AmqplibInstrumentation } from './amqplib'; +export { DEFAULT_CONFIG, EndOperation } from './types'; +export type { + AmqplibConsumeCustomAttributeFunction, + AmqplibConsumeEndCustomAttributeFunction, + AmqplibInstrumentationConfig, + AmqplibPublishConfirmCustomAttributeFunction, + AmqplibPublishCustomAttributeFunction, + AmqplibPublishOptions, + CommonMessageFields, + ConsumeEndInfo, + ConsumeInfo, + ConsumeMessage, + ConsumeMessageFields, + Message, + MessageFields, + MessageProperties, + PublishConfirmedInfo, + PublishInfo, +} from './types'; diff --git a/plugins/node/instrumentation-cucumber/src/index.ts b/plugins/node/instrumentation-cucumber/src/index.ts index c26f998cff..81bb35db65 100644 --- a/plugins/node/instrumentation-cucumber/src/index.ts +++ b/plugins/node/instrumentation-cucumber/src/index.ts @@ -14,5 +14,6 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { CucumberInstrumentation } from './instrumentation'; +export { AttributeNames } from './types'; +export type { CucumberInstrumentationConfig } from './types'; diff --git a/plugins/node/instrumentation-dataloader/src/index.ts b/plugins/node/instrumentation-dataloader/src/index.ts index a41cc4c8df..d6c7211efb 100644 --- a/plugins/node/instrumentation-dataloader/src/index.ts +++ b/plugins/node/instrumentation-dataloader/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './types'; -export * from './instrumentation'; +export { DataloaderInstrumentation } from './instrumentation'; +export type { DataloaderInstrumentationConfig } from './types'; diff --git a/plugins/node/instrumentation-fs/src/index.ts b/plugins/node/instrumentation-fs/src/index.ts index c26f998cff..95871af7ab 100644 --- a/plugins/node/instrumentation-fs/src/index.ts +++ b/plugins/node/instrumentation-fs/src/index.ts @@ -14,5 +14,15 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { FsInstrumentation } from './instrumentation'; +export type { + CreateHook, + EndHook, + FMember, + FPMember, + FsInstrumentationConfig, + FunctionProperties, + FunctionPropertyNames, + FunctionPropertyNamesTwoLevels, + Member, +} from './types'; diff --git a/plugins/node/instrumentation-kafkajs/src/index.ts b/plugins/node/instrumentation-kafkajs/src/index.ts index 91c7641c95..38e13d3c75 100644 --- a/plugins/node/instrumentation-kafkajs/src/index.ts +++ b/plugins/node/instrumentation-kafkajs/src/index.ts @@ -14,5 +14,11 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { KafkaJsInstrumentation } from './instrumentation'; +export type { + KafkaConsumerCustomAttributeFunction, + KafkaJsInstrumentationConfig, + KafkaProducerCustomAttributeFunction, + KafkajsMessage, + MessageInfo, +} from './types'; diff --git a/plugins/node/instrumentation-lru-memoizer/src/index.ts b/plugins/node/instrumentation-lru-memoizer/src/index.ts index 24c76056a1..02c90b5f15 100644 --- a/plugins/node/instrumentation-lru-memoizer/src/index.ts +++ b/plugins/node/instrumentation-lru-memoizer/src/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './instrumentation'; +export { LruMemoizerInstrumentation } from './instrumentation'; diff --git a/plugins/node/instrumentation-mongoose/src/index.ts b/plugins/node/instrumentation-mongoose/src/index.ts index 5a9c213a2b..298c678a9e 100644 --- a/plugins/node/instrumentation-mongoose/src/index.ts +++ b/plugins/node/instrumentation-mongoose/src/index.ts @@ -13,5 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './mongoose'; -export * from './types'; +export { MongooseInstrumentation } from './mongoose'; +export type { + DbStatementSerializer, + MongooseInstrumentationConfig, + MongooseResponseCustomAttributesFunction, + ResponseInfo, + SerializerPayload, +} from './types'; diff --git a/plugins/node/instrumentation-runtime-node/src/index.ts b/plugins/node/instrumentation-runtime-node/src/index.ts index c26f998cff..4e7805fb2d 100644 --- a/plugins/node/instrumentation-runtime-node/src/index.ts +++ b/plugins/node/instrumentation-runtime-node/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { RuntimeNodeInstrumentation } from './instrumentation'; +export type { RuntimeNodeInstrumentationConfig } from './types'; diff --git a/plugins/node/instrumentation-socket.io/src/index.ts b/plugins/node/instrumentation-socket.io/src/index.ts index c32b37405f..574e2c2f50 100644 --- a/plugins/node/instrumentation-socket.io/src/index.ts +++ b/plugins/node/instrumentation-socket.io/src/index.ts @@ -13,6 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './socket.io'; -export * from './types'; -export * from './AttributeNames'; +export { SocketIoInstrumentation } from './socket.io'; +export { SocketIoInstrumentationAttributes } from './AttributeNames'; +export { defaultSocketIoPath } from './types'; +export type { + SocketIoHookFunction, + SocketIoHookInfo, + SocketIoInstrumentationConfig, +} from './types'; diff --git a/plugins/node/instrumentation-tedious/src/index.ts b/plugins/node/instrumentation-tedious/src/index.ts index c26f998cff..bd0c199a96 100644 --- a/plugins/node/instrumentation-tedious/src/index.ts +++ b/plugins/node/instrumentation-tedious/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { TediousInstrumentation } from './instrumentation'; +export type { TediousInstrumentationConfig } from './types'; diff --git a/plugins/node/instrumentation-typeorm/src/index.ts b/plugins/node/instrumentation-typeorm/src/index.ts index a0cf02263c..f533e779e4 100644 --- a/plugins/node/instrumentation-typeorm/src/index.ts +++ b/plugins/node/instrumentation-typeorm/src/index.ts @@ -13,5 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './typeorm'; -export * from './types'; +export { TypeormInstrumentation } from './typeorm'; +export { ExtendedDatabaseAttribute } from './types'; +export type { + HookInfo, + TypeormInstrumentationConfig, + TypeormResponseCustomAttributesFunction, +} from './types'; diff --git a/plugins/node/instrumentation-typeorm/src/utils/index.ts b/plugins/node/instrumentation-typeorm/src/utils/index.ts index 1667497fa2..424bd160f5 100644 --- a/plugins/node/instrumentation-typeorm/src/utils/index.ts +++ b/plugins/node/instrumentation-typeorm/src/utils/index.ts @@ -13,5 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './get-func-param-names'; -export * from './suppressTracing'; +export { getParamNames } from './get-func-param-names'; +export { + isTypeormInternalTracingSuppressed, + suppressTypeormInternalTracing, +} from './suppressTracing'; diff --git a/plugins/node/instrumentation-undici/src/index.ts b/plugins/node/instrumentation-undici/src/index.ts index 809207c6ce..942dd61bb7 100644 --- a/plugins/node/instrumentation-undici/src/index.ts +++ b/plugins/node/instrumentation-undici/src/index.ts @@ -14,5 +14,13 @@ * limitations under the License. */ -export * from './undici'; -export * from './types'; +export { UndiciInstrumentation } from './undici'; +export type { + IgnoreRequestFunction, + RequestHookFunction, + ResponseHookFunction, + StartSpanHookFunction, + UndiciInstrumentationConfig, + UndiciRequest, + UndiciResponse, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/index.ts b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/index.ts index c26f998cff..a20861f7f1 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/index.ts @@ -14,5 +14,13 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { + AwsLambdaInstrumentation, + lambdaMaxInitInMilliseconds, +} from './instrumentation'; +export type { + AwsLambdaInstrumentationConfig, + EventContextExtractor, + RequestHook, + ResponseHook, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/index.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/index.ts index 2abc3b4f7a..410c1c393d 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/index.ts @@ -13,5 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './aws-sdk'; -export * from './types'; +export { AwsInstrumentation } from './aws-sdk'; +export type { + AwsSdkDynamoDBStatementSerializer, + AwsSdkInstrumentationConfig, + AwsSdkRequestCustomAttributeFunction, + AwsSdkRequestHookInformation, + AwsSdkResponseCustomAttributeFunction, + AwsSdkResponseHookInformation, + AwsSdkSqsProcessCustomAttributeFunction, + AwsSdkSqsProcessHookInformation, + CommandInput, + NormalizedRequest, + NormalizedResponse, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/src/index.ts b/plugins/node/opentelemetry-instrumentation-bunyan/src/index.ts index 2418a3b930..b7774fd26a 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-bunyan/src/index.ts @@ -14,6 +14,6 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; -export * from './OpenTelemetryBunyanStream'; +export { BunyanInstrumentation } from './instrumentation'; +export { OpenTelemetryBunyanStream } from './OpenTelemetryBunyanStream'; +export type { BunyanInstrumentationConfig, LogHookFunction } from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/src/index.ts b/plugins/node/opentelemetry-instrumentation-cassandra/src/index.ts index c26f998cff..829c598f77 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-cassandra/src/index.ts @@ -14,5 +14,11 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { CassandraDriverInstrumentation } from './instrumentation'; +export type { + CassandraDriverInstrumentationConfig, + CassandraDriverResponseCustomAttributeFunction, + ResponseHookInfo, + ResultSet, + Row, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-connect/src/index.ts b/plugins/node/opentelemetry-instrumentation-connect/src/index.ts index 34b600dd0c..af54d56297 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-connect/src/index.ts @@ -14,5 +14,9 @@ * limitations under the License. */ -export * from './enums/AttributeNames'; -export * from './instrumentation'; +export { ConnectInstrumentation, ANONYMOUS_NAME } from './instrumentation'; +export { + AttributeNames, + ConnectNames, + ConnectTypes, +} from './enums/AttributeNames'; diff --git a/plugins/node/opentelemetry-instrumentation-dns/src/index.ts b/plugins/node/opentelemetry-instrumentation-dns/src/index.ts index 4af26a8a72..d7eb3bd9c4 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-dns/src/index.ts @@ -15,4 +15,4 @@ */ export { DnsInstrumentation } from './instrumentation'; -export { DnsInstrumentationConfig, IgnoreMatcher } from './types'; +export type { DnsInstrumentationConfig, IgnoreMatcher } from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-express/src/index.ts b/plugins/node/opentelemetry-instrumentation-express/src/index.ts index 79da17f7d5..ba00aa66bc 100644 --- a/plugins/node/opentelemetry-instrumentation-express/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-express/src/index.ts @@ -14,7 +14,14 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './enums/ExpressLayerType'; -export * from './enums/AttributeNames'; -export * from './types'; +export { ExpressInstrumentation } from './instrumentation'; +export { ExpressLayerType } from './enums/ExpressLayerType'; +export { AttributeNames } from './enums/AttributeNames'; +export type { + ExpressInstrumentationConfig, + ExpressRequestCustomAttributeFunction, + ExpressRequestInfo, + IgnoreMatcher, + LayerPathSegment, + SpanNameHook, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-fastify/src/index.ts b/plugins/node/opentelemetry-instrumentation-fastify/src/index.ts index 958c8fef60..e4787dea25 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-fastify/src/index.ts @@ -14,6 +14,14 @@ * limitations under the License. */ -export * from './enums/AttributeNames'; -export * from './types'; -export * from './instrumentation'; +export { FastifyInstrumentation } from './instrumentation'; +export { + AttributeNames, + FastifyNames, + FastifyTypes, +} from './enums/AttributeNames'; +export type { + FastifyCustomAttributeFunction, + FastifyInstrumentationConfig, + FastifyRequestInfo, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/src/index.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/src/index.ts index 24c76056a1..7be22dd190 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/src/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './instrumentation'; +export { GenericPoolInstrumentation } from './instrumentation'; diff --git a/plugins/node/opentelemetry-instrumentation-graphql/src/index.ts b/plugins/node/opentelemetry-instrumentation-graphql/src/index.ts index c26f998cff..8538b451d6 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-graphql/src/index.ts @@ -14,5 +14,9 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { GraphQLInstrumentation } from './instrumentation'; +export type { + GraphQLInstrumentationConfig, + GraphQLInstrumentationExecutionResponseHook, + GraphQLInstrumentationParsedConfig, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-hapi/src/index.ts b/plugins/node/opentelemetry-instrumentation-hapi/src/index.ts index c464af622c..307f48d9fd 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './enums/AttributeNames'; +export { HapiInstrumentation } from './instrumentation'; +export { AttributeNames } from './enums/AttributeNames'; diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/src/index.ts b/plugins/node/opentelemetry-instrumentation-ioredis/src/index.ts index c26f998cff..595f05e0c4 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/src/index.ts @@ -14,5 +14,12 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { IORedisInstrumentation } from './instrumentation'; +export type { + CommandArgs, + DbStatementSerializer, + IORedisInstrumentationConfig, + IORedisRequestHookInformation, + RedisRequestCustomAttributeFunction, + RedisResponseCustomAttributeFunction, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-knex/src/index.ts b/plugins/node/opentelemetry-instrumentation-knex/src/index.ts index c26f998cff..5c047e2fe3 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { KnexInstrumentation } from './instrumentation'; +export type { KnexInstrumentationConfig } from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-koa/src/index.ts b/plugins/node/opentelemetry-instrumentation-koa/src/index.ts index 13de301c07..2b88a4fa2d 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-koa/src/index.ts @@ -14,6 +14,11 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; -export * from './enums/AttributeNames'; +export { KoaInstrumentation } from './instrumentation'; +export { AttributeNames } from './enums/AttributeNames'; +export type { + KoaInstrumentationConfig, + KoaLayerType, + KoaRequestCustomAttributeFunction, + KoaRequestInfo, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-memcached/src/index.ts b/plugins/node/opentelemetry-instrumentation-memcached/src/index.ts index c26f998cff..7a78b97b66 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { MemcachedInstrumentation } from './instrumentation'; +export type { InstrumentationConfig } from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/src/index.ts b/plugins/node/opentelemetry-instrumentation-mongodb/src/index.ts index c26f998cff..9f9af97343 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-mongodb/src/index.ts @@ -14,5 +14,12 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { MongoDBInstrumentation } from './instrumentation'; +export type { + CommandResult, + DbStatementSerializer, + MongoDBInstrumentationConfig, + MongoDBInstrumentationExecutionResponseHook, + MongoResponseHookInformation, + MongodbCommandType, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-mysql/src/index.ts b/plugins/node/opentelemetry-instrumentation-mysql/src/index.ts index c26f998cff..0fea37025d 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { MySQLInstrumentation } from './instrumentation'; +export type { MySQLInstrumentationConfig } from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/src/index.ts b/plugins/node/opentelemetry-instrumentation-mysql2/src/index.ts index c26f998cff..7547efd8f9 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/index.ts @@ -14,5 +14,9 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { MySQL2Instrumentation } from './instrumentation'; +export type { + MySQL2InstrumentationConfig, + MySQL2InstrumentationExecutionResponseHook, + MySQL2ResponseHookInformation, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/index.ts b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/index.ts index c464af622c..812058a1ca 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './enums/AttributeNames'; +export { NestInstrumentation } from './instrumentation'; +export { AttributeNames } from './enums/AttributeNames'; diff --git a/plugins/node/opentelemetry-instrumentation-net/src/index.ts b/plugins/node/opentelemetry-instrumentation-net/src/index.ts index c26f998cff..28a0a29574 100644 --- a/plugins/node/opentelemetry-instrumentation-net/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-net/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { NetInstrumentation } from './instrumentation'; +export type { TLSAttributes } from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-oracledb/src/index.ts b/plugins/node/opentelemetry-instrumentation-oracledb/src/index.ts index 198b2cd839..6647d46c48 100644 --- a/plugins/node/opentelemetry-instrumentation-oracledb/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-oracledb/src/index.ts @@ -16,5 +16,12 @@ * Copyright (c) 2025, Oracle and/or its affiliates. * */ -export * from './instrumentation'; -export * from './types'; +export { OracleInstrumentation } from './instrumentation'; +export type { + OracleInstrumentationConfig, + OracleInstrumentationExecutionRequestHook, + OracleInstrumentationExecutionResponseHook, + OracleRequestHookInformation, + OracleResponseHookInformation, + SpanConnectionConfig, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/index.ts b/plugins/node/opentelemetry-instrumentation-pg/src/index.ts index 13de301c07..ad0166be33 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/index.ts @@ -14,6 +14,12 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; -export * from './enums/AttributeNames'; +export { PgInstrumentation } from './instrumentation'; +export { AttributeNames } from './enums/AttributeNames'; +export type { + PgInstrumentationConfig, + PgInstrumentationExecutionRequestHook, + PgInstrumentationExecutionResponseHook, + PgRequestHookInformation, + PgResponseHookInformation, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-pino/src/index.ts b/plugins/node/opentelemetry-instrumentation-pino/src/index.ts index c26f998cff..f561731650 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-pino/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { PinoInstrumentation } from './instrumentation'; +export type { LogHookFunction, PinoInstrumentationConfig } from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/src/index.ts b/plugins/node/opentelemetry-instrumentation-redis-4/src/index.ts index c26f998cff..50c62a0ebc 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-redis-4/src/index.ts @@ -14,5 +14,9 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { RedisInstrumentation } from './instrumentation'; +export type { + DbStatementSerializer, + RedisInstrumentationConfig, + RedisResponseCustomAttributeFunction, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-redis/src/index.ts b/plugins/node/opentelemetry-instrumentation-redis/src/index.ts index c26f998cff..8aee6d3cd5 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/src/index.ts @@ -14,5 +14,10 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { RedisInstrumentation } from './instrumentation'; +export type { + DbStatementSerializer, + RedisCommand, + RedisInstrumentationConfig, + RedisResponseCustomAttributeFunction, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-restify/src/index.ts b/plugins/node/opentelemetry-instrumentation-restify/src/index.ts index 45cd8db559..4fd814211e 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/src/index.ts @@ -14,6 +14,11 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './enums/AttributeNames'; -export * from './types'; +export { RestifyInstrumentation } from './instrumentation'; +export { AttributeNames } from './enums/AttributeNames'; +export type { + LayerType, + RestifyCustomAttributeFunction, + RestifyInstrumentationConfig, + RestifyRequestInfo, +} from './types'; diff --git a/plugins/node/opentelemetry-instrumentation-router/src/index.ts b/plugins/node/opentelemetry-instrumentation-router/src/index.ts index c464af622c..eabf3927a8 100644 --- a/plugins/node/opentelemetry-instrumentation-router/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-router/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './enums/AttributeNames'; +export { RouterInstrumentation } from './instrumentation'; +export { AttributeNames } from './enums/AttributeNames'; diff --git a/plugins/node/opentelemetry-instrumentation-winston/src/index.ts b/plugins/node/opentelemetry-instrumentation-winston/src/index.ts index c26f998cff..e083cf8c70 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/src/index.ts +++ b/plugins/node/opentelemetry-instrumentation-winston/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { WinstonInstrumentation } from './instrumentation'; +export type { LogHookFunction, WinstonInstrumentationConfig } from './types'; diff --git a/plugins/web/opentelemetry-instrumentation-document-load/src/index.ts b/plugins/web/opentelemetry-instrumentation-document-load/src/index.ts index 45cd8db559..937706ab9c 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/src/index.ts +++ b/plugins/web/opentelemetry-instrumentation-document-load/src/index.ts @@ -14,6 +14,10 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './enums/AttributeNames'; -export * from './types'; +export { DocumentLoadInstrumentation } from './instrumentation'; +export { AttributeNames } from './enums/AttributeNames'; +export type { + DocumentLoadCustomAttributeFunction, + DocumentLoadInstrumentationConfig, + ResourceFetchCustomAttributeFunction, +} from './types'; diff --git a/plugins/web/opentelemetry-instrumentation-long-task/src/index.ts b/plugins/web/opentelemetry-instrumentation-long-task/src/index.ts index c26f998cff..ac0b01ab39 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/src/index.ts +++ b/plugins/web/opentelemetry-instrumentation-long-task/src/index.ts @@ -14,5 +14,11 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; +export { LongTaskInstrumentation } from './instrumentation'; +export type { + LongtaskInstrumentationConfig, + ObserverCallback, + ObserverCallbackInformation, + PerformanceLongTaskTiming, + TaskAttributionTiming, +} from './types'; diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/src/index.ts b/plugins/web/opentelemetry-instrumentation-user-interaction/src/index.ts index 13de301c07..2d0181f3d4 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/src/index.ts +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/src/index.ts @@ -14,6 +14,10 @@ * limitations under the License. */ -export * from './instrumentation'; -export * from './types'; -export * from './enums/AttributeNames'; +export { UserInteractionInstrumentation } from './instrumentation'; +export { AttributeNames } from './enums/AttributeNames'; +export type { + EventName, + ShouldPreventSpanCreation, + UserInteractionInstrumentationConfig, +} from './types'; diff --git a/plugins/web/opentelemetry-plugin-react-load/src/index.ts b/plugins/web/opentelemetry-plugin-react-load/src/index.ts index 5c898a23d4..41e77870db 100644 --- a/plugins/web/opentelemetry-plugin-react-load/src/index.ts +++ b/plugins/web/opentelemetry-plugin-react-load/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './BaseOpenTelemetryComponent'; -export * from './enums/AttributeNames'; +export { BaseOpenTelemetryComponent } from './BaseOpenTelemetryComponent'; +export { AttributeNames } from './enums/AttributeNames'; diff --git a/propagators/opentelemetry-propagator-ot-trace/src/index.ts b/propagators/opentelemetry-propagator-ot-trace/src/index.ts index 116d438fa3..c348171323 100644 --- a/propagators/opentelemetry-propagator-ot-trace/src/index.ts +++ b/propagators/opentelemetry-propagator-ot-trace/src/index.ts @@ -14,4 +14,10 @@ * limitations under the License. */ -export * from './OTTracePropagator'; +export { + OTTracePropagator, + OT_BAGGAGE_PREFIX, + OT_SAMPLED_HEADER, + OT_SPAN_ID_HEADER, + OT_TRACE_ID_HEADER, +} from './OTTracePropagator'; From 08e5af2e1b78459289b6bec08c812b6bce30fc0e Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 21 May 2025 13:40:54 +0200 Subject: [PATCH 3/4] chore: add workflow log --- scripts/pr-labels-to-npm-workspace-args.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/pr-labels-to-npm-workspace-args.mjs b/scripts/pr-labels-to-npm-workspace-args.mjs index 500bdc1370..288a2689d5 100644 --- a/scripts/pr-labels-to-npm-workspace-args.mjs +++ b/scripts/pr-labels-to-npm-workspace-args.mjs @@ -8,6 +8,7 @@ const labels = JSON.parse(process.argv[2]); +console.error('process.argv', process.argv) console.error('Labels:', labels); const workspaces = labels From 06f8f2a787ab5c57590dd483a62248ed31b58cf0 Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 21 May 2025 13:42:05 +0200 Subject: [PATCH 4/4] chore: remove log --- scripts/pr-labels-to-npm-workspace-args.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/pr-labels-to-npm-workspace-args.mjs b/scripts/pr-labels-to-npm-workspace-args.mjs index 288a2689d5..500bdc1370 100644 --- a/scripts/pr-labels-to-npm-workspace-args.mjs +++ b/scripts/pr-labels-to-npm-workspace-args.mjs @@ -8,7 +8,6 @@ const labels = JSON.parse(process.argv[2]); -console.error('process.argv', process.argv) console.error('Labels:', labels); const workspaces = labels