diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 881b34576a8..051c0595536 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -10,6 +10,18 @@ All notable changes to experimental packages in this project will be documented ### :rocket: (Enhancement) * feat(opentelemetry-sdk-node): automatically configure metrics exporter based on environment variables [#5168](https://github.com/open-telemetry/opentelemetry-js/pull/5168) @bhaskarbanerjee +* feat(oltp-transformer)!: move each serializer to its own entrypoint [#5263](https://github.com/open-telemetry/opentelemetry-js/pull/5263) @pichlermarc + * This package depends on all signals, as well as `protobuf.js`, so some bundlers like rollup would issue warnings even if the user made a conscious decision to not use a protobuf exporter + * (user-facing) All types except for `ISerializer` were removed from the main entrypoint, to get previously exported types, use the following entrypoints + * `@opentelemetry/otlp-transformer/metrics`: metrics export service return types + * `@opentelemetry/otlp-transformer/metrics/json`: metrics json serializer + * `@opentelemetry/otlp-transformer/metrics/protobuf`: metrics protobuf serializer + * `@opentelemetry/otlp-transformer/trace`: trace export service return types + * `@opentelemetry/otlp-transformer/trace/trace`: trace json serializer + * `@opentelemetry/otlp-transformer/trace/protobuf`: trace protobuf serializer + * `@opentelemetry/otlp-transformer/logs`: logs export service return types + * `@opentelemetry/otlp-transformer/logs/trace`: logs export service return types + * `@opentelemetry/otlp-transformer/logs/protobuf`: logs export service return types ### :bug: (Bug Fix) diff --git a/experimental/packages/exporter-logs-otlp-grpc/src/OTLPLogExporter.ts b/experimental/packages/exporter-logs-otlp-grpc/src/OTLPLogExporter.ts index e7e883e1ea3..433ab76b85a 100644 --- a/experimental/packages/exporter-logs-otlp-grpc/src/OTLPLogExporter.ts +++ b/experimental/packages/exporter-logs-otlp-grpc/src/OTLPLogExporter.ts @@ -20,7 +20,7 @@ import { createOtlpGrpcExportDelegate, OTLPGRPCExporterConfigNode, } from '@opentelemetry/otlp-grpc-exporter-base'; -import { ProtobufLogsSerializer } from '@opentelemetry/otlp-transformer'; +import { ProtobufLogsSerializer } from '@opentelemetry/otlp-transformer/experimental/logs/protobuf'; import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base'; /** diff --git a/experimental/packages/exporter-logs-otlp-http/src/platform/browser/OTLPLogExporter.ts b/experimental/packages/exporter-logs-otlp-http/src/platform/browser/OTLPLogExporter.ts index 01a0d1f26a7..024256d840d 100644 --- a/experimental/packages/exporter-logs-otlp-http/src/platform/browser/OTLPLogExporter.ts +++ b/experimental/packages/exporter-logs-otlp-http/src/platform/browser/OTLPLogExporter.ts @@ -20,8 +20,8 @@ import type { } from '@opentelemetry/sdk-logs'; import type { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base'; import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base'; -import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer'; import { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http'; +import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer/experimental/logs/json'; /** * Collector Logs Exporter for Web diff --git a/experimental/packages/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts b/experimental/packages/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts index 28bb25319d6..40c0fd12cd9 100644 --- a/experimental/packages/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts +++ b/experimental/packages/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts @@ -20,7 +20,7 @@ import type { } from '@opentelemetry/sdk-logs'; import type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base'; import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base'; -import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer'; +import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer/experimental/logs/json'; import { VERSION } from '../../version'; import { convertLegacyHttpOptions, diff --git a/experimental/packages/exporter-logs-otlp-proto/src/platform/browser/OTLPLogExporter.ts b/experimental/packages/exporter-logs-otlp-proto/src/platform/browser/OTLPLogExporter.ts index 91293ce4730..19185f31cbf 100644 --- a/experimental/packages/exporter-logs-otlp-proto/src/platform/browser/OTLPLogExporter.ts +++ b/experimental/packages/exporter-logs-otlp-proto/src/platform/browser/OTLPLogExporter.ts @@ -18,7 +18,7 @@ import { OTLPExporterConfigBase, OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base'; -import { ProtobufLogsSerializer } from '@opentelemetry/otlp-transformer'; +import { ProtobufLogsSerializer } from '@opentelemetry/otlp-transformer/experimental/logs/protobuf'; import { ReadableLogRecord, LogRecordExporter } from '@opentelemetry/sdk-logs'; import { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http'; diff --git a/experimental/packages/exporter-logs-otlp-proto/src/platform/node/OTLPLogExporter.ts b/experimental/packages/exporter-logs-otlp-proto/src/platform/node/OTLPLogExporter.ts index 5afa6cb17a5..ec07f45a86e 100644 --- a/experimental/packages/exporter-logs-otlp-proto/src/platform/node/OTLPLogExporter.ts +++ b/experimental/packages/exporter-logs-otlp-proto/src/platform/node/OTLPLogExporter.ts @@ -18,7 +18,7 @@ import { OTLPExporterBase, OTLPExporterNodeConfigBase, } from '@opentelemetry/otlp-exporter-base'; -import { ProtobufLogsSerializer } from '@opentelemetry/otlp-transformer'; +import { ProtobufLogsSerializer } from '@opentelemetry/otlp-transformer/experimental/logs/protobuf'; import { convertLegacyHttpOptions, createOtlpHttpExportDelegate, diff --git a/experimental/packages/exporter-trace-otlp-grpc/src/OTLPTraceExporter.ts b/experimental/packages/exporter-trace-otlp-grpc/src/OTLPTraceExporter.ts index daca6f8987d..07fa578939f 100644 --- a/experimental/packages/exporter-trace-otlp-grpc/src/OTLPTraceExporter.ts +++ b/experimental/packages/exporter-trace-otlp-grpc/src/OTLPTraceExporter.ts @@ -20,7 +20,7 @@ import { createOtlpGrpcExportDelegate, OTLPGRPCExporterConfigNode, } from '@opentelemetry/otlp-grpc-exporter-base'; -import { ProtobufTraceSerializer } from '@opentelemetry/otlp-transformer'; +import { ProtobufTraceSerializer } from '@opentelemetry/otlp-transformer/trace/protobuf'; import { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base'; /** diff --git a/experimental/packages/exporter-trace-otlp-http/src/platform/browser/OTLPTraceExporter.ts b/experimental/packages/exporter-trace-otlp-http/src/platform/browser/OTLPTraceExporter.ts index 47dff844a06..baaebb25039 100644 --- a/experimental/packages/exporter-trace-otlp-http/src/platform/browser/OTLPTraceExporter.ts +++ b/experimental/packages/exporter-trace-otlp-http/src/platform/browser/OTLPTraceExporter.ts @@ -19,7 +19,7 @@ import { OTLPExporterConfigBase, OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base'; -import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer'; +import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer/trace/json'; import { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http'; /** diff --git a/experimental/packages/exporter-trace-otlp-http/src/platform/node/OTLPTraceExporter.ts b/experimental/packages/exporter-trace-otlp-http/src/platform/node/OTLPTraceExporter.ts index 9d8b4900a56..9d307db18a3 100644 --- a/experimental/packages/exporter-trace-otlp-http/src/platform/node/OTLPTraceExporter.ts +++ b/experimental/packages/exporter-trace-otlp-http/src/platform/node/OTLPTraceExporter.ts @@ -20,7 +20,7 @@ import { OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base'; import { VERSION } from '../../version'; -import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer'; +import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer/trace/json'; import { convertLegacyHttpOptions, createOtlpHttpExportDelegate, diff --git a/experimental/packages/exporter-trace-otlp-proto/src/platform/browser/OTLPTraceExporter.ts b/experimental/packages/exporter-trace-otlp-proto/src/platform/browser/OTLPTraceExporter.ts index 7292f6a6390..a5c47809c59 100644 --- a/experimental/packages/exporter-trace-otlp-proto/src/platform/browser/OTLPTraceExporter.ts +++ b/experimental/packages/exporter-trace-otlp-proto/src/platform/browser/OTLPTraceExporter.ts @@ -19,7 +19,7 @@ import { OTLPExporterConfigBase, OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base'; -import { ProtobufTraceSerializer } from '@opentelemetry/otlp-transformer'; +import { ProtobufTraceSerializer } from '@opentelemetry/otlp-transformer/trace/protobuf'; import { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http'; const DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces'; diff --git a/experimental/packages/exporter-trace-otlp-proto/src/platform/node/OTLPTraceExporter.ts b/experimental/packages/exporter-trace-otlp-proto/src/platform/node/OTLPTraceExporter.ts index f546fcb6437..6697b56f995 100644 --- a/experimental/packages/exporter-trace-otlp-proto/src/platform/node/OTLPTraceExporter.ts +++ b/experimental/packages/exporter-trace-otlp-proto/src/platform/node/OTLPTraceExporter.ts @@ -19,7 +19,7 @@ import { OTLPExporterNodeConfigBase, OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base'; -import { ProtobufTraceSerializer } from '@opentelemetry/otlp-transformer'; +import { ProtobufTraceSerializer } from '@opentelemetry/otlp-transformer/trace/protobuf'; import { VERSION } from '../../version'; import { createOtlpHttpExportDelegate, diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/src/OTLPMetricExporter.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/src/OTLPMetricExporter.ts index 074c5e5c63d..d8838f146d1 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/src/OTLPMetricExporter.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/src/OTLPMetricExporter.ts @@ -23,7 +23,7 @@ import { createOtlpGrpcExportDelegate, OTLPGRPCExporterConfigNode, } from '@opentelemetry/otlp-grpc-exporter-base'; -import { ProtobufMetricsSerializer } from '@opentelemetry/otlp-transformer'; +import { ProtobufMetricsSerializer } from '@opentelemetry/otlp-transformer/metrics/protobuf'; /** * OTLP-gRPC metric exporter diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/browser/OTLPMetricExporter.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/browser/OTLPMetricExporter.ts index 01a39a24795..d9a6155ccb5 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/browser/OTLPMetricExporter.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/browser/OTLPMetricExporter.ts @@ -17,7 +17,7 @@ import { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions'; import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase'; import { OTLPExporterConfigBase } from '@opentelemetry/otlp-exporter-base'; -import { JsonMetricsSerializer } from '@opentelemetry/otlp-transformer'; +import { JsonMetricsSerializer } from '@opentelemetry/otlp-transformer/metrics/json'; import { createLegacyOtlpBrowserExportDelegate } from '@opentelemetry/otlp-exporter-base/browser-http'; /** diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/node/OTLPMetricExporter.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/node/OTLPMetricExporter.ts index ae7ea320daf..fbdb369712a 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/node/OTLPMetricExporter.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/node/OTLPMetricExporter.ts @@ -17,7 +17,7 @@ import { OTLPMetricExporterOptions } from '../../OTLPMetricExporterOptions'; import { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase'; import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base'; -import { JsonMetricsSerializer } from '@opentelemetry/otlp-transformer'; +import { JsonMetricsSerializer } from '@opentelemetry/otlp-transformer/metrics/json'; import { VERSION } from '../../version'; import { convertLegacyHttpOptions, diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/src/OTLPMetricExporter.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/src/OTLPMetricExporter.ts index f2509dcedae..19479723279 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/src/OTLPMetricExporter.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/src/OTLPMetricExporter.ts @@ -17,7 +17,7 @@ import { OTLPMetricExporterOptions } from '@opentelemetry/exporter-metrics-otlp-http'; import { OTLPMetricExporterBase } from '@opentelemetry/exporter-metrics-otlp-http'; import { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base'; -import { ProtobufMetricsSerializer } from '@opentelemetry/otlp-transformer'; +import { ProtobufMetricsSerializer } from '@opentelemetry/otlp-transformer/metrics/protobuf'; import { VERSION } from './version'; import { convertLegacyHttpOptions, diff --git a/experimental/packages/otlp-exporter-base/test/common/logging-response-handler.test.ts b/experimental/packages/otlp-exporter-base/test/common/logging-response-handler.test.ts index 7ab8a6981d9..e79bf575416 100644 --- a/experimental/packages/otlp-exporter-base/test/common/logging-response-handler.test.ts +++ b/experimental/packages/otlp-exporter-base/test/common/logging-response-handler.test.ts @@ -15,7 +15,7 @@ */ import { createLoggingPartialSuccessResponseHandler } from '../../src/logging-response-handler'; import * as sinon from 'sinon'; -import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer'; +import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer/trace'; import { registerMockDiagLogger } from './test-utils'; describe('loggingResponseHandler', function () { diff --git a/experimental/packages/otlp-transformer/README.md b/experimental/packages/otlp-transformer/README.md index 9f592812baf..5c46929b029 100644 --- a/experimental/packages/otlp-transformer/README.md +++ b/experimental/packages/otlp-transformer/README.md @@ -19,43 +19,60 @@ To get started you will need to install a compatible OpenTelemetry API. npm install @opentelemetry/api ``` +### Experimental Features and Entrypoint + +This package is currently marked as experimental. New minor versions may include breaking changes, regardless of +the entrypoint used. Once the package is marked as stable, only the `experimental/` entrypoint will break in +minor versions of the package. If you use experimental features it is therefore recommended to pin the package or use +to depend on a tilde-version. + ### Serialize Traces/Metrics/Logs This module exports serializers to serialize traces, metrics and logs from the OpenTelemetry SDK into protocol buffers or JSON which can be sent over HTTP or gRPC (protobuf-only) to the OpenTelemetry collector or a compatible receiver. ```typescript -import { - JsonLogsSerializer, - JsonMetricsSerializer, - JsonTraceSerializer, - ProtobufLogsSerializer, - ProtobufMetricsSerializer, - ProtobufTraceSerializer, - IExportLogsServiceResponse, - IExportMetricsServiceResponse, - IExportTraceServiceResponse, -} from '@opentelemetry/otlp-transformer'; - -// serialize to JSON export requests -const serializedJsonLogs: Uint8Array = JsonLogsSerializer.serializeRequest(readableLogRecords); -const serializedJsonMetrics: Uint8Array = JsonMetricsSerializer.serializeRequest(resourceMetrics); -const serializedJsonTraces: Uint8Array = JsonTraceSerializer.serializeRequest(readableSpans); +// Logs (protobuf) - experimental +import { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer/experimental/logs'; +import { ProtobufLogsSerializer } from '@opentelemetry/otlp-transformer/experimental/logs/protobuf'; -// serialize to Protobuf export requests const serializedProtobufLogs: Uint8Array = ProtobufLogsSerializer.serializeRequest(readableLogRecords); -const serializedProtobufMetrics: Uint8Array = ProtobufMetricsSerializer.serializeRequest(resourceMetrics); -const serializedProtobufTraces: Uint8Array = ProtobufTraceSerializer.serializeRequest(readableSpans); +const deserializedProtobufLogResponse: IExportLogsServiceResponse = ProtobufLogsSerializer.deserializeResponse(protobufLogResponse); + +// Logs (json) - experimental +import { IExportLogsServiceResponse } from '@opentelemetry/otlp-transformer/experimental/logs'; +import { JsonLogsSerializer } from '@opentelemetry/otlp-transformer/experimental/logs/json'; -// deserialize JSON export responses +const serializedJsonLogs: Uint8Array = JsonLogsSerializer.serializeRequest(readableLogRecords); const deserializedJsonLogResponse: IExportLogsServiceResponse = JsonLogsSerializer.deserializeResponse(jsonLogResponse); -const deserializedJsonMetricsResponse: IExportMetricsServiceResponse = JsonMetricsSerializer.deserializeResponse(jsonMetricsResponse); -const deserializedJsonTraceResponse: IExportTraceServiceResponse = JsonTraceSerializer.deserializeResponse(jsonTraceResponse); -// deserialize Protobuf export responses -const deserializedProtobufLogResponse: IExportLogsServiceResponse = ProtobufLogsSerializer.deserializeResponse(protobufLogResponse); +// Metrics (protobuf) +import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer/metrics' +import { ProtobufMetricsSerializer } from '@opentelemetry/otlp-transformer/metrics/protobuf'; + +const serializedProtobufMetrics: Uint8Array = ProtobufMetricsSerializer.serializeRequest(resourceMetrics); const deserializedProtobufMetricsResponse: IExportMetricsServiceResponse = ProtobufMetricsSerializer.deserializeResponse(protobufMetricsResponse); + +// Metrics (json) +import { IExportMetricsServiceResponse } from '@opentelemetry/otlp-transformer/metrics' +import { JsonMetricsSerializer } from '@opentelemetry/otlp-transformer/metrics/json'; + +const serializedJsonMetrics: Uint8Array = JsonMetricsSerializer.serializeRequest(resourceMetrics); +const deserializedJsonMetricsResponse: IExportMetricsServiceResponse = JsonMetricsSerializer.deserializeResponse(jsonMetricsResponse); + +// Traces (protobuf) +import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer/trace' +import { ProtobufTraceSerializer } from '@opentelemetry/otlp-transformer/trace/protobuf'; + +const serializedProtobufTraces: Uint8Array = ProtobufTraceSerializer.serializeRequest(readableSpans); const deserializedProtobufTraceResponse: IExportTraceServiceResponse = ProtobufTraceSerializer.deserializeResponse(protobufTraceResponse); + +// Traces (json) +import { IExportTraceServiceResponse } from '@opentelemetry/otlp-transformer/trace' +import { JsonTraceSerializer } from '@opentelemetry/otlp-transformer/trace/json'; + +const deserializedJsonTraceResponse: IExportTraceServiceResponse = JsonTraceSerializer.deserializeResponse(jsonTraceResponse); +const serializedJsonTraces: Uint8Array = JsonTraceSerializer.serializeRequest(readableSpans); ``` ## Useful links diff --git a/experimental/packages/otlp-transformer/package.json b/experimental/packages/otlp-transformer/package.json index a30da2fb32a..022cd674a23 100644 --- a/experimental/packages/otlp-transformer/package.json +++ b/experimental/packages/otlp-transformer/package.json @@ -10,6 +10,102 @@ "esnext": "build/esnext/index.js", "types": "build/src/index.d.ts", "main": "build/src/index.js", + "exports": { + ".": { + "module": "./build/esm/index.js", + "esnext": "./build/esnext/index.js", + "types": "./build/src/index.d.ts", + "default": "./build/src/index.js" + }, + "./metrics": { + "module": "./build/esm/metrics/index.js", + "esnext": "./build/esnext/metrics/index.js", + "types": "./build/src/metrics/index.d.ts", + "default": "./build/src/metrics/index.js" + }, + "./metrics/protobuf": { + "module": "./build/esm/metrics/protobuf/index.js", + "esnext": "./build/esnext/metrics/protobuf/index.js", + "types": "./build/src/metrics/protobuf/index.d.ts", + "default": "./build/src/metrics/protobuf/index.js" + }, + "./metrics/json": { + "module": "./build/esm/metrics/json/index.js", + "esnext": "./build/esnext/metrics/json/index.js", + "types": "./build/src/metrics/json/index.d.ts", + "default": "./build/src/metrics/json/index.js" + }, + "./trace": { + "module": "./build/esm/trace/index.js", + "esnext": "./build/esnext/trace/index.js", + "types": "./build/src/trace/index.d.ts", + "default": "./build/src/trace/index.js" + }, + "./trace/protobuf": { + "module": "./build/esm/trace/protobuf/index.js", + "esnext": "./build/esnext/trace/protobuf/index.js", + "types": "./build/src/trace/protobuf/index.d.ts", + "default": "./build/src/trace/protobuf/index.js" + }, + "./trace/json": { + "module": "./build/esm/trace/json/index.js", + "esnext": "./build/esnext/trace/json/index.js", + "types": "./build/src/trace/json/index.d.ts", + "default": "./build/src/trace/json/index.js" + }, + "./experimental/logs": { + "module": "./build/esm/logs/index.js", + "esnext": "./build/esnext/logs/index.js", + "types": "./build/src/logs/index.d.ts", + "default": "./build/src/logs/index.js" + }, + "./experimental/logs/protobuf": { + "module": "./build/esm/logs/protobuf/index.js", + "esnext": "./build/esnext/logs/protobuf/index.js", + "types": "./build/src/logs/protobuf/index.d.ts", + "default": "./build/src/logs/protobuf/index.js" + }, + "./experimental/logs/json": { + "module": "./build/esm/logs/json/index.js", + "esnext": "./build/esnext/logs/json/index.js", + "types": "./build/src/logs/json/index.d.ts", + "default": "./build/src/logs/json/index.js" + } + }, + "typesVersions": { + "*": { + "*": [ + "./build/src/index.d.ts" + ], + "metrics": [ + "./build/src/metrics/index.d.ts" + ], + "metrics/protobuf": [ + "./build/src/metrics/protobuf/index.d.ts" + ], + "metrics/json": [ + "./build/src/metrics/json/index.d.ts" + ], + "trace": [ + "./build/src/trace/index.d.ts" + ], + "trace/protobuf": [ + "./build/src/trace/protobuf/index.d.ts" + ], + "trace/json": [ + "./build/src/trace/json/index.d.ts" + ], + "experimental/logs": [ + "./build/src/logs/index.d.ts" + ], + "experimental/logs/protobuf": [ + "./build/src/logs/protobuf/index.d.ts" + ], + "experimental/logs/json": [ + "./build/src/logs/json/index.d.ts" + ] + } + }, "repository": "open-telemetry/opentelemetry-js", "scripts": { "prepublishOnly": "npm run compile", diff --git a/experimental/packages/otlp-transformer/src/index.ts b/experimental/packages/otlp-transformer/src/index.ts index 8b5832d66a6..295f82781fb 100644 --- a/experimental/packages/otlp-transformer/src/index.ts +++ b/experimental/packages/otlp-transformer/src/index.ts @@ -14,22 +14,5 @@ * limitations under the License. */ -export { - IExportMetricsPartialSuccess, - IExportMetricsServiceResponse, -} from './metrics'; -export { - IExportTracePartialSuccess, - IExportTraceServiceResponse, -} from './trace'; -export { IExportLogsServiceResponse, IExportLogsPartialSuccess } from './logs'; - -export { ProtobufLogsSerializer } from './logs/protobuf'; -export { ProtobufMetricsSerializer } from './metrics/protobuf'; -export { ProtobufTraceSerializer } from './trace/protobuf'; - -export { JsonLogsSerializer } from './logs/json'; -export { JsonMetricsSerializer } from './metrics/json'; -export { JsonTraceSerializer } from './trace/json'; - +// IMPORTANT: exports added here are public export { ISerializer } from './i-serializer';