Skip to content

Commit 1439c46

Browse files
Merge branch 'main' into jamie.separate-semconv-release-publishing
2 parents c80e747 + f047db9 commit 1439c46

File tree

160 files changed

+5285
-8444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+5285
-8444
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/op
2929
### :house: (Internal)
3030

3131
* refactor: Simplify the code for the `getEnv` function [#4799](https://github.com/open-telemetry/opentelemetry-js/pull/4799) @danstarns
32+
* refactor: remove "export *" in favor of explicit named exports [#4880](https://github.com/open-telemetry/opentelemetry-js/pull/4880) @robbkidd
33+
* Packages updated:
34+
* opentelemetry-context-zone
35+
* opentelemetry-core
36+
* opentelemetry-exporter-jaeger
37+
* opentelemetry-exporter-zipkin
38+
* opentelemetry-propagator-b3
39+
* opentelemetry-propagator-jaeger
40+
* opentelemetry-sdk-trace-base
41+
* opentelemetry-sdk-trace-node
42+
* opentelemetry-sdk-trace-web
43+
* propagator-aws-xray
44+
* sdk-metrics
45+
* deps(sdk-metrics): remove unused lodash.merge dependency [#4905](https://github.com/open-telemetry/opentelemetry-js/pull/4905) @pichlermarc
3246

3347
## 1.25.1
3448

api/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ All notable changes to this project will be documented in this file.
1515

1616
### :house: (Internal)
1717

18+
* refactor(api): remove "export *" in favor of explicit named exports [#4880](https://github.com/open-telemetry/opentelemetry-js/pull/4880) @robbkidd
19+
1820
## 1.9.0
1921

2022
### :rocket: (Enhancement)

api/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"karma-webpack": "5.0.1",
9999
"lerna": "6.6.2",
100100
"memfs": "3.5.3",
101-
"mocha": "10.2.0",
101+
"mocha": "10.7.3",
102102
"nyc": "15.1.0",
103103
"sinon": "15.1.2",
104104
"ts-loader": "9.5.1",

api/src/api/context.ts

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const NOOP_CONTEXT_MANAGER = new NoopContextManager();
2828

2929
/**
3030
* Singleton object which represents the entry point to the OpenTelemetry Context API
31+
*
32+
* @since 1.0.0
3133
*/
3234
export class ContextAPI {
3335
private static _instance?: ContextAPI;

api/src/api/diag.ts

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ const API_NAME = 'diag';
3434
/**
3535
* Singleton object which represents the entry point to the OpenTelemetry internal
3636
* diagnostic API
37+
*
38+
* @since 1.0.0
3739
*/
3840
export class DiagAPI implements DiagLogger, DiagLoggerApi {
3941
private static _instance?: DiagAPI;

api/src/api/propagation.ts

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
4242

4343
/**
4444
* Singleton object which represents the entry point to the OpenTelemetry Propagation API
45+
*
46+
* @since 1.0.0
4547
*/
4648
export class PropagationAPI {
4749
private static _instance?: PropagationAPI;

api/src/api/trace.ts

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const API_NAME = 'trace';
4040

4141
/**
4242
* Singleton object which represents the entry point to the OpenTelemetry Tracing API
43+
*
44+
* @since 1.0.0
4345
*/
4446
export class TraceAPI {
4547
private static _instance?: TraceAPI;

api/src/baggage/types.ts

+7
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ import { baggageEntryMetadataSymbol } from './internal/symbol';
3232
* limitations under the License.
3333
*/
3434

35+
/**
36+
* @since 1.0.0
37+
*/
3538
export interface BaggageEntry {
3639
/** `String` value of the `BaggageEntry`. */
3740
value: string;
@@ -45,6 +48,8 @@ export interface BaggageEntry {
4548
/**
4649
* Serializable Metadata defined by the W3C baggage specification.
4750
* It currently has no special meaning defined by the OpenTelemetry or W3C.
51+
*
52+
* @since 1.0.0
4853
*/
4954
export type BaggageEntryMetadata = { toString(): string } & {
5055
__TYPE__: typeof baggageEntryMetadataSymbol;
@@ -54,6 +59,8 @@ export type BaggageEntryMetadata = { toString(): string } & {
5459
* Baggage represents collection of key-value pairs with optional metadata.
5560
* Each key of Baggage is associated with exactly one value.
5661
* Baggage may be used to annotate and enrich telemetry data.
62+
*
63+
* @since 1.0.0
5764
*/
5865
export interface Baggage {
5966
/**

api/src/baggage/utils.ts

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export function createBaggage(
3737
*
3838
* @param str string metadata. Format is currently not defined by the spec and has no special meaning.
3939
*
40+
* @since 1.0.0
4041
*/
4142
export function baggageEntryMetadataFromString(
4243
str: string

api/src/common/Attributes.ts

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* Attributes is a map from string to attribute values.
1919
*
2020
* Note: only the own enumerable keys are counted as valid attribute keys.
21+
*
22+
* @since 1.3.0
2123
*/
2224
export interface Attributes {
2325
[attributeKey: string]: AttributeValue | undefined;
@@ -27,6 +29,8 @@ export interface Attributes {
2729
* Attribute values may be any non-nullish primitive value except an object.
2830
*
2931
* null or undefined attribute values are invalid and will result in undefined behavior.
32+
*
33+
* @since 1.3.0
3034
*/
3135
export type AttributeValue =
3236
| string

api/src/common/Exception.ts

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ interface ExceptionWithName {
3939
* Defines Exception.
4040
*
4141
* string or an object with one of (message or name or code) and optional stack
42+
*
43+
* @since 1.0.0
4244
*/
4345
export type Exception =
4446
| ExceptionWithCode

api/src/common/Time.ts

+4
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@
2424
* The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:
2525
* HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
2626
* This is represented in HrTime format as [1609504210, 150000000].
27+
*
28+
* @since 1.0.0
2729
*/
2830
export type HrTime = [number, number];
2931

3032
/**
3133
* Defines TimeInput.
3234
*
3335
* hrtime, epoch milliseconds, performance.now() or Date
36+
*
37+
* @since 1.0.0
3438
*/
3539
export type TimeInput = HrTime | number | Date;

api/src/context-api.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
// Split module-level variable definition into separate files to allow
1818
// tree-shaking on each api instance.
1919
import { ContextAPI } from './api/context';
20-
/** Entrypoint for context API */
20+
/**
21+
* Entrypoint for context API
22+
* @since 1.0.0
23+
*/
2124
export const context = ContextAPI.getInstance();

api/src/context/context.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616

1717
import { Context } from './types';
1818

19-
/** Get a key to uniquely identify a context value */
19+
/**
20+
* Get a key to uniquely identify a context value
21+
*
22+
* @since 1.0.0
23+
*/
2024
export function createContextKey(description: string) {
2125
// The specification states that for the same input, multiple calls should
2226
// return different keys. Due to the nature of the JS dependency management
@@ -81,5 +85,9 @@ class BaseContext implements Context {
8185
public deleteValue!: (key: symbol) => Context;
8286
}
8387

84-
/** The root context is used as the default parent context when there is no active context */
88+
/**
89+
* The root context is used as the default parent context when there is no active context
90+
*
91+
* @since 1.0.0
92+
*/
8593
export const ROOT_CONTEXT: Context = new BaseContext();

api/src/context/types.ts

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
/**
18+
* @since 1.0.0
19+
*/
1720
export interface Context {
1821
/**
1922
* Get a value from the context.
@@ -40,6 +43,9 @@ export interface Context {
4043
deleteValue(key: symbol): Context;
4144
}
4245

46+
/**
47+
* @since 1.0.0
48+
*/
4349
export interface ContextManager {
4450
/**
4551
* Get the current active context

api/src/diag-api.ts

+2
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ import { DiagAPI } from './api/diag';
2222
* Defines Diagnostic handler used for internal diagnostic logging operations.
2323
* The default provides a Noop DiagLogger implementation which may be changed via the
2424
* diag.setLogger(logger: DiagLogger) function.
25+
*
26+
* @since 1.0.0
2527
*/
2628
export const diag = DiagAPI.instance();

api/src/diag/consoleLogger.ts

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const consoleMap: { n: keyof DiagLogger; c: ConsoleMapKeys }[] = [
2929
* A simple Immutable Console based diagnostic logger which will output any messages to the Console.
3030
* If you want to limit the amount of logging to a specific level or lower use the
3131
* {@link createLogLevelDiagLogger}
32+
*
33+
* @since 1.0.0
3234
*/
3335
export class DiagConsoleLogger implements DiagLogger {
3436
constructor() {

api/src/diag/types.ts

+10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
/**
18+
* @since 1.0.0
19+
*/
1720
export type DiagLogFunction = (message: string, ...args: unknown[]) => void;
1821

1922
/**
@@ -23,6 +26,8 @@ export type DiagLogFunction = (message: string, ...args: unknown[]) => void;
2326
* - a No-Op {@link createNoopDiagLogger}
2427
* - a {@link DiagLogLevel} filtering wrapper {@link createLogLevelDiagLogger}
2528
* - a general Console {@link DiagConsoleLogger} version.
29+
*
30+
* @since 1.0.0
2631
*/
2732
export interface DiagLogger {
2833
/** Log an error scenario that was not expected and caused the requested operation to fail. */
@@ -92,11 +97,16 @@ export enum DiagLogLevel {
9297

9398
/**
9499
* Defines options for ComponentLogger
100+
*
101+
* @since 1.0.0
95102
*/
96103
export interface ComponentLoggerOptions {
97104
namespace: string;
98105
}
99106

107+
/**
108+
* @since 1.4.1
109+
*/
100110
export interface DiagLoggerOptions {
101111
/**
102112
* The {@link DiagLogLevel} used to filter logs sent to the logger.

api/src/metrics-api.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@
1717
// Split module-level variable definition into separate files to allow
1818
// tree-shaking on each api instance.
1919
import { MetricsAPI } from './api/metrics';
20-
/** Entrypoint for metrics API */
20+
/**
21+
* Entrypoint for metrics API
22+
*
23+
* @since 1.3.0
24+
*/
2125
export const metrics = MetricsAPI.getInstance();

api/src/metrics/Meter.ts

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import {
3030

3131
/**
3232
* An interface describes additional metadata of a meter.
33+
*
34+
* @since 1.3.0
3335
*/
3436
export interface MeterOptions {
3537
/**
@@ -44,6 +46,8 @@ export interface MeterOptions {
4446
* {@link Metric}s are used for recording pre-defined aggregation (`Counter`),
4547
* or raw values (`Histogram`) in which the aggregation and attributes
4648
* for the exported metric are deferred.
49+
*
50+
* @since 1.3.0
4751
*/
4852
export interface Meter {
4953
/**

api/src/metrics/MeterProvider.ts

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import { Meter, MeterOptions } from './Meter';
1818

1919
/**
2020
* A registry for creating named {@link Meter}s.
21+
*
22+
* @since 1.3.0
2123
*/
2224
export interface MeterProvider {
2325
/**

0 commit comments

Comments
 (0)