Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2

### :house: Internal

* chore: enforce `import type` for type-only imports via ESLint [#6467](https://github.com/open-telemetry/opentelemetry-js/pull/6467) @overbalance

## 2.6.0

### :boom: Breaking Changes
Expand Down
1 change: 1 addition & 0 deletions api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.
* chore: disallow constructor parameter property syntax [#6187](https://github.com/open-telemetry/opentelemetry-js/pull/6187) @legendecas
* refactor(api): remove platform-specific globalThis, use globalThis directly [#6208](https://github.com/open-telemetry/opentelemetry-js/pull/6208) @overbalance
* chore(api): mark ProxyTracerProvider as deprecated [#6328](https://github.com/open-telemetry/opentelemetry-js/pull/6328) @cjihrig
* chore: enforce `import type` for type-only imports via ESLint [#6467](https://github.com/open-telemetry/opentelemetry-js/pull/6467) @overbalance

## 1.9.0

Expand Down
2 changes: 1 addition & 1 deletion api/src/api/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { NoopContextManager } from '../context/NoopContextManager';
import { Context, ContextManager } from '../context/types';
import type { Context, ContextManager } from '../context/types';
import {
getGlobal,
registerGlobal,
Expand Down
4 changes: 2 additions & 2 deletions api/src/api/diag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import { DiagComponentLogger } from '../diag/ComponentLogger';
import { createLogLevelDiagLogger } from '../diag/internal/logLevelLogger';
import {
import type {
ComponentLoggerOptions,
DiagLogFunction,
DiagLogger,
DiagLoggerApi,
DiagLogLevel,
} from '../diag/types';
import { DiagLogLevel } from '../diag/types';
import {
getGlobal,
registerGlobal,
Expand Down
4 changes: 2 additions & 2 deletions api/src/api/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Meter, MeterOptions } from '../metrics/Meter';
import { MeterProvider } from '../metrics/MeterProvider';
import type { Meter, MeterOptions } from '../metrics/Meter';
import type { MeterProvider } from '../metrics/MeterProvider';
Comment thread
overbalance marked this conversation as resolved.
import { NOOP_METER_PROVIDER } from '../metrics/NoopMeterProvider';
import {
getGlobal,
Expand Down
10 changes: 6 additions & 4 deletions api/src/api/propagation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Context } from '../context/types';
import type { Context } from '../context/types';
import {
getGlobal,
registerGlobal,
unregisterGlobal,
} from '../internal/global-utils';
import { NoopTextMapPropagator } from '../propagation/NoopTextMapPropagator';
import {
defaultTextMapGetter,
defaultTextMapSetter,
import type {
TextMapGetter,
TextMapPropagator,
TextMapSetter,
} from '../propagation/TextMapPropagator';
import {
defaultTextMapGetter,
defaultTextMapSetter,
} from '../propagation/TextMapPropagator';
import {
getBaggage,
getActiveBaggage,
Expand Down
4 changes: 2 additions & 2 deletions api/src/api/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
isSpanContextValid,
wrapSpanContext,
} from '../trace/spancontext-utils';
import { Tracer } from '../trace/tracer';
import { TracerProvider } from '../trace/tracer_provider';
import type { Tracer } from '../trace/tracer';
import type { TracerProvider } from '../trace/tracer_provider';
import {
deleteSpan,
getActiveSpan,
Expand Down
4 changes: 2 additions & 2 deletions api/src/baggage/context-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import { ContextAPI } from '../api/context';
import { createContextKey } from '../context/context';
import { Context } from '../context/types';
import { Baggage } from './types';
import type { Context } from '../context/types';
import type { Baggage } from './types';

/**
* Baggage key
Expand Down
2 changes: 1 addition & 1 deletion api/src/baggage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { baggageEntryMetadataSymbol } from './internal/symbol';
import type { baggageEntryMetadataSymbol } from './internal/symbol';

/*
* Copyright The OpenTelemetry Authors
Expand Down
2 changes: 1 addition & 1 deletion api/src/baggage/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { DiagAPI } from '../api/diag';
import { BaggageImpl } from './internal/baggage-impl';
import { baggageEntryMetadataSymbol } from './internal/symbol';
import { Baggage, BaggageEntry, BaggageEntryMetadata } from './types';
import type { Baggage, BaggageEntry, BaggageEntryMetadata } from './types';

const diag = DiagAPI.instance();

Expand Down
2 changes: 1 addition & 1 deletion api/src/context/NoopContextManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { ROOT_CONTEXT } from './context';
import * as types from './types';
import type * as types from './types';

export class NoopContextManager implements types.ContextManager {
active(): types.Context {
Expand Down
2 changes: 1 addition & 1 deletion api/src/context/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Context } from './types';
import type { Context } from './types';

/**
* Get a key to uniquely identify a context value
Expand Down
2 changes: 1 addition & 1 deletion api/src/diag/ComponentLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { getGlobal } from '../internal/global-utils';
import { ComponentLoggerOptions, DiagLogger } from './types';
import type { ComponentLoggerOptions, DiagLogger } from './types';

/**
* Component Logger which is meant to be used as part of any component which
Expand Down
2 changes: 1 addition & 1 deletion api/src/diag/consoleLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { DiagLogger, DiagLogFunction } from './types';
import type { DiagLogger, DiagLogFunction } from './types';

type ConsoleMapKeys = 'error' | 'warn' | 'info' | 'debug' | 'trace';
const consoleMap: { n: keyof DiagLogger; c: ConsoleMapKeys }[] = [
Expand Down
3 changes: 2 additions & 1 deletion api/src/diag/internal/logLevelLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { DiagLogFunction, DiagLogger, DiagLogLevel } from '../types';
import type { DiagLogFunction, DiagLogger } from '../types';
import { DiagLogLevel } from '../types';

export function createLogLevelDiagLogger(
maxLevel: DiagLogLevel,
Expand Down
2 changes: 1 addition & 1 deletion api/src/diag/internal/noopLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { DiagLogger } from '../types';
import type { DiagLogger } from '../types';

function noopLogFunction() {}

Expand Down
2 changes: 1 addition & 1 deletion api/src/experimental/trace/SugaredOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Span, SpanOptions } from '../../';
import type { Span, SpanOptions } from '../../';

/**
* Options needed for span creation
Expand Down
11 changes: 3 additions & 8 deletions api/src/experimental/trace/SugaredTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
import { SugaredSpanOptions } from './SugaredOptions';
import {
context as contextApi,
Context,
Span,
SpanStatusCode,
Tracer,
} from '../../';
import type { SugaredSpanOptions } from './SugaredOptions';
import type { Context, Span, Tracer } from '../../';
import { context as contextApi, SpanStatusCode } from '../../';

const defaultOnException = (e: Error, span: Span) => {
span.recordException(e);
Expand Down
8 changes: 4 additions & 4 deletions api/src/internal/global-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { MeterProvider } from '../metrics/MeterProvider';
import { ContextManager } from '../context/types';
import { DiagLogger } from '../diag/types';
import { TextMapPropagator } from '../propagation/TextMapPropagator';
import type { MeterProvider } from '../metrics/MeterProvider';
import type { ContextManager } from '../context/types';
import type { DiagLogger } from '../diag/types';
import type { TextMapPropagator } from '../propagation/TextMapPropagator';
import type { TracerProvider } from '../trace/tracer_provider';
import { VERSION } from '../version';
import { isCompatible } from './semver';
Expand Down
2 changes: 1 addition & 1 deletion api/src/metrics/Meter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import {
import type {
BatchObservableCallback,
Counter,
Gauge,
Expand Down
2 changes: 1 addition & 1 deletion api/src/metrics/MeterProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Meter, MeterOptions } from './Meter';
import type { Meter, MeterOptions } from './Meter';

/**
* A registry for creating named {@link Meter}s.
Expand Down
4 changes: 2 additions & 2 deletions api/src/metrics/Metric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Attributes, AttributeValue } from '../common/Attributes';
import { Context } from '../context/types';
import type { Attributes, AttributeValue } from '../common/Attributes';
import type { Context } from '../context/types';

/**
* Advisory options influencing aggregation configuration parameters.
Expand Down
4 changes: 2 additions & 2 deletions api/src/metrics/NoopMeter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Meter } from './Meter';
import {
import type { Meter } from './Meter';
import type {
BatchObservableCallback,
Counter,
Gauge,
Expand Down
4 changes: 2 additions & 2 deletions api/src/metrics/NoopMeterProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Meter, MeterOptions } from './Meter';
import { MeterProvider } from './MeterProvider';
import type { Meter, MeterOptions } from './Meter';
import type { MeterProvider } from './MeterProvider';
import { NOOP_METER } from './NoopMeter';

/**
Expand Down
4 changes: 2 additions & 2 deletions api/src/propagation/NoopTextMapPropagator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Context } from '../context/types';
import { TextMapPropagator } from './TextMapPropagator';
import type { Context } from '../context/types';
import type { TextMapPropagator } from './TextMapPropagator';

/**
* No-op implementations of {@link TextMapPropagator}.
Expand Down
2 changes: 1 addition & 1 deletion api/src/propagation/TextMapPropagator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Context } from '../context/types';
import type { Context } from '../context/types';

/**
* Injects `Context` into and extracts it from carriers that travel
Expand Down
14 changes: 7 additions & 7 deletions api/src/trace/NonRecordingSpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Exception } from '../common/Exception';
import { TimeInput } from '../common/Time';
import { SpanAttributes } from './attributes';
import type { Exception } from '../common/Exception';
import type { TimeInput } from '../common/Time';
import type { SpanAttributes } from './attributes';
import { INVALID_SPAN_CONTEXT } from './invalid-span-constants';
import { Span } from './span';
import { SpanContext } from './span_context';
import { SpanStatus } from './status';
import { Link } from './link';
import type { Span } from './span';
import type { SpanContext } from './span_context';
import type { SpanStatus } from './status';
import type { Link } from './link';

/**
* The NonRecordingSpan is the default {@link Span} that is used when no Span
Expand Down
10 changes: 5 additions & 5 deletions api/src/trace/NoopTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/

import { ContextAPI } from '../api/context';
import { Context } from '../context/types';
import type { Context } from '../context/types';
import { getSpanContext, setSpan } from '../trace/context-utils';
import { NonRecordingSpan } from './NonRecordingSpan';
import { Span } from './span';
import type { Span } from './span';
import { isSpanContextValid } from './spancontext-utils';
import { SpanOptions } from './SpanOptions';
import { SpanContext } from './span_context';
import { Tracer } from './tracer';
import type { SpanOptions } from './SpanOptions';
import type { SpanContext } from './span_context';
import type { Tracer } from './tracer';

const contextApi = ContextAPI.getInstance();

Expand Down
6 changes: 3 additions & 3 deletions api/src/trace/NoopTracerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/

import { NoopTracer } from './NoopTracer';
import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
import { TracerProvider } from './tracer_provider';
import type { Tracer } from './tracer';
import type { TracerOptions } from './tracer_options';
import type { TracerProvider } from './tracer_provider';

/**
* An implementation of the {@link TracerProvider} which returns an impotent
Expand Down
10 changes: 5 additions & 5 deletions api/src/trace/ProxyTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Context } from '../context/types';
import type { Context } from '../context/types';
import { NoopTracer } from './NoopTracer';
import { Span } from './span';
import { SpanOptions } from './SpanOptions';
import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
import type { Span } from './span';
import type { SpanOptions } from './SpanOptions';
import type { Tracer } from './tracer';
import type { TracerOptions } from './tracer_options';

const NOOP_TRACER = new NoopTracer();

Expand Down
6 changes: 3 additions & 3 deletions api/src/trace/ProxyTracerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Tracer } from './tracer';
import { TracerProvider } from './tracer_provider';
import type { Tracer } from './tracer';
import type { TracerProvider } from './tracer_provider';
import { ProxyTracer } from './ProxyTracer';
import { NoopTracerProvider } from './NoopTracerProvider';
import { TracerOptions } from './tracer_options';
import type { TracerOptions } from './tracer_options';

const NOOP_TRACER_PROVIDER = new NoopTracerProvider();

Expand Down
10 changes: 5 additions & 5 deletions api/src/trace/Sampler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { Context } from '../context/types';
import { SpanAttributes } from './attributes';
import { Link } from './link';
import { SamplingResult } from './SamplingResult';
import { SpanKind } from './span_kind';
import type { Context } from '../context/types';
import type { SpanAttributes } from './attributes';
import type { Link } from './link';
import type { SamplingResult } from './SamplingResult';
import type { SpanKind } from './span_kind';

/**
* @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.
Expand Down
Loading
Loading