refactor: remove "export *" in favor of explicit named exports (#4880)

Co-authored-by: Jamie Danielson <jamieedanielson@gmail.com>
Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
This commit is contained in:
Robb Kidd 2024-08-09 06:42:38 -04:00 committed by GitHub
parent 5cc3dc28d7
commit cf8edbed43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
62 changed files with 521 additions and 133 deletions

View File

@ -27,6 +27,19 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/
### :house: (Internal)
* refactor: Simplify the code for the `getEnv` function [#4799](https://github.com/open-telemetry/opentelemetry-js/pull/4799) @danstarns
* refactor: remove "export *" in favor of explicit named exports [#4880](https://github.com/open-telemetry/opentelemetry-js/pull/4880) @robbkidd
* Packages updated:
* opentelemetry-context-zone
* opentelemetry-core
* opentelemetry-exporter-jaeger
* opentelemetry-exporter-zipkin
* opentelemetry-propagator-b3
* opentelemetry-propagator-jaeger
* opentelemetry-sdk-trace-base
* opentelemetry-sdk-trace-node
* opentelemetry-sdk-trace-web
* propagator-aws-xray
* sdk-metrics
## 1.25.1

View File

@ -15,6 +15,8 @@ All notable changes to this project will be documented in this file.
### :house: (Internal)
* refactor(api): remove "export *" in favor of explicit named exports [#4880](https://github.com/open-telemetry/opentelemetry-js/pull/4880) @robbkidd
## 1.9.0
### :rocket: (Enhancement)

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './globalThis';
export { _globalThis } from './globalThis';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './node';
export { _globalThis } from './node';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './globalThis';
export { _globalThis } from './globalThis';

View File

@ -55,6 +55,7 @@ module.exports = {
}
}],
"@typescript-eslint/no-shadow": ["warn"],
"no-restricted-syntax": ["error", "ExportAllDeclaration"],
"prefer-rest-params": "off",
}
},

View File

@ -31,6 +31,16 @@ All notable changes to experimental packages in this project will be documented
### :house: (Internal)
* refactor: Simplify the code for the `getEnv` function [#4799](https://github.com/open-telemetry/opentelemetry-js/pull/4799) @danstarns
* refactor: remove "export *" in favor of explicit named exports [#4880](https://github.com/open-telemetry/opentelemetry-js/pull/4880) @robbkidd
* Packages updated:
* api-events
* api-logs
* opentelemetry-browser-detector
* opentelemetry-exporter-prometheus
* opentelemetry-instrumentation-fetch
* opentelemetry-instrumentation-http
* opentelemetry-instrumentation-xml-http-request
* opentelemetry-instrumentation
## 0.52.1

View File

@ -14,10 +14,10 @@
* limitations under the License.
*/
export * from './types/EventLogger';
export * from './types/EventLoggerProvider';
export * from './types/Event';
export * from './types/EventLoggerOptions';
export { EventLogger } from './types/EventLogger';
export { EventLoggerProvider } from './types/EventLoggerProvider';
export { Event } from './types/Event';
export { EventLoggerOptions } from './types/EventLoggerOptions';
import { EventsAPI } from './api/events';
export const events = EventsAPI.getInstance();

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './globalThis';
export { _globalThis } from './globalThis';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './node';
export { _globalThis } from './node';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './globalThis';
export { _globalThis } from './globalThis';

View File

@ -14,13 +14,18 @@
* limitations under the License.
*/
export * from './types/Logger';
export * from './types/LoggerProvider';
export * from './types/LogRecord';
export * from './types/LoggerOptions';
export * from './types/AnyValue';
export * from './NoopLogger';
export * from './NoopLoggerProvider';
export { Logger } from './types/Logger';
export { LoggerProvider } from './types/LoggerProvider';
export {
LogAttributes,
LogBody,
LogRecord,
SeverityNumber,
} from './types/LogRecord';
export { LoggerOptions } from './types/LoggerOptions';
export { AnyValue, AnyValueMap } from './types/AnyValue';
export { NOOP_LOGGER, NoopLogger } from './NoopLogger';
export { NOOP_LOGGER_PROVIDER, NoopLoggerProvider } from './NoopLoggerProvider';
import { LogsAPI } from './api/logs';
export const logs = LogsAPI.getInstance();

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './globalThis';
export { _globalThis } from './globalThis';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './node';
export { _globalThis } from './node';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './globalThis';
export { _globalThis } from './globalThis';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './OTLPLogExporter';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './OTLPTraceExporter';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './platform';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './OTLPTraceExporter';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './node';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './OTLPTraceExporter';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './BrowserDetector';
export { browserDetector } from './BrowserDetector';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './OTLPMetricExporter';

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './platform';
export * from './OTLPMetricExporterOptions';
export * from './OTLPMetricExporterBase';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './OTLPMetricExporter';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './node';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './OTLPMetricExporter';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './OTLPMetricExporter';

View File

@ -14,6 +14,6 @@
* limitations under the License.
*/
export * from './PrometheusExporter';
export * from './PrometheusSerializer';
export * from './export/types';
export { PrometheusExporter } from './PrometheusExporter';
export { PrometheusSerializer } from './PrometheusSerializer';
export { ExporterConfig } from './export/types';

View File

@ -14,4 +14,8 @@
* limitations under the License.
*/
export * from './fetch';
export {
FetchCustomAttributeFunction,
FetchInstrumentation,
FetchInstrumentationConfig,
} from './fetch';

View File

@ -14,6 +14,49 @@
* limitations under the License.
*/
export * from './http';
export * from './types';
export * from './utils';
export { HttpInstrumentation } from './http';
export {
Err,
Func,
GetFunction,
Http,
HttpCallback,
HttpCallbackOptional,
HttpCustomAttributeFunction,
HttpInstrumentationConfig,
HttpRequestArgs,
HttpRequestCustomAttributeFunction,
HttpResponseCustomAttributeFunction,
Https,
IgnoreIncomingRequestFunction,
IgnoreMatcher,
IgnoreOutgoingRequestFunction,
ParsedRequestOptions,
RequestFunction,
RequestSignature,
StartIncomingSpanCustomAttributeFunction,
StartOutgoingSpanCustomAttributeFunction,
} from './types';
export {
extractHostnameAndPort,
getAbsoluteUrl,
getIncomingRequestAttributes,
getIncomingRequestAttributesOnResponse,
getIncomingRequestMetricAttributes,
getIncomingRequestMetricAttributesOnResponse,
getOutgoingRequestAttributes,
getOutgoingRequestAttributesOnResponse,
getOutgoingRequestMetricAttributes,
getOutgoingRequestMetricAttributesOnResponse,
getRequestInfo,
headerCapture,
isCompressed,
isIgnored,
isValidOptionsType,
parseResponseStatus,
satisfiesPattern,
setAttributesFromHttpKind,
setRequestContentLengthAttribute,
setResponseContentLengthAttribute,
setSpanWithError,
} from './utils';

View File

@ -14,4 +14,8 @@
* limitations under the License.
*/
export * from './xhr';
export {
XHRCustomAttributeFunction,
XMLHttpRequestInstrumentation,
XMLHttpRequestInstrumentationConfig,
} from './xhr';

View File

@ -18,6 +18,17 @@ export { registerInstrumentations } from './autoLoader';
export { InstrumentationBase } from './platform/index';
export { InstrumentationNodeModuleDefinition } from './instrumentationNodeModuleDefinition';
export { InstrumentationNodeModuleFile } from './instrumentationNodeModuleFile';
export * from './types';
export * from './types_internal';
export * from './utils';
export {
Instrumentation,
InstrumentationConfig,
InstrumentationModuleDefinition,
InstrumentationModuleFile,
ShimWrapped,
SpanCustomizationHook,
} from './types';
export { AutoLoaderOptions, AutoLoaderResult } from './types_internal';
export {
isWrapped,
safeExecuteInTheMiddle,
safeExecuteInTheMiddleAsync,
} from './utils';

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * as api from '@opentelemetry/api';
export * as contextBase from '@opentelemetry/api';
export * as core from '@opentelemetry/core';
@ -22,5 +25,5 @@ export * as metrics from '@opentelemetry/sdk-metrics';
export * as node from '@opentelemetry/sdk-trace-node';
export * as resources from '@opentelemetry/resources';
export * as tracing from '@opentelemetry/sdk-trace-base';
export * from './sdk';
export * from './types';
export { LoggerProviderConfig, MeterProviderConfig, NodeSDK } from './sdk';
export { NodeSDKConfiguration } from './types';

View File

@ -13,6 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-restricted-syntax: ["warn", "ExportAllDeclaration"] --
* TODO: Replace export * with named exports before next major version
*/
export * from './platform';
export { OTLPExporterBase } from './OTLPExporterBase';
export {

View File

@ -29,6 +29,7 @@
},
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/core": "^1.0.0",
"@types/mocha": "10.0.7",
"@types/node": "18.6.5",
"codecov": "3.8.3",

View File

@ -0,0 +1,38 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const assert = require('assert');
// TypeScript v4.4.4 doesn't support `node16` or `nodenext` in
// [Module Resolution](https://www.typescriptlang.org/tsconfig#moduleResolution)
// which is required for typescript to resolve the `package.json#exports`
// entries.
// Additionally, using `node16` or `nodenext` in `tsconfig.json#moduleResolution`
// requires the TypeScript to generate ESModule outputs. This is a breaking
// change for CJS users.
// So we have to use plain JavaScript to verity the `package.json#exports` here.
describe('@opentelemetry/core entries', () => {
it('should import baggage utils under named const', async () => {
const mod = await import('@opentelemetry/core');
assert.ok(mod.baggageUtils.getKeyPairs != null);
});
it('should require baggage utils under named const', () => {
const mod = require('@opentelemetry/core');
assert.ok(mod.baggageUtils.getKeyPairs != null);
});
});

2
package-lock.json generated
View File

@ -3991,6 +3991,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/core": "^1.0.0",
"@types/mocha": "10.0.7",
"@types/node": "18.6.5",
"codecov": "3.8.3",
@ -38999,6 +39000,7 @@
"version": "file:integration-tests/api",
"requires": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/core": "^1.0.0",
"@types/mocha": "10.0.7",
"@types/node": "18.6.5",
"codecov": "3.8.3",

View File

@ -14,5 +14,9 @@
* limitations under the License.
*/
export * from '@opentelemetry/context-zone-peer-dep';
export {
Func,
TargetWithEvents,
ZoneContextManager,
} from '@opentelemetry/context-zone-peer-dep';
import 'zone.js';

View File

@ -14,35 +14,108 @@
* limitations under the License.
*/
export * from './baggage/propagation/W3CBaggagePropagator';
export * from './common/anchored-clock';
export * from './common/attributes';
export * from './common/global-error-handler';
export * from './common/logging-error-handler';
export * from './common/time';
export * from './common/types';
export * from './common/hex-to-binary';
export * from './ExportResult';
export * as baggageUtils from './baggage/utils';
export * from './platform';
export * from './propagation/composite';
export * from './trace/W3CTraceContextPropagator';
export * from './trace/IdGenerator';
export * from './trace/rpc-metadata';
export * from './trace/sampler/AlwaysOffSampler';
export * from './trace/sampler/AlwaysOnSampler';
export * from './trace/sampler/ParentBasedSampler';
export * from './trace/sampler/TraceIdRatioBasedSampler';
export * from './trace/suppress-tracing';
export * from './trace/TraceState';
export * from './utils/environment';
export * from './utils/merge';
export * from './utils/sampling';
export * from './utils/timeout';
export * from './utils/url';
export * from './utils/wrap';
export * from './utils/callback';
export * from './version';
export { W3CBaggagePropagator } from './baggage/propagation/W3CBaggagePropagator';
export { AnchoredClock, Clock } from './common/anchored-clock';
export {
isAttributeKey,
isAttributeValue,
sanitizeAttributes,
} from './common/attributes';
export {
globalErrorHandler,
setGlobalErrorHandler,
} from './common/global-error-handler';
export { loggingErrorHandler } from './common/logging-error-handler';
export {
addHrTimes,
getTimeOrigin,
hrTime,
hrTimeDuration,
hrTimeToMicroseconds,
hrTimeToMilliseconds,
hrTimeToNanoseconds,
hrTimeToTimeStamp,
isTimeInput,
isTimeInputHrTime,
millisToHrTime,
timeInputToHrTime,
} from './common/time';
export {
ErrorHandler,
InstrumentationLibrary,
InstrumentationScope,
ShimWrapped,
TimeOriginLegacy,
} from './common/types';
export { hexToBinary } from './common/hex-to-binary';
export { ExportResult, ExportResultCode } from './ExportResult';
import {
getKeyPairs,
serializeKeyPairs,
parseKeyPairsIntoRecord,
parsePairKeyValue,
} from './baggage/utils';
export const baggageUtils = {
getKeyPairs,
serializeKeyPairs,
parseKeyPairsIntoRecord,
parsePairKeyValue,
};
export {
RandomIdGenerator,
SDK_INFO,
_globalThis,
getEnv,
getEnvWithoutDefaults,
hexToBase64,
otperformance,
unrefTimer,
} from './platform';
export {
CompositePropagator,
CompositePropagatorConfig,
} from './propagation/composite';
export {
TRACE_PARENT_HEADER,
TRACE_STATE_HEADER,
W3CTraceContextPropagator,
parseTraceParent,
} from './trace/W3CTraceContextPropagator';
export { IdGenerator } from './trace/IdGenerator';
export {
RPCMetadata,
RPCType,
deleteRPCMetadata,
getRPCMetadata,
setRPCMetadata,
} from './trace/rpc-metadata';
export { AlwaysOffSampler } from './trace/sampler/AlwaysOffSampler';
export { AlwaysOnSampler } from './trace/sampler/AlwaysOnSampler';
export { ParentBasedSampler } from './trace/sampler/ParentBasedSampler';
export { TraceIdRatioBasedSampler } from './trace/sampler/TraceIdRatioBasedSampler';
export {
isTracingSuppressed,
suppressTracing,
unsuppressTracing,
} from './trace/suppress-tracing';
export { TraceState } from './trace/TraceState';
export {
DEFAULT_ATTRIBUTE_COUNT_LIMIT,
DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,
DEFAULT_ENVIRONMENT,
DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,
DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,
ENVIRONMENT,
RAW_ENVIRONMENT,
parseEnvironment,
} from './utils/environment';
export { merge } from './utils/merge';
export { TracesSamplerValues } from './utils/sampling';
export { TimeoutError, callWithTimeout } from './utils/timeout';
export { isUrlIgnored, urlMatches } from './utils/url';
export { isWrapped } from './utils/wrap';
export { BindOnceFuture } from './utils/callback';
export { VERSION } from './version';
import { _export } from './internal/exporter';
export const internal = {
_export,

View File

@ -15,9 +15,9 @@
*/
export { getEnvWithoutDefaults, getEnv } 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 { _globalThis } from './globalThis';
export { hexToBase64 } from './hex-to-base64';
export { RandomIdGenerator } from './RandomIdGenerator';
export { otperformance } from './performance';
export { SDK_INFO } from './sdk-info';
export { unrefTimer } from './timer-util';

View File

@ -13,4 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './node';
export {
RandomIdGenerator,
SDK_INFO,
_globalThis,
getEnv,
getEnvWithoutDefaults,
hexToBase64,
otperformance,
unrefTimer,
} from './node';

View File

@ -15,9 +15,9 @@
*/
export { getEnvWithoutDefaults, getEnv } 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 { _globalThis } from './globalThis';
export { hexToBase64 } from './hex-to-base64';
export { RandomIdGenerator } from './RandomIdGenerator';
export { otperformance } from './performance';
export { SDK_INFO } from './sdk-info';
export { unrefTimer } from './timer-util';

View File

@ -14,5 +14,5 @@
* limitations under the License.
*/
export * from './jaeger';
export { JaegerExporter } from './jaeger';
export { ExporterConfig } from './types';

View File

@ -14,6 +14,6 @@
* limitations under the License.
*/
export * from './platform';
export { prepareSend } from './platform';
export { ExporterConfig } from './types';
export * from './zipkin';
export { ZipkinExporter } from './zipkin';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './util';
export { prepareSend } from './util';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './node';
export { prepareSend } from './node';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './util';
export { prepareSend } from './util';

View File

@ -14,6 +14,13 @@
* limitations under the License.
*/
export * from './B3Propagator';
export * from './constants';
export * from './types';
export { B3Propagator } from './B3Propagator';
export {
B3_CONTEXT_HEADER,
X_B3_FLAGS,
X_B3_PARENT_SPAN_ID,
X_B3_SAMPLED,
X_B3_SPAN_ID,
X_B3_TRACE_ID,
} from './constants';
export { B3InjectEncoding, B3PropagatorConfig } from './types';

View File

@ -14,4 +14,8 @@
* limitations under the License.
*/
export * from './JaegerPropagator';
export {
JaegerPropagator,
UBER_BAGGAGE_HEADER_PREFIX,
UBER_TRACE_ID_HEADER,
} from './JaegerPropagator';

View File

@ -14,22 +14,34 @@
* limitations under the License.
*/
export * from './Tracer';
export * from './BasicTracerProvider';
export * from './platform';
export * from './export/ConsoleSpanExporter';
export * from './export/InMemorySpanExporter';
export * from './export/ReadableSpan';
export * from './export/SimpleSpanProcessor';
export * from './export/SpanExporter';
export * from './export/NoopSpanProcessor';
export * from './sampler/AlwaysOffSampler';
export * from './sampler/AlwaysOnSampler';
export * from './sampler/ParentBasedSampler';
export * from './sampler/TraceIdRatioBasedSampler';
export * from './Sampler';
export * from './Span';
export * from './SpanProcessor';
export * from './TimedEvent';
export * from './types';
export * from './IdGenerator';
export { Tracer } from './Tracer';
export {
BasicTracerProvider,
EXPORTER_FACTORY,
ForceFlushState,
PROPAGATOR_FACTORY,
} from './BasicTracerProvider';
export { BatchSpanProcessor, RandomIdGenerator } from './platform';
export { ConsoleSpanExporter } from './export/ConsoleSpanExporter';
export { InMemorySpanExporter } from './export/InMemorySpanExporter';
export { ReadableSpan } from './export/ReadableSpan';
export { SimpleSpanProcessor } from './export/SimpleSpanProcessor';
export { SpanExporter } from './export/SpanExporter';
export { NoopSpanProcessor } from './export/NoopSpanProcessor';
export { AlwaysOffSampler } from './sampler/AlwaysOffSampler';
export { AlwaysOnSampler } from './sampler/AlwaysOnSampler';
export { ParentBasedSampler } from './sampler/ParentBasedSampler';
export { TraceIdRatioBasedSampler } from './sampler/TraceIdRatioBasedSampler';
export { Sampler, SamplingDecision, SamplingResult } from './Sampler';
export { Span } from './Span';
export { SpanProcessor } from './SpanProcessor';
export { TimedEvent } from './TimedEvent';
export {
BatchSpanProcessorBrowserConfig,
BufferConfig,
GeneralLimits,
SDKRegistrationConfig,
SpanLimits,
TracerConfig,
} from './types';
export { IdGenerator } from './IdGenerator';

View File

@ -14,5 +14,5 @@
* limitations under the License.
*/
export * from './export/BatchSpanProcessor';
export * from './RandomIdGenerator';
export { BatchSpanProcessor } from './export/BatchSpanProcessor';
export { RandomIdGenerator } from './RandomIdGenerator';

View File

@ -14,4 +14,4 @@
* limitations under the License.
*/
export * from './node';
export { BatchSpanProcessor, RandomIdGenerator } from './node';

View File

@ -14,5 +14,5 @@
* limitations under the License.
*/
export * from './export/BatchSpanProcessor';
export * from './RandomIdGenerator';
export { BatchSpanProcessor } from './export/BatchSpanProcessor';
export { RandomIdGenerator } from './RandomIdGenerator';

View File

@ -15,5 +15,36 @@
*/
export { NodeTracerConfig } from './config';
export * from './NodeTracerProvider';
export * from '@opentelemetry/sdk-trace-base';
export { NodeTracerProvider } from './NodeTracerProvider';
export {
AlwaysOffSampler,
AlwaysOnSampler,
BasicTracerProvider,
BatchSpanProcessor,
BatchSpanProcessorBrowserConfig,
BufferConfig,
ConsoleSpanExporter,
EXPORTER_FACTORY,
ForceFlushState,
GeneralLimits,
IdGenerator,
InMemorySpanExporter,
NoopSpanProcessor,
ParentBasedSampler,
PROPAGATOR_FACTORY,
RandomIdGenerator,
ReadableSpan,
Sampler,
SamplingDecision,
SamplingResult,
SDKRegistrationConfig,
SimpleSpanProcessor,
Span,
SpanExporter,
SpanLimits,
SpanProcessor,
TimedEvent,
TraceIdRatioBasedSampler,
Tracer,
TracerConfig,
} from '@opentelemetry/sdk-trace-base';

View File

@ -14,9 +14,56 @@
* limitations under the License.
*/
export * from './WebTracerProvider';
export * from './StackContextManager';
export * from './enums/PerformanceTimingNames';
export * from './types';
export * from './utils';
export * from '@opentelemetry/sdk-trace-base';
export { WebTracerConfig, WebTracerProvider } from './WebTracerProvider';
export { StackContextManager } from './StackContextManager';
export { PerformanceTimingNames } from './enums/PerformanceTimingNames';
export {
PerformanceEntries,
PerformanceLegacy,
PerformanceResourceTimingInfo,
PropagateTraceHeaderCorsUrls,
} from './types';
export {
URLLike,
addSpanNetworkEvent,
addSpanNetworkEvents,
getElementXPath,
getResource,
hasKey,
normalizeUrl,
parseUrl,
shouldPropagateTraceHeaders,
sortResources,
} from './utils';
export {
AlwaysOffSampler,
AlwaysOnSampler,
BasicTracerProvider,
BatchSpanProcessor,
BatchSpanProcessorBrowserConfig,
BufferConfig,
ConsoleSpanExporter,
EXPORTER_FACTORY,
ForceFlushState,
GeneralLimits,
IdGenerator,
InMemorySpanExporter,
NoopSpanProcessor,
ParentBasedSampler,
PROPAGATOR_FACTORY,
RandomIdGenerator,
ReadableSpan,
Sampler,
SamplingDecision,
SamplingResult,
SDKRegistrationConfig,
SimpleSpanProcessor,
Span,
SpanExporter,
SpanLimits,
SpanProcessor,
TimedEvent,
TraceIdRatioBasedSampler,
Tracer,
TracerConfig,
} from '@opentelemetry/sdk-trace-base';

View File

@ -14,6 +14,11 @@
* limitations under the License.
*/
/* eslint-disable no-restricted-syntax --
* These re-exports are only of constants, only two-levels deep, and
* should not cause problems for tree-shakers.
*/
// Deprecated. These are kept around for compatibility purposes
export * from './trace';
export * from './resource';

View File

@ -13,4 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-restricted-syntax --
* These re-exports are only of constants, only one-level deep at this point,
* and should not cause problems for tree-shakers.
*/
export * from './SemanticResourceAttributes';

View File

@ -13,4 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-restricted-syntax --
* These re-exports are only of constants, only one-level deep at this point,
* and should not cause problems for tree-shakers.
*/
export * from './SemanticAttributes';

View File

@ -14,4 +14,7 @@
* limitations under the License.
*/
export * from './AWSXRayPropagator';
export {
AWSXRAY_TRACE_ID_HEADER,
AWSXRayPropagator,
} from './AWSXRayPropagator';

View File

@ -14,9 +14,12 @@
* limitations under the License.
*/
export * from './Drop';
export * from './Histogram';
export * from './ExponentialHistogram';
export * from './LastValue';
export * from './Sum';
export { DropAggregator } from './Drop';
export { HistogramAccumulation, HistogramAggregator } from './Histogram';
export {
ExponentialHistogramAccumulation,
ExponentialHistogramAggregator,
} from './ExponentialHistogram';
export { LastValueAccumulation, LastValueAggregator } from './LastValue';
export { SumAccumulation, SumAggregator } from './Sum';
export { Aggregator } from './types';

View File

@ -14,11 +14,14 @@
* limitations under the License.
*/
export * from './Exemplar';
export * from './ExemplarFilter';
export * from './AlwaysSampleExemplarFilter';
export * from './NeverSampleExemplarFilter';
export * from './WithTraceExemplarFilter';
export * from './ExemplarReservoir';
export * from './AlignedHistogramBucketExemplarReservoir';
export * from './SimpleFixedSizeExemplarReservoir';
export { Exemplar } from './Exemplar';
export { ExemplarFilter } from './ExemplarFilter';
export { AlwaysSampleExemplarFilter } from './AlwaysSampleExemplarFilter';
export { NeverSampleExemplarFilter } from './NeverSampleExemplarFilter';
export { WithTraceExemplarFilter } from './WithTraceExemplarFilter';
export {
ExemplarReservoir,
FixedSizeExemplarReservoirBase,
} from './ExemplarReservoir';
export { AlignedHistogramBucketExemplarReservoir } from './AlignedHistogramBucketExemplarReservoir';
export { SimpleFixedSizeExemplarReservoir } from './SimpleFixedSizeExemplarReservoir';