From b5409d7acd919d73c4e87929c60300a7b90c91b3 Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Wed, 12 Jun 2024 20:48:44 +0200 Subject: [PATCH] refactor(otlp-transformer): use explicit exports (#4785) * refactor(otlp-transformer): use explicit exports * chore: add changelog entry * Update experimental/CHANGELOG.md * Update experimental/CHANGELOG.md --- experimental/CHANGELOG.md | 1 + .../packages/otlp-transformer/src/index.ts | 71 +++++++++++++++++-- 2 files changed, 66 insertions(+), 6 deletions(-) diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 4a2abad384..c46df852a2 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to experimental packages in this project will be documented ### :rocket: (Enhancement) * refactor(instrumentation-fetch): move fetch to use SEMATRR [#4632](https://github.com/open-telemetry/opentelemetry-js/pull/4632) +* refactor(otlp-transformer): use explicit exports [#4785](https://github.com/open-telemetry/opentelemetry-js/pull/4785) @pichlermarc ### :bug: (Bug Fix) diff --git a/experimental/packages/otlp-transformer/src/index.ts b/experimental/packages/otlp-transformer/src/index.ts index 66040a07c0..12c1cadc87 100644 --- a/experimental/packages/otlp-transformer/src/index.ts +++ b/experimental/packages/otlp-transformer/src/index.ts @@ -14,12 +14,71 @@ * limitations under the License. */ -export * from './common/types'; -export * from './common'; -export * from './metrics/types'; -export * from './resource/types'; -export * from './trace/types'; -export * from './logs/types'; +export { + OtlpEncodingOptions, + IKeyValueList, + IKeyValue, + IInstrumentationScope, + IArrayValue, + LongBits, + IAnyValue, + Fixed64, +} from './common/types'; +export { + SpanContextEncodeFunction, + toLongBits, + OptionalSpanContextEncodeFunction, + getOtlpEncoder, + Encoder, + HrTimeEncodeFunction, + encodeAsLongBits, + encodeAsString, + hrTimeToNanos, +} from './common'; +export { + IExportMetricsPartialSuccess, + IValueAtQuantile, + ISummaryDataPoint, + ISummary, + ISum, + IScopeMetrics, + IResourceMetrics, + INumberDataPoint, + IHistogramDataPoint, + IHistogram, + IExponentialHistogramDataPoint, + IExponentialHistogram, + IMetric, + IGauge, + IExemplar, + EAggregationTemporality, + IExportMetricsServiceRequest, + IExportMetricsServiceResponse, + IBuckets, +} from './metrics/types'; +export { IResource } from './resource/types'; +export { + IExportTracePartialSuccess, + IStatus, + EStatusCode, + ILink, + IEvent, + IScopeSpans, + ISpan, + IResourceSpans, + ESpanKind, + IExportTraceServiceResponse, + IExportTraceServiceRequest, +} from './trace/types'; +export { + IExportLogsServiceResponse, + IScopeLogs, + IExportLogsServiceRequest, + IResourceLogs, + ILogRecord, + IExportLogsPartialSuccess, + ESeverityNumber, +} from './logs/types'; export { createExportTraceServiceRequest } from './trace'; export { createExportMetricsServiceRequest } from './metrics';