Skip to content

Commit

Permalink
Merge branch 'main' into dvoytenko/attrs-in-record-exception
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc authored Aug 30, 2023
2 parents 8f71f2c + c84637f commit 96df3fa
Show file tree
Hide file tree
Showing 34 changed files with 63 additions and 39 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/

* feat(api): add attributes argument to recordException API [#4071](https://github.com/open-telemetry/opentelemetry-js/pull/4071)
* feat(sdk-metrics): implement MetricProducer specification [#4007](https://github.com/open-telemetry/opentelemetry-js/pull/4007)
* feat: update PeriodicExportingMetricReader and PrometheusExporter to accept optional metric producers [#4077](https://github.com/open-telemetry/opentelemetry-js/pull/4077) @aabmass

### :bug: (Bug Fix)

Expand Down
7 changes: 7 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ All notable changes to experimental packages in this project will be documented
* `NodeSDK.configureLoggerProvider()`, please use constructor options instead
* `NodeSDK.addResource()`, please use constructor options instead
* `NodeSDK.detectResources()`, this is not necessary anymore, resources are now auto-detected on startup.
* chore(sdk-node): add notice that '@opentelemetry/exporter-jaeger' has to be installed manually in the next version [#4068](https://github.com/open-telemetry/opentelemetry-js/pull/4068) @pichlermarc
* Starting with 0.43.0 '@opentelemetry/exporter-jaeger' will no longer be a dependency of this package. To continue using '@opentelemetry/exporter-jaeger', please install it manually.
* NOTE: `@opentelemetry/exporter-jaeger` is deprecated, consider switching to one of the alternatives described [here](https://www.npmjs.com/package/@opentelemetry/exporter-jaeger)

### :rocket: (Enhancement)

* feat: update PeriodicExportingMetricReader and PrometheusExporter to accept optional metric producers [#4077](https://github.com/open-telemetry/opentelemetry-js/pull/4077) @aabmass

### :bug: (Bug Fix)

* fix(exporter-logs-otlp-http): add @opentelemetry/api-logs as dependency

### :books: (Refine Doc)

### :house: (Internal)
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/exporter-logs-otlp-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@grpc/proto-loader": "^0.7.3",
"@opentelemetry/api": "1.4.1",
"@opentelemetry/api-logs": "0.41.2",
Expand Down
6 changes: 3 additions & 3 deletions experimental/packages/exporter-logs-otlp-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@
],
"sideEffects": false,
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@opentelemetry/api-logs": "0.41.2",
"@opentelemetry/resources": "1.15.2",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down Expand Up @@ -102,12 +101,13 @@
"webpack-merge": "5.9.0"
},
"peerDependencies": {
"@opentelemetry/api-logs": ">=0.38.0"
"@opentelemetry/api": "^1.0.0"
},
"dependencies": {
"@opentelemetry/core": "1.15.2",
"@opentelemetry/otlp-exporter-base": "0.41.2",
"@opentelemetry/otlp-transformer": "0.41.2",
"@opentelemetry/api-logs": "0.41.2",
"@opentelemetry/sdk-logs": "0.41.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@grpc/proto-loader": "^0.7.3",
"@opentelemetry/api": "1.4.1",
"@opentelemetry/otlp-exporter-base": "0.41.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@grpc/proto-loader": "^0.7.3",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class PrometheusExporter extends MetricReader {
aggregationSelector: _instrumentType => Aggregation.Default(),
aggregationTemporalitySelector: _instrumentType =>
AggregationTemporality.CUMULATIVE,
metricProducers: config.metricProducers,
});
this._host =
config.host ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import { MetricProducer } from '@opentelemetry/sdk-metrics';

/**
* Configuration interface for prometheus exporter
*/
Expand Down Expand Up @@ -56,4 +58,12 @@ export interface ExporterConfig {
* @default false
*/
preventServerStart?: boolean;

/**
* **Note, this option is experimental**. Additional MetricProducers to use as a source of
* aggregated metric data in addition to the SDK's metric data. The resource returned by
* these MetricProducers is ignored; the SDK's resource will be used instead.
* @experimental
*/
metricProducers?: MetricProducer[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@opentelemetry/context-zone": "1.15.2",
"@opentelemetry/propagator-b3": "1.15.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@protobuf-ts/runtime-rpc": "2.9.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
"@types/semver": "7.5.0",
"@types/semver": "7.5.1",
"@types/sinon": "10.0.16",
"codecov": "3.8.3",
"cross-var": "1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
"@types/request-promise-native": "1.0.18",
"@types/semver": "7.5.0",
"@types/semver": "7.5.1",
"@types/sinon": "10.0.16",
"@types/superagent": "4.1.18",
"axios": "1.4.0",
"axios": "1.5.0",
"codecov": "3.8.3",
"cross-var": "1.1.0",
"lerna": "7.1.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@opentelemetry/context-zone": "1.15.2",
"@opentelemetry/propagator-b3": "1.15.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
"@opentelemetry/api": "^1.3.0"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@opentelemetry/sdk-metrics": "1.15.2",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
"@types/semver": "7.5.0",
"@types/semver": "7.5.1",
"@types/sinon": "10.0.16",
"@types/webpack-env": "1.16.3",
"babel-loader": "8.3.0",
Expand Down
5 changes: 3 additions & 2 deletions experimental/packages/opentelemetry-sdk-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"watch": "tsc --build --watch",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
"prewatch": "npm run precompile",
"peer-api-check": "node ../../../scripts/peer-api-check.js"
"peer-api-check": "node ../../../scripts/peer-api-check.js",
"postinstall": "node -e \"console.log(\\\"\\x1b[95m%s\\x1b[0m\\\", \\\"@opentelemetry/sdk-node - warning: Starting with 0.43.0 '@opentelemetry/exporter-jaeger' will no longer be automatically installed by this package. To continue using '@opentelemetry/exporter-jaeger', please install it manually.\\n(NOTE: '@opentelemetry/exporter-jaeger' is deprecated, consider switching to one of the alternatives described in https://www.npmjs.com/package/@opentelemetry/exporter-jaeger)\\\");\""
},
"keywords": [
"opentelemetry",
Expand Down Expand Up @@ -67,7 +68,7 @@
"@opentelemetry/context-async-hooks": "1.15.2",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
"@types/semver": "7.5.0",
"@types/semver": "7.5.1",
"@types/sinon": "10.0.16",
"codecov": "3.8.3",
"cross-var": "1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/otlp-exporter-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@opentelemetry/core": "1.15.2"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/otlp-grpc-exporter-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@opentelemetry/otlp-transformer": "0.41.2",
"@opentelemetry/resources": "1.15.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "1.4.1",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
2 changes: 1 addition & 1 deletion experimental/packages/sdk-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@opentelemetry/api-logs": ">=0.39.1"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": ">=1.4.0 <1.5.0",
"@opentelemetry/api-logs": "0.41.2",
"@types/mocha": "10.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@opentelemetry/context-async-hooks": "1.15.2",
"@opentelemetry/core": "1.15.2",
"@opentelemetry/sdk-trace-base": "1.15.2",
"axios": "1.4.0",
"axios": "1.5.0",
"body-parser": "1.19.0",
"express": "4.17.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": ">=1.0.0 <1.5.0",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-context-zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
"@types/sinon": "10.0.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-exporter-zipkin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": "^1.0.0",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-sdk-trace-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@opentelemetry/semantic-conventions": "1.15.2",
"@types/mocha": "10.0.1",
"@types/node": "18.6.5",
"@types/semver": "7.5.0",
"@types/semver": "7.5.1",
"@types/sinon": "10.0.16",
"codecov": "3.8.3",
"cross-var": "1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-sdk-trace-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": ">=1.0.0 <1.5.0",
"@opentelemetry/context-zone": "1.15.2",
"@opentelemetry/propagator-b3": "1.15.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@opentelemetry/api": ">=1.3.0 <1.5.0",
"@types/lodash.merge": "4.6.7",
"@types/mocha": "10.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { MetricReader } from './MetricReader';
import { PushMetricExporter } from './MetricExporter';
import { callWithTimeout, TimeoutError } from '../utils';
import { diag } from '@opentelemetry/api';
import { MetricProducer } from './MetricProducer';

export type PeriodicExportingMetricReaderOptions = {
/**
Expand All @@ -40,6 +41,13 @@ export type PeriodicExportingMetricReaderOptions = {
* Milliseconds for the async observable callback to timeout.
*/
exportTimeoutMillis?: number;
/**
* **Note, this option is experimental**. Additional MetricProducers to use as a source of
* aggregated metric data in addition to the SDK's metric data. The resource returned by
* these MetricProducers is ignored; the SDK's resource will be used instead.
* @experimental
*/
metricProducers?: MetricProducer[];
};

/**
Expand All @@ -59,6 +67,7 @@ export class PeriodicExportingMetricReader extends MetricReader {
),
aggregationTemporalitySelector:
options.exporter.selectAggregationTemporality?.bind(options.exporter),
metricProducers: options.metricProducers,
});

if (
Expand Down
7 changes: 1 addition & 6 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,9 @@
{
"matchPackageNames": ["typescript", "webpack", "webpack-cli"],
"dependencyDashboardApproval": true
},
{
"matchPaths": ["experimental/backwards-compatibility/**"],
"matchPackageNames": ["@types/node"],
"enabled": false
}
],
"ignoreDeps": ["@opentelemetry/api", "@opentelemetry/resources_1.9.0"],
"ignoreDeps": ["@opentelemetry/api", "@opentelemetry/resources_1.9.0", "@types/node"],
"assignees": ["@blumamir", "@dyladan", "@legendecas", "@pichlermarc"],
"labels": ["dependencies"]
}
2 changes: 1 addition & 1 deletion selenium-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"access": "restricted"
},
"devDependencies": {
"@babel/core": "7.22.10",
"@babel/core": "7.22.11",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.22.10",
"@babel/plugin-transform-runtime": "7.22.10",
Expand Down

0 comments on commit 96df3fa

Please sign in to comment.