diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d90afefbdc..9b96d1a633 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,10 +13,12 @@ jobs: matrix: package-group: [".", "experimental"] runs-on: ubuntu-latest - container: - image: node:14 steps: + - uses: actions/setup-node@v2 + with: + node-version: '14' + - uses: actions/checkout@v2 - name: Lint changelog file @@ -34,7 +36,8 @@ jobs: if: ${{ matrix.package-group == '.' }} uses: avto-dev/markdown-lint@v1 with: - args: "./**/*.md -i ./CHANGELOG.md" + args: "./**/*.md" + ignore: './CHANGELOG.md ./experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/protos ./experimental/packages/opentelemetry-exporter-metrics-otlp-proto/protos ./packages/exporter-trace-otlp-grpc/protos ./packages/exporter-trace-otlp-proto/protos' - name: restore lerna id: cache @@ -45,7 +48,7 @@ jobs: experimental/node_modules */*/node_modules experimental/*/*/node_modules - key: lint-${{ matrix.package-group }}-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}-20211009.2 + key: lint-${{ matrix.package-group }}-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}-20211216.2 # On a cache miss, install dependencies - name: Bootstrap @@ -53,10 +56,17 @@ jobs: working-directory: ${{ matrix.package-group }} run: | npm install --ignore-scripts - npx lerna bootstrap --no-ci --ignore-scripts --hoist --nohoist='zone.js' -- --only=dev + npx lerna bootstrap --no-ci --hoist --nohoist='zone.js' - name: Lint working-directory: ${{ matrix.package-group }} run: | npm run lint npm run lint:examples + + - name: Lint doc files + if: ${{ matrix.package-group == '.' }} + run: | + npm run compile + NODE_OPTIONS=--max-old-space-size=4096 npm run docs + npm run docs:test diff --git a/.github/workflows/markdown-lint.config.json b/.github/workflows/markdown-lint.config.json deleted file mode 100644 index e36e46b077..0000000000 --- a/.github/workflows/markdown-lint.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "retryOn429": true, - "ignorePatterns": [ - { - "pattern": "^http://localhost" - }, - { - "pattern": "^https://github.com/snyder114" - } - ] -} diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml deleted file mode 100644 index b73acf42a8..0000000000 --- a/.github/workflows/markdown-lint.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Markdown Linter - -# Link checking costs tens of minutes to run. -# Runs everyday at 9 am. -on: - schedule: - - cron: "0 9 * * *" - -jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: gaurav-nelson/github-action-markdown-link-check@v1 - # checks all markdown including all subfolders - with: - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' - config-file: '.github/workflows/markdown-lint.config.json' diff --git a/README.md b/README.md index 4eb1202b1f..33eeeff0b2 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,6 @@   •   Development Guide   •   - Benchmarks -   •   Examples

@@ -174,7 +172,7 @@ For a more detailed breakdown of feature support see the [specification complian We'd love your help!. Use tags [up-for-grabs][up-for-grabs-issues] and [good first issue][good-first-issues] to get started with the project. For instructions to build and make changes to this project, see the -[CONTRIBUTING](CONTRIBUTING.md) guide. +[CONTRIBUTING][CONTRIBUTING] guide. We have a weekly SIG meeting! See the [community page](https://github.com/open-telemetry/community#javascript-sdk) for meeting details and notes. @@ -370,7 +368,7 @@ Collector exporter packages and types are renamed: - All plugins have been removed in favor of instrumentations. -- The `@opentelemetry/propagator-b3` package previously exported three propagators: `B3Propagator`,`B3SinglePropagator`, and `B3MultiPropagator`, but now only exports the `B3Propagator`. It extracts b3 context in single and multi-header encodings, and injects context using the single-header encoding by default, but can be configured to inject context using the multi-header endcoding during construction: `new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })`. If you were previously using the `B3SinglePropagator` or `B3MultiPropagator` directly, you should update your code to use the `B3Propagator` with the appropriate configuration. See the [readme](./packages/opentelemetry-propagator-b3/README.md) for full details and usage. +- The `@opentelemetry/propagator-b3` package previously exported three propagators: `B3Propagator`,`B3SinglePropagator`, and `B3MultiPropagator`, but now only exports the `B3Propagator`. It extracts b3 context in single and multi-header encodings, and injects context using the single-header encoding by default, but can be configured to inject context using the multi-header endcoding during construction: `new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })`. If you were previously using the `B3SinglePropagator` or `B3MultiPropagator` directly, you should update your code to use the `B3Propagator` with the appropriate configuration. See the [readme][otel-propagator-b3] for full details and usage. - Sampling configuration via environment variable has changed. If you were using `OTEL_SAMPLING_PROBABILITY` then you should replace it with `OTEL_TRACES_SAMPLER=parentbased_traceidratio` and `OTEL_TRACES_SAMPLER_ARG=` where `` is a number in the [0..1] range, e.g. "0.25". Default is 1.0 if unset. @@ -535,6 +533,7 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [docs]: https://open-telemetry.github.io/opentelemetry-js [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-node]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node @@ -549,6 +548,7 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [otel-web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web [otel-api]: https://github.com/open-telemetry/opentelemetry-js-api [otel-core]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core +[otel-propagator-b3]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-propagator-b3 [generate-api-documentation]: https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md#generating-api-documentation [otel-contrib-instrumentation-dns]: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-dns diff --git a/package.json b/package.json index 3ab896698a..c8bca1ae73 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "predocs-test": "npm run docs", "docs": "typedoc && touch docs/.nojekyll", "docs-deploy": "gh-pages --dotfiles --dist docs", + "docs:test": "linkinator docs --silent && linkinator doc/*.md --silent", "lint": "lerna run lint", "lint:changed": "lerna run --concurrency 1 --stream lint --since HEAD --exclude-dependents", "lint:fix": "lerna run lint:fix", @@ -61,6 +62,7 @@ "husky": "4.3.8", "lerna": "3.22.1", "lerna-changelog": "1.0.1", + "linkinator": "^2.16.2", "markdownlint-cli": "0.29.0", "semver": "7.3.5", "typedoc": "0.22.10",