Skip to content

Commit

Permalink
Merge branch 'main' into ritm-singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored Sep 6, 2022
2 parents 160a2b4 + 597ea98 commit a6e90ab
Show file tree
Hide file tree
Showing 219 changed files with 1,911 additions and 751 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,46 @@ jobs:
- name: Report Coverage
run: npm run codecov
if: ${{ matrix.node_version == '14' }}
node-windows-tests:
strategy:
fail-fast: false
runs-on: windows-latest
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '16'

- run: npm install -g npm@latest

- name: restore lerna
id: cache
uses: actions/cache@v3
with:
path: |
node_modules
package-lock.json
packages/*/node_modules
packages/*/package-lock.json
experimental/packages/*/node_modules
experimental/packages/*/package-lock.json
key: node-windows-tests-${{ runner.os }}-${{ hashFiles('package.json', 'packages/*/package.json', 'experimental/packages/*/package.json') }}

- name: Bootstrap
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' --ignore @opentelemetry/selenium-tests
- name: Build 🔧
run: |
npm run compile
- name: Unit tests
run: npm run test
browser-tests:
runs-on: ubuntu-latest
container:
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ All notable changes to this project will be documented in this file.

### :rocket: (Enhancement)

### :bug: (Bug Fix)

### :books: (Refine Doc)

### :house: (Internal)

## 1.6.0

### :rocket: (Enhancement)

* perf(opentelemetry-core): improve hexToBase64 performance [#3178](https://github.com/open-telemetry/opentelemetry-js/pull/3178)
* feat(sdk-trace-base): move Sampler declaration into sdk-trace-base [#3088](https://github.com/open-telemetry/opentelemetry-js/pull/3088) @legendecas
* fix(grpc-instrumentation): added grpc attributes in instrumentation [#3127](https://github.com/open-telemetry/opentelemetry-js/pull/3127) @andrewzenkov
* feat: support latest `@opentelemetry/api` [#3177](https://github.com/open-telemetry/opentelemetry-js/pull/3177) @dyladan

### :bug: (Bug Fix)

Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ This is the JavaScript version of [OpenTelemetry](https://opentelemetry.io/), a

| API Version | Core version | Experimental Packages |
| ----------- | ------------ | --------------------- |
| 1.1.x | 1.3.x | 0.30.x |
| 1.1.x | 1.2.x | 0.29.x |
| 1.2.x | 1.6.x | 0.32.x |
| 1.1.x | 1.5.x | 0.31.x |
| 1.1.x | 1.4.x | 0.30.x |
| 1.1.x | 1.2.x, 1.3.x | 0.29.x |
| 1.1.x | 1.1.x | 0.28.x |
| 1.0.x | 1.0.x | 0.26.x, 0.27.x |
| 1.0.x | 0.26.x | ----- |
Expand Down Expand Up @@ -186,7 +188,7 @@ Approvers ([@open-telemetry/js-approvers](https://github.com/orgs/open-telemetry
- [Naseem K. Ullah](https://github.com/naseemkullah), Transit
- [Neville Wylie](https://github.com/MSNev), Microsoft
- [Olivier Albertini](https://github.com/OlivierAlbertini), Ville de Montréal
- [Rauno Viskus](https://github.com/Rauno56), Splunk
- [Svetlana Brennan](https://github.com/svetlanabrennan), New Relic

*Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver).*

Expand Down Expand Up @@ -225,12 +227,12 @@ Maintainers ([@open-telemetry/js-maintainers](https://github.com/orgs/open-telem

### Implementation / SDKs

| Package | Description |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [@opentelemetry/sdk-trace-base][otel-tracing] | This module provides a full control over instrumentation and span creation. It doesn't load [`async_hooks`](https://nodejs.org/api/async_hooks.html) or any instrumentation by default. It is intended for use both on the server and in the browser. |
| [@opentelemetry/sdk-metrics-base][otel-metrics] | This module provides instruments and meters for reporting of time series data. |
| [@opentelemetry/sdk-trace-node][otel-node] | This module provides automatic tracing for Node.js applications. It is intended for use on the server only. |
| [@opentelemetry/sdk-trace-web][otel-web] | This module provides automated instrumentation and tracing for Web applications. It is intended for use in the browser only. |
| Package | Description |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [@opentelemetry/sdk-trace-base][otel-tracing] | This module provides a full control over instrumentation and span creation. It doesn't load [`async_hooks`](https://nodejs.org/api/async_hooks.html) or any instrumentation by default. It is intended for use both on the server and in the browser. |
| [@opentelemetry/sdk-metrics][otel-metrics] | This module provides instruments and meters for reporting of time series data. |
| [@opentelemetry/sdk-trace-node][otel-node] | This module provides automatic tracing for Node.js applications. It is intended for use on the server only. |
| [@opentelemetry/sdk-trace-web][otel-web] | This module provides automated instrumentation and tracing for Web applications. It is intended for use in the browser only. |

### Compatible Exporters

Expand Down Expand Up @@ -540,7 +542,7 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
[compliance-matrix]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md
[CONTRIBUTING]: https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md

[otel-metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-metrics-base
[otel-metrics]: https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-metrics
[otel-node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node

[otel-instrumentation-fetch]: https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch
Expand Down
6 changes: 3 additions & 3 deletions doc/processor-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Sometimes you may want to use a specific aggregator for one of your metric, expo
Here is what an aggregator that does that would look like:

```ts
import { Aggregator } from '@opentelemetry/sdk-metrics-base';
import { Aggregator } from '@opentelemetry/sdk-metrics';
import { hrTime } from '@opentelemetry/core';

export class AverageAggregator implements Aggregator {
Expand Down Expand Up @@ -54,7 +54,7 @@ import {
CounterSumAggregator,
ObserverAggregator,
MeasureExactAggregator,
} from '@opentelemetry/sdk-metrics-base';
} from '@opentelemetry/sdk-metrics';

export class CustomProcessor extends UngroupedProcessor {
aggregatorFor (metricDescriptor: MetricDescriptor) {
Expand Down Expand Up @@ -86,7 +86,7 @@ import {
MeasureExactAggregator,
MeterProvider,
Aggregator,
} from '@opentelemetry/sdk-metrics-base';
} from '@opentelemetry/sdk-metrics';
import { hrTime } from '@opentelemetry/core';

export class AverageAggregator implements Aggregator {
Expand Down
8 changes: 3 additions & 5 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
"indent": ["error", 2, { "SwitchCase": 1 }],
"no-trailing-spaces": "error",
"eol-last": "error",
"quotes": [2, "single", { "avoidEscape": true }],
"quotes": ["error", "single", { "avoidEscape": true }],
"brace-style": ["error", "1tbs"],
"eqeqeq": [
"error",
Expand All @@ -24,7 +24,7 @@ module.exports = {
"no-shadow": "off",
"arrow-parens": ["error", "as-needed"],
"node/no-deprecated-api": ["warn"],
"header/header": [2, "block", [{
"header/header": ["error", "block", [{
pattern: / \* Copyright The OpenTelemetry Authors[\r\n]+ \*[\r\n]+ \* Licensed under the Apache License, Version 2\.0 \(the \"License\"\);[\r\n]+ \* you may not use this file except in compliance with the License\.[\r\n]+ \* You may obtain a copy of the License at[\r\n]+ \*[\r\n]+ \* https:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0[\r\n]+ \*[\r\n]+ \* Unless required by applicable law or agreed to in writing, software[\r\n]+ \* distributed under the License is distributed on an \"AS IS\" BASIS,[\r\n]+ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[\r\n]+ \* See the License for the specific language governing permissions and[\r\n]+ \* limitations under the License\./gm,
template:
`\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 `
Expand All @@ -34,7 +34,7 @@ module.exports = {
{
files: ['*.ts'],
rules: {
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/naming-convention": [
"error",
Expand All @@ -45,7 +45,6 @@ module.exports = {
"leadingUnderscore": "require"
}
],
"@typescript-eslint/no-shadow": ["warn"],
"@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "^_", "args": "after-used"}],
"@typescript-eslint/no-inferrable-types": ["error", { ignoreProperties: true }],
"@typescript-eslint/no-empty-function": ["off"],
Expand All @@ -65,7 +64,6 @@ module.exports = {
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": 1,
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-shadow": ["off"],
Expand Down
18 changes: 9 additions & 9 deletions examples/https/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "https-example",
"private": true,
"version": "0.31.0",
"version": "0.32.0",
"description": "Example of HTTPs integration with OpenTelemetry",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -33,14 +33,14 @@
},
"dependencies": {
"@opentelemetry/api": "^1.0.0",
"@opentelemetry/exporter-jaeger": "1.5.0",
"@opentelemetry/exporter-zipkin": "1.5.0",
"@opentelemetry/instrumentation": "0.31.0",
"@opentelemetry/instrumentation-http": "0.31.0",
"@opentelemetry/resources": "1.5.0",
"@opentelemetry/sdk-trace-base": "1.5.0",
"@opentelemetry/sdk-trace-node": "1.5.0",
"@opentelemetry/semantic-conventions": "1.5.0"
"@opentelemetry/exporter-jaeger": "1.6.0",
"@opentelemetry/exporter-zipkin": "1.6.0",
"@opentelemetry/instrumentation": "0.32.0",
"@opentelemetry/instrumentation-http": "0.32.0",
"@opentelemetry/resources": "1.6.0",
"@opentelemetry/sdk-trace-base": "1.6.0",
"@opentelemetry/sdk-trace-node": "1.6.0",
"@opentelemetry/semantic-conventions": "1.6.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/https",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/opentelemetry-web/examples/metrics/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { DiagConsoleLogger, DiagLogLevel, diag } = require('@opentelemetry/api');
const { metrics } = require('@opentelemetry/api-metrics');
const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-http');
const { MeterProvider, PeriodicExportingMetricReader } = require('@opentelemetry/sdk-metrics-base');
const { MeterProvider, PeriodicExportingMetricReader } = require('@opentelemetry/sdk-metrics');

// Optional and only needed to see the internal diagnostic logging (during development)
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
Expand Down
32 changes: 16 additions & 16 deletions examples/opentelemetry-web/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "web-opentelemetry-example",
"private": true,
"version": "0.31.0",
"description": "Example of using @opentelemetry/sdk-trace-web and @opentelemetry/sdk-metrics-base in browser",
"version": "0.32.0",
"description": "Example of using @opentelemetry/sdk-trace-web and @opentelemetry/sdk-metrics in browser",
"main": "index.js",
"scripts": {
"start": "webpack serve --progress --color --port 8090 --config webpack.dev.config.js --hot --host 0.0.0.0 --compress",
Expand Down Expand Up @@ -43,20 +43,20 @@
},
"dependencies": {
"@opentelemetry/api": "^1.0.2",
"@opentelemetry/api-metrics": "0.31.0",
"@opentelemetry/context-zone": "^1.0.1",
"@opentelemetry/core": "^1.0.1",
"@opentelemetry/exporter-metrics-otlp-http": "0.31.0",
"@opentelemetry/exporter-trace-otlp-http": "0.31.0",
"@opentelemetry/exporter-zipkin": "^1.0.1",
"@opentelemetry/instrumentation": "0.31.0",
"@opentelemetry/instrumentation-fetch": "0.31.0",
"@opentelemetry/instrumentation-xml-http-request": "0.31.0",
"@opentelemetry/propagator-b3": "^1.0.1",
"@opentelemetry/sdk-metrics-base": "0.31.0",
"@opentelemetry/sdk-trace-base": "^1.0.1",
"@opentelemetry/sdk-trace-web": "^1.0.1",
"@opentelemetry/semantic-conventions": "^1.0.1"
"@opentelemetry/api-metrics": "0.32.0",
"@opentelemetry/context-zone": "1.6.0",
"@opentelemetry/core": "1.6.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.32.0",
"@opentelemetry/exporter-trace-otlp-http": "0.32.0",
"@opentelemetry/exporter-zipkin": "1.6.0",
"@opentelemetry/instrumentation": "0.32.0",
"@opentelemetry/instrumentation-fetch": "0.32.0",
"@opentelemetry/instrumentation-xml-http-request": "0.32.0",
"@opentelemetry/propagator-b3": "1.6.0",
"@opentelemetry/sdk-metrics": "0.32.0",
"@opentelemetry/sdk-trace-base": "1.6.0",
"@opentelemetry/sdk-trace-web": "1.6.0",
"@opentelemetry/semantic-conventions": "1.6.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web"
}
2 changes: 1 addition & 1 deletion examples/otlp-exporter-node/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { DiagConsoleLogger, DiagLogLevel, diag } = require('@opentelemetry/api');
const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-http');
// const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-grpc');
// const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-proto');
const { MeterProvider, PeriodicExportingMetricReader } = require('@opentelemetry/sdk-metrics-base');
const { MeterProvider, PeriodicExportingMetricReader } = require('@opentelemetry/sdk-metrics');
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');

Expand Down
26 changes: 13 additions & 13 deletions examples/otlp-exporter-node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example-otlp-exporter-node",
"private": true,
"version": "0.31.0",
"version": "0.32.0",
"description": "Example of using @opentelemetry/collector-exporter in Node.js",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -29,18 +29,18 @@
},
"dependencies": {
"@opentelemetry/api": "^1.1.0",
"@opentelemetry/api-metrics": "0.31.0",
"@opentelemetry/core": "1.5.0",
"@opentelemetry/exporter-metrics-otlp-grpc": "0.31.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.31.0",
"@opentelemetry/exporter-metrics-otlp-proto": "0.31.0",
"@opentelemetry/exporter-trace-otlp-grpc": "0.31.0",
"@opentelemetry/exporter-trace-otlp-http": "0.31.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.31.0",
"@opentelemetry/resources": "1.5.0",
"@opentelemetry/sdk-metrics-base": "0.31.0",
"@opentelemetry/sdk-trace-base": "1.5.0",
"@opentelemetry/semantic-conventions": "1.5.0"
"@opentelemetry/api-metrics": "0.32.0",
"@opentelemetry/core": "1.6.0",
"@opentelemetry/exporter-metrics-otlp-grpc": "0.32.0",
"@opentelemetry/exporter-metrics-otlp-http": "0.32.0",
"@opentelemetry/exporter-metrics-otlp-proto": "0.32.0",
"@opentelemetry/exporter-trace-otlp-grpc": "0.32.0",
"@opentelemetry/exporter-trace-otlp-http": "0.32.0",
"@opentelemetry/exporter-trace-otlp-proto": "0.32.0",
"@opentelemetry/resources": "1.6.0",
"@opentelemetry/sdk-metrics": "0.32.0",
"@opentelemetry/sdk-trace-base": "1.6.0",
"@opentelemetry/semantic-conventions": "1.6.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/otlp-exporter-node"
}
Loading

0 comments on commit a6e90ab

Please sign in to comment.