@opentelemetry/sdk-node 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -128,6 +128,10 @@ Configure a trace exporter. If an exporter OR span processor is not configured,
128
128
 
129
129
  Configure tracing parameters. These are the same trace parameters used to [configure a tracer](../../../packages/opentelemetry-sdk-trace-base/src/types.ts#L71).
130
130
 
131
+ ### views
132
+
133
+ Configure views of your instruments and accepts an array of [View](../opentelemetry-sdk-metrics-base/src/view/View.ts)-instances. The parameter can be used to configure the explicit bucket sizes of histogram metrics.
134
+
131
135
  ### serviceName
132
136
 
133
137
  Configure the [service name](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#service).
@@ -1,7 +1,7 @@
1
1
  export * as api from '@opentelemetry/api';
2
2
  export * as contextBase from '@opentelemetry/api';
3
3
  export * as core from '@opentelemetry/core';
4
- export * as metrics from '@opentelemetry/sdk-metrics-base';
4
+ export * as metrics from '@opentelemetry/sdk-metrics';
5
5
  export * as node from '@opentelemetry/sdk-trace-node';
6
6
  export * as resources from '@opentelemetry/resources';
7
7
  export * as tracing from '@opentelemetry/sdk-trace-base';
@@ -29,7 +29,7 @@ exports.tracing = exports.resources = exports.node = exports.metrics = exports.c
29
29
  exports.api = require("@opentelemetry/api");
30
30
  exports.contextBase = require("@opentelemetry/api");
31
31
  exports.core = require("@opentelemetry/core");
32
- exports.metrics = require("@opentelemetry/sdk-metrics-base");
32
+ exports.metrics = require("@opentelemetry/sdk-metrics");
33
33
  exports.node = require("@opentelemetry/sdk-trace-node");
34
34
  exports.resources = require("@opentelemetry/resources");
35
35
  exports.tracing = require("@opentelemetry/sdk-trace-base");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAEH,4CAA0C;AAC1C,oDAAkD;AAClD,8CAA4C;AAC5C,6DAA2D;AAC3D,wDAAsD;AACtD,wDAAsD;AACtD,2DAAyD;AACzD,wCAAsB;AACtB,0CAAwB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * as api from '@opentelemetry/api';\nexport * as contextBase from '@opentelemetry/api';\nexport * as core from '@opentelemetry/core';\nexport * as metrics from '@opentelemetry/sdk-metrics-base';\nexport * as node from '@opentelemetry/sdk-trace-node';\nexport * as resources from '@opentelemetry/resources';\nexport * as tracing from '@opentelemetry/sdk-trace-base';\nexport * from './sdk';\nexport * from './types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;AAEH,4CAA0C;AAC1C,oDAAkD;AAClD,8CAA4C;AAC5C,wDAAsD;AACtD,wDAAsD;AACtD,wDAAsD;AACtD,2DAAyD;AACzD,wCAAsB;AACtB,0CAAwB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * as api from '@opentelemetry/api';\nexport * as contextBase from '@opentelemetry/api';\nexport * as core from '@opentelemetry/core';\nexport * as metrics from '@opentelemetry/sdk-metrics';\nexport * as node from '@opentelemetry/sdk-trace-node';\nexport * as resources from '@opentelemetry/resources';\nexport * as tracing from '@opentelemetry/sdk-trace-base';\nexport * from './sdk';\nexport * from './types';\n"]}
@@ -1,14 +1,27 @@
1
1
  import { ContextManager, TextMapPropagator } from '@opentelemetry/api';
2
2
  import { Resource, ResourceDetectionConfig } from '@opentelemetry/resources';
3
- import { MetricReader } from '@opentelemetry/sdk-metrics-base';
3
+ import { MetricReader, View } from '@opentelemetry/sdk-metrics';
4
4
  import { SpanProcessor } from '@opentelemetry/sdk-trace-base';
5
5
  import { NodeTracerConfig } from '@opentelemetry/sdk-trace-node';
6
6
  import { NodeSDKConfiguration } from './types';
7
7
  /** This class represents everything needed to register a fully configured OpenTelemetry Node.js SDK */
8
+ export declare type MeterProviderConfig = {
9
+ /**
10
+ * Reference to the MetricReader instance by the NodeSDK
11
+ */
12
+ reader?: MetricReader;
13
+ /**
14
+ * Lists the views that should be passed when meterProvider
15
+ *
16
+ * Note: This is only getting used when NodeSDK is responsible for
17
+ * instantiated an instance of MeterProvider
18
+ */
19
+ views?: View[];
20
+ };
8
21
  export declare class NodeSDK {
9
22
  private _tracerProviderConfig?;
23
+ private _meterProviderConfig?;
10
24
  private _instrumentations;
11
- private _metricReader?;
12
25
  private _resource;
13
26
  private _autoDetectResources;
14
27
  private _tracerProvider?;
@@ -21,7 +34,7 @@ export declare class NodeSDK {
21
34
  /** Set configurations required to register a NodeTracerProvider */
22
35
  configureTracerProvider(tracerConfig: NodeTracerConfig, spanProcessor: SpanProcessor, contextManager?: ContextManager, textMapPropagator?: TextMapPropagator): void;
23
36
  /** Set configurations needed to register a MeterProvider */
24
- configureMeterProvider(reader: MetricReader): void;
37
+ configureMeterProvider(config: MeterProviderConfig): void;
25
38
  /** Detect resource attributes */
26
39
  detectResources(config?: ResourceDetectionConfig): Promise<void>;
27
40
  /** Manually add a resource */
package/build/src/sdk.js CHANGED
@@ -19,11 +19,10 @@ exports.NodeSDK = void 0;
19
19
  const api_metrics_1 = require("@opentelemetry/api-metrics");
20
20
  const instrumentation_1 = require("@opentelemetry/instrumentation");
21
21
  const resources_1 = require("@opentelemetry/resources");
22
- const sdk_metrics_base_1 = require("@opentelemetry/sdk-metrics-base");
22
+ const sdk_metrics_1 = require("@opentelemetry/sdk-metrics");
23
23
  const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
24
24
  const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
25
25
  const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
26
- /** This class represents everything needed to register a fully configured OpenTelemetry Node.js SDK */
27
26
  class NodeSDK {
28
27
  /**
29
28
  * Create a new NodeJS SDK instance
@@ -44,8 +43,15 @@ class NodeSDK {
44
43
  const spanProcessor = (_c = configuration.spanProcessor) !== null && _c !== void 0 ? _c : new sdk_trace_base_1.BatchSpanProcessor(configuration.traceExporter);
45
44
  this.configureTracerProvider(tracerProviderConfig, spanProcessor, configuration.contextManager, configuration.textMapPropagator);
46
45
  }
47
- if (configuration.metricReader) {
48
- this.configureMeterProvider(configuration.metricReader);
46
+ if (configuration.metricReader || configuration.views) {
47
+ const meterProviderConfig = {};
48
+ if (configuration.metricReader) {
49
+ meterProviderConfig.reader = configuration.metricReader;
50
+ }
51
+ if (configuration.views) {
52
+ meterProviderConfig.views = configuration.views;
53
+ }
54
+ this.configureMeterProvider(meterProviderConfig);
49
55
  }
50
56
  let instrumentations = [];
51
57
  if (configuration.instrumentations) {
@@ -63,8 +69,28 @@ class NodeSDK {
63
69
  };
64
70
  }
65
71
  /** Set configurations needed to register a MeterProvider */
66
- configureMeterProvider(reader) {
67
- this._metricReader = reader;
72
+ configureMeterProvider(config) {
73
+ // nothing is set yet, we can set config and return.
74
+ if (this._meterProviderConfig == null) {
75
+ this._meterProviderConfig = config;
76
+ return;
77
+ }
78
+ // make sure we do not override existing views with other views.
79
+ if (this._meterProviderConfig.views != null && config.views != null) {
80
+ throw new Error('Views passed but Views have already been configured.');
81
+ }
82
+ // set views, but make sure we do not override existing views with null/undefined.
83
+ if (config.views != null) {
84
+ this._meterProviderConfig.views = config.views;
85
+ }
86
+ // make sure we do not override existing reader with another reader.
87
+ if (this._meterProviderConfig.reader != null && config.reader != null) {
88
+ throw new Error('MetricReader passed but MetricReader has already been configured.');
89
+ }
90
+ // set reader, but make sure we do not override existing reader with null/undefined.
91
+ if (config.reader != null) {
92
+ this._meterProviderConfig.reader = config.reader;
93
+ }
68
94
  }
69
95
  /** Detect resource attributes */
70
96
  async detectResources(config) {
@@ -79,6 +105,7 @@ class NodeSDK {
79
105
  * Once the SDK has been configured, call this method to construct SDK components and register them with the OpenTelemetry API.
80
106
  */
81
107
  async start() {
108
+ var _a, _b;
82
109
  if (this._autoDetectResources) {
83
110
  await this.detectResources();
84
111
  }
@@ -94,11 +121,14 @@ class NodeSDK {
94
121
  propagator: this._tracerProviderConfig.textMapPropagator,
95
122
  });
96
123
  }
97
- if (this._metricReader) {
98
- const meterProvider = new sdk_metrics_base_1.MeterProvider({
124
+ if (this._meterProviderConfig) {
125
+ const meterProvider = new sdk_metrics_1.MeterProvider({
99
126
  resource: this._resource,
127
+ views: (_b = (_a = this._meterProviderConfig) === null || _a === void 0 ? void 0 : _a.views) !== null && _b !== void 0 ? _b : [],
100
128
  });
101
- meterProvider.addMetricReader(this._metricReader);
129
+ if (this._meterProviderConfig.reader) {
130
+ meterProvider.addMetricReader(this._meterProviderConfig.reader);
131
+ }
102
132
  this._meterProvider = meterProvider;
103
133
  api_metrics_1.metrics.setGlobalMeterProvider(meterProvider);
104
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,4DAAqD;AACrD,oEAGwC;AACxC,wDAMkC;AAClC,sEAA8E;AAC9E,kEAGuC;AACvC,kEAAqF;AACrF,8EAAiF;AAGjF,uGAAuG;AACvG,MAA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AAC,QAAQ,CAAC;gBACtB,cAAc,EAAE,IAAI,CAAC,qBAAqB,CAAC,cAAc;gBACzD,UAAU,EAAE,IAAI,CAAC,qBAAqB,CAAC,iBAAiB;aACzD,CAAC,CAAC;SACJ;QAED,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,MAAM,aAAa,GAAG,IAAI,gCAAa,CAAC;gBACtC,QAAQ,EAAE,IAAI,CAAC,SAAS;aACzB,CAAC,CAAC;YAEH,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAElD,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;YAEpC,qBAAO,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC;SAC/C;QAED,IAAA,0CAAwB,EAAC;YACvB,gBAAgB,EAAE,IAAI,CAAC,iBAAiB;SACzC,CAAC,CAAC;IACL,CAAC;IAEM,QAAQ;QACb,MAAM,QAAQ,GAAuB,EAAE,CAAC;QACxC,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;SAChD;QACD,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC/C;QAED,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;YACnB,oDAAoD;aACnD,IAAI,CAAC,GAAG,EAAE;QACX,CAAC,CAAC,CACL,CAAC;IACJ,CAAC;CACF;AAhKD,0BAgKC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ContextManager, TextMapPropagator } from '@opentelemetry/api';\nimport { metrics } from '@opentelemetry/api-metrics';\nimport {\n InstrumentationOption,\n registerInstrumentations\n} from '@opentelemetry/instrumentation';\nimport {\n detectResources,\n envDetector,\n processDetector,\n Resource,\n ResourceDetectionConfig\n} from '@opentelemetry/resources';\nimport { MeterProvider, MetricReader } from '@opentelemetry/sdk-metrics-base';\nimport {\n BatchSpanProcessor,\n SpanProcessor\n} from '@opentelemetry/sdk-trace-base';\nimport { NodeTracerConfig, NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { NodeSDKConfiguration } from './types';\n\n/** This class represents everything needed to register a fully configured OpenTelemetry Node.js SDK */\nexport class NodeSDK {\n private _tracerProviderConfig?: {\n tracerConfig: NodeTracerConfig;\n spanProcessor: SpanProcessor;\n contextManager?: ContextManager;\n textMapPropagator?: TextMapPropagator;\n };\n private _instrumentations: InstrumentationOption[];\n private _metricReader?: MetricReader;\n\n private _resource: Resource;\n\n private _autoDetectResources: boolean;\n\n private _tracerProvider?: NodeTracerProvider;\n private _meterProvider?: MeterProvider;\n private _serviceName?: string;\n\n /**\n * Create a new NodeJS SDK instance\n */\n public constructor(configuration: Partial<NodeSDKConfiguration> = {}) {\n this._resource = configuration.resource ?? new Resource({});\n\n this._serviceName = configuration.serviceName;\n\n this._autoDetectResources = configuration.autoDetectResources ?? true;\n\n if (configuration.spanProcessor || configuration.traceExporter) {\n const tracerProviderConfig: NodeTracerConfig = {};\n\n if (configuration.sampler) {\n tracerProviderConfig.sampler = configuration.sampler;\n }\n if (configuration.spanLimits) {\n tracerProviderConfig.spanLimits = configuration.spanLimits;\n }\n\n const spanProcessor =\n configuration.spanProcessor ??\n new BatchSpanProcessor(configuration.traceExporter!);\n\n this.configureTracerProvider(\n tracerProviderConfig,\n spanProcessor,\n configuration.contextManager,\n configuration.textMapPropagator\n );\n }\n\n if (configuration.metricReader) {\n this.configureMeterProvider(configuration.metricReader);\n }\n\n let instrumentations: InstrumentationOption[] = [];\n if (configuration.instrumentations) {\n instrumentations = configuration.instrumentations;\n }\n this._instrumentations = instrumentations;\n }\n\n /** Set configurations required to register a NodeTracerProvider */\n public configureTracerProvider(\n tracerConfig: NodeTracerConfig,\n spanProcessor: SpanProcessor,\n contextManager?: ContextManager,\n textMapPropagator?: TextMapPropagator\n ): void {\n this._tracerProviderConfig = {\n tracerConfig,\n spanProcessor,\n contextManager,\n textMapPropagator,\n };\n }\n\n /** Set configurations needed to register a MeterProvider */\n public configureMeterProvider(reader: MetricReader): void {\n this._metricReader = reader;\n }\n\n /** Detect resource attributes */\n public async detectResources(\n config?: ResourceDetectionConfig\n ): Promise<void> {\n const internalConfig: ResourceDetectionConfig = {\n detectors: [ envDetector, processDetector],\n ...config,\n };\n\n this.addResource(await detectResources(internalConfig));\n }\n\n /** Manually add a resource */\n public addResource(resource: Resource): void {\n this._resource = this._resource.merge(resource);\n }\n\n /**\n * Once the SDK has been configured, call this method to construct SDK components and register them with the OpenTelemetry API.\n */\n public async start(): Promise<void> {\n if (this._autoDetectResources) {\n await this.detectResources();\n }\n\n this._resource = this._serviceName === undefined\n ? this._resource\n : this._resource.merge(new Resource(\n {[SemanticResourceAttributes.SERVICE_NAME]: this._serviceName}\n ));\n\n if (this._tracerProviderConfig) {\n const tracerProvider = new NodeTracerProvider({\n ...this._tracerProviderConfig.tracerConfig,\n resource: this._resource,\n });\n\n this._tracerProvider = tracerProvider;\n\n tracerProvider.addSpanProcessor(this._tracerProviderConfig.spanProcessor);\n tracerProvider.register({\n contextManager: this._tracerProviderConfig.contextManager,\n propagator: this._tracerProviderConfig.textMapPropagator,\n });\n }\n\n if (this._metricReader) {\n const meterProvider = new MeterProvider({\n resource: this._resource,\n });\n\n meterProvider.addMetricReader(this._metricReader);\n\n this._meterProvider = meterProvider;\n\n metrics.setGlobalMeterProvider(meterProvider);\n }\n\n registerInstrumentations({\n instrumentations: this._instrumentations,\n });\n }\n\n public shutdown(): Promise<void> {\n const promises: Promise<unknown>[] = [];\n if (this._tracerProvider) {\n promises.push(this._tracerProvider.shutdown());\n }\n if (this._meterProvider) {\n promises.push(this._meterProvider.shutdown());\n }\n\n return (\n Promise.all(promises)\n // return void instead of the array from Promise.all\n .then(() => {\n })\n );\n }\n}\n"]}
1
+ {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,4DAAqD;AACrD,oEAGwC;AACxC,wDAMkC;AAClC,4DAA+E;AAC/E,kEAGuC;AACvC,kEAAqF;AACrF,8EAAiF;AAkBjF,MAAa,OAAO;IAkBlB;;OAEG;IACH,YAAmB,gBAA+C,EAAE;;QAClE,IAAI,CAAC,SAAS,GAAG,MAAA,aAAa,CAAC,QAAQ,mCAAI,IAAI,oBAAQ,CAAC,EAAE,CAAC,CAAC;QAE5D,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC;QAE9C,IAAI,CAAC,oBAAoB,GAAG,MAAA,aAAa,CAAC,mBAAmB,mCAAI,IAAI,CAAC;QAEtE,IAAI,aAAa,CAAC,aAAa,IAAI,aAAa,CAAC,aAAa,EAAE;YAC9D,MAAM,oBAAoB,GAAqB,EAAE,CAAC;YAElD,IAAI,aAAa,CAAC,OAAO,EAAE;gBACzB,oBAAoB,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;aACtD;YACD,IAAI,aAAa,CAAC,UAAU,EAAE;gBAC5B,oBAAoB,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC;aAC5D;YAED,MAAM,aAAa,GACjB,MAAA,aAAa,CAAC,aAAa,mCAC3B,IAAI,mCAAkB,CAAC,aAAa,CAAC,aAAc,CAAC,CAAC;YAEvD,IAAI,CAAC,uBAAuB,CAC1B,oBAAoB,EACpB,aAAa,EACb,aAAa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AAoD;aACnD,IAAI,CAAC,GAAG,EAAE;QACX,CAAC,CAAC,CACL,CAAC;IACJ,CAAC;CACF;AApMD,0BAoMC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ContextManager, TextMapPropagator } from '@opentelemetry/api';\nimport { metrics } from '@opentelemetry/api-metrics';\nimport {\n InstrumentationOption,\n registerInstrumentations\n} from '@opentelemetry/instrumentation';\nimport {\n detectResources,\n envDetector,\n processDetector,\n Resource,\n ResourceDetectionConfig\n} from '@opentelemetry/resources';\nimport { MeterProvider, MetricReader, View } from '@opentelemetry/sdk-metrics';\nimport {\n BatchSpanProcessor,\n SpanProcessor\n} from '@opentelemetry/sdk-trace-base';\nimport { NodeTracerConfig, NodeTracerProvider } from '@opentelemetry/sdk-trace-node';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { NodeSDKConfiguration } from './types';\n\n/** This class represents everything needed to register a fully configured OpenTelemetry Node.js SDK */\n\nexport type MeterProviderConfig = {\n /**\n * Reference to the MetricReader instance by the NodeSDK\n */\n reader?: MetricReader\n /**\n * Lists the views that should be passed when meterProvider\n *\n * Note: This is only getting used when NodeSDK is responsible for\n * instantiated an instance of MeterProvider\n */\n views?: View[]\n};\nexport class NodeSDK {\n private _tracerProviderConfig?: {\n tracerConfig: NodeTracerConfig;\n spanProcessor: SpanProcessor;\n contextManager?: ContextManager;\n textMapPropagator?: TextMapPropagator;\n };\n private _meterProviderConfig?: MeterProviderConfig;\n private _instrumentations: InstrumentationOption[];\n\n private _resource: Resource;\n\n private _autoDetectResources: boolean;\n\n private _tracerProvider?: NodeTracerProvider;\n private _meterProvider?: MeterProvider;\n private _serviceName?: string;\n\n /**\n * Create a new NodeJS SDK instance\n */\n public constructor(configuration: Partial<NodeSDKConfiguration> = {}) {\n this._resource = configuration.resource ?? new Resource({});\n\n this._serviceName = configuration.serviceName;\n\n this._autoDetectResources = configuration.autoDetectResources ?? true;\n\n if (configuration.spanProcessor || configuration.traceExporter) {\n const tracerProviderConfig: NodeTracerConfig = {};\n\n if (configuration.sampler) {\n tracerProviderConfig.sampler = configuration.sampler;\n }\n if (configuration.spanLimits) {\n tracerProviderConfig.spanLimits = configuration.spanLimits;\n }\n\n const spanProcessor =\n configuration.spanProcessor ??\n new BatchSpanProcessor(configuration.traceExporter!);\n\n this.configureTracerProvider(\n tracerProviderConfig,\n spanProcessor,\n configuration.contextManager,\n configuration.textMapPropagator\n );\n }\n\n if (configuration.metricReader || configuration.views) {\n const meterProviderConfig: MeterProviderConfig = {};\n if (configuration.metricReader) {\n meterProviderConfig.reader = configuration.metricReader;\n }\n\n if (configuration.views) {\n meterProviderConfig.views = configuration.views;\n }\n\n this.configureMeterProvider(meterProviderConfig);\n }\n\n let instrumentations: InstrumentationOption[] = [];\n if (configuration.instrumentations) {\n instrumentations = configuration.instrumentations;\n }\n this._instrumentations = instrumentations;\n }\n\n /** Set configurations required to register a NodeTracerProvider */\n public configureTracerProvider(\n tracerConfig: NodeTracerConfig,\n spanProcessor: SpanProcessor,\n contextManager?: ContextManager,\n textMapPropagator?: TextMapPropagator\n ): void {\n this._tracerProviderConfig = {\n tracerConfig,\n spanProcessor,\n contextManager,\n textMapPropagator,\n };\n }\n\n /** Set configurations needed to register a MeterProvider */\n public configureMeterProvider(config: MeterProviderConfig): void {\n // nothing is set yet, we can set config and return.\n if (this._meterProviderConfig == null) {\n this._meterProviderConfig = config;\n return;\n }\n\n // make sure we do not override existing views with other views.\n if (this._meterProviderConfig.views != null && config.views != null) {\n throw new Error('Views passed but Views have already been configured.');\n }\n\n // set views, but make sure we do not override existing views with null/undefined.\n if (config.views != null) {\n this._meterProviderConfig.views = config.views;\n }\n\n // make sure we do not override existing reader with another reader.\n if (this._meterProviderConfig.reader != null && config.reader != null) {\n throw new Error('MetricReader passed but MetricReader has already been configured.');\n }\n\n // set reader, but make sure we do not override existing reader with null/undefined.\n if (config.reader != null) {\n this._meterProviderConfig.reader = config.reader;\n }\n }\n\n /** Detect resource attributes */\n public async detectResources(\n config?: ResourceDetectionConfig\n ): Promise<void> {\n const internalConfig: ResourceDetectionConfig = {\n detectors: [envDetector, processDetector],\n ...config,\n };\n\n this.addResource(await detectResources(internalConfig));\n }\n\n /** Manually add a resource */\n public addResource(resource: Resource): void {\n this._resource = this._resource.merge(resource);\n }\n\n /**\n * Once the SDK has been configured, call this method to construct SDK components and register them with the OpenTelemetry API.\n */\n public async start(): Promise<void> {\n if (this._autoDetectResources) {\n await this.detectResources();\n }\n\n this._resource = this._serviceName === undefined\n ? this._resource\n : this._resource.merge(new Resource(\n { [SemanticResourceAttributes.SERVICE_NAME]: this._serviceName }\n ));\n\n if (this._tracerProviderConfig) {\n const tracerProvider = new NodeTracerProvider({\n ...this._tracerProviderConfig.tracerConfig,\n resource: this._resource,\n });\n\n this._tracerProvider = tracerProvider;\n\n tracerProvider.addSpanProcessor(this._tracerProviderConfig.spanProcessor);\n tracerProvider.register({\n contextManager: this._tracerProviderConfig.contextManager,\n propagator: this._tracerProviderConfig.textMapPropagator,\n });\n }\n\n if (this._meterProviderConfig) {\n const meterProvider = new MeterProvider({\n resource: this._resource,\n views: this._meterProviderConfig?.views ?? [],\n });\n\n if (this._meterProviderConfig.reader) {\n meterProvider.addMetricReader(this._meterProviderConfig.reader);\n }\n\n this._meterProvider = meterProvider;\n\n metrics.setGlobalMeterProvider(meterProvider);\n }\n\n registerInstrumentations({\n instrumentations: this._instrumentations,\n });\n }\n\n public shutdown(): Promise<void> {\n const promises: Promise<unknown>[] = [];\n if (this._tracerProvider) {\n promises.push(this._tracerProvider.shutdown());\n }\n if (this._meterProvider) {\n promises.push(this._meterProvider.shutdown());\n }\n\n return (\n Promise.all(promises)\n // return void instead of the array from Promise.all\n .then(() => {\n })\n );\n }\n}\n"]}
@@ -1,15 +1,16 @@
1
1
  import type { ContextManager, SpanAttributes } from '@opentelemetry/api';
2
- import { Sampler, TextMapPropagator } from '@opentelemetry/api';
2
+ import { TextMapPropagator } from '@opentelemetry/api';
3
3
  import { InstrumentationOption } from '@opentelemetry/instrumentation';
4
4
  import { Resource } from '@opentelemetry/resources';
5
- import { MetricReader } from '@opentelemetry/sdk-metrics-base';
6
- import { SpanExporter, SpanLimits, SpanProcessor } from '@opentelemetry/sdk-trace-base';
5
+ import { MetricReader, View } from '@opentelemetry/sdk-metrics';
6
+ import { Sampler, SpanExporter, SpanLimits, SpanProcessor } from '@opentelemetry/sdk-trace-base';
7
7
  export interface NodeSDKConfiguration {
8
8
  autoDetectResources: boolean;
9
9
  contextManager: ContextManager;
10
10
  defaultAttributes: SpanAttributes;
11
11
  textMapPropagator: TextMapPropagator;
12
12
  metricReader: MetricReader;
13
+ views: View[];
13
14
  instrumentations: InstrumentationOption[];
14
15
  resource: Resource;
15
16
  sampler: Sampler;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ContextManager, SpanAttributes } from '@opentelemetry/api';\nimport { Sampler, TextMapPropagator } from '@opentelemetry/api';\nimport { InstrumentationOption } from '@opentelemetry/instrumentation';\nimport { Resource } from '@opentelemetry/resources';\nimport { MetricReader } from '@opentelemetry/sdk-metrics-base';\nimport {\n SpanExporter,\n SpanLimits,\n SpanProcessor\n} from '@opentelemetry/sdk-trace-base';\n\nexport interface NodeSDKConfiguration {\n autoDetectResources: boolean;\n contextManager: ContextManager;\n defaultAttributes: SpanAttributes;\n textMapPropagator: TextMapPropagator;\n metricReader: MetricReader;\n instrumentations: InstrumentationOption[];\n resource: Resource;\n sampler: Sampler;\n serviceName?: string;\n spanProcessor: SpanProcessor;\n traceExporter: SpanExporter;\n spanLimits: SpanLimits;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ContextManager, SpanAttributes } from '@opentelemetry/api';\nimport { TextMapPropagator } from '@opentelemetry/api';\nimport { InstrumentationOption } from '@opentelemetry/instrumentation';\nimport { Resource } from '@opentelemetry/resources';\nimport { MetricReader, View } from '@opentelemetry/sdk-metrics';\nimport {\n Sampler,\n SpanExporter,\n SpanLimits,\n SpanProcessor,\n} from '@opentelemetry/sdk-trace-base';\n\nexport interface NodeSDKConfiguration {\n autoDetectResources: boolean;\n contextManager: ContextManager;\n defaultAttributes: SpanAttributes;\n textMapPropagator: TextMapPropagator;\n metricReader: MetricReader;\n views: View[]\n instrumentations: InstrumentationOption[];\n resource: Resource;\n sampler: Sampler;\n serviceName?: string;\n spanProcessor: SpanProcessor;\n traceExporter: SpanExporter;\n spanLimits: SpanLimits;\n}\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.31.0";
1
+ export declare const VERSION = "0.32.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -17,5 +17,5 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.VERSION = '0.31.0';
20
+ exports.VERSION = '0.32.0';
21
21
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.31.0';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.32.0';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/sdk-node",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "OpenTelemetry SDK for Node.js",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -44,35 +44,35 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@opentelemetry/api-metrics": "0.31.0",
48
- "@opentelemetry/core": "1.5.0",
49
- "@opentelemetry/instrumentation": "0.31.0",
50
- "@opentelemetry/resources": "1.5.0",
51
- "@opentelemetry/sdk-metrics-base": "0.31.0",
52
- "@opentelemetry/sdk-trace-base": "1.5.0",
53
- "@opentelemetry/sdk-trace-node": "1.5.0"
47
+ "@opentelemetry/api-metrics": "0.32.0",
48
+ "@opentelemetry/core": "1.6.0",
49
+ "@opentelemetry/instrumentation": "0.32.0",
50
+ "@opentelemetry/resources": "1.6.0",
51
+ "@opentelemetry/sdk-metrics": "0.32.0",
52
+ "@opentelemetry/sdk-trace-base": "1.6.0",
53
+ "@opentelemetry/sdk-trace-node": "1.6.0"
54
54
  },
55
55
  "peerDependencies": {
56
- "@opentelemetry/api": ">=1.0.0 <1.2.0"
56
+ "@opentelemetry/api": ">=1.0.0 <1.3.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@opentelemetry/api": ">=1.0.0 <1.2.0",
60
- "@opentelemetry/context-async-hooks": "1.5.0",
61
- "@opentelemetry/semantic-conventions": "1.5.0",
62
- "@types/mocha": "8.2.3",
63
- "@types/node": "14.17.33",
59
+ "@opentelemetry/api": ">=1.0.0 <1.3.0",
60
+ "@opentelemetry/context-async-hooks": "1.6.0",
61
+ "@opentelemetry/semantic-conventions": "1.6.0",
62
+ "@types/mocha": "9.1.1",
63
+ "@types/node": "18.6.5",
64
64
  "@types/semver": "7.3.9",
65
- "@types/sinon": "10.0.6",
65
+ "@types/sinon": "10.0.13",
66
66
  "codecov": "3.8.3",
67
67
  "istanbul-instrumenter-loader": "3.0.1",
68
- "mocha": "7.2.0",
68
+ "mocha": "10.0.0",
69
69
  "nyc": "15.1.0",
70
70
  "semver": "7.3.5",
71
- "sinon": "12.0.1",
72
- "ts-loader": "8.3.0",
73
- "ts-mocha": "9.0.2",
71
+ "sinon": "14.0.0",
72
+ "ts-loader": "8.4.0",
73
+ "ts-mocha": "10.0.0",
74
74
  "typescript": "4.4.4"
75
75
  },
76
76
  "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-node",
77
- "gitHead": "776656b6e0cd0fc49a52b734702bc77110e483f1"
77
+ "gitHead": "a5abee69119cc41d9d34f6beb5c1826eef1ac0dd"
78
78
  }