From e51e86f3aab2fdf5944c7529a9b401ccdc8dff94 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 8 Oct 2025 18:15:08 +0200 Subject: [PATCH 1/3] fix links --- .github/config/lychee.toml | 17 +++++++++++ .../reusable-markdown-link-check.yml | 29 ++++++++++--------- CHANGELOG.md | 4 +-- mise.toml | 21 ++++++++++++++ sdk-extensions/incubator/README.md | 2 +- 5 files changed, 57 insertions(+), 16 deletions(-) create mode 100644 .github/config/lychee.toml create mode 100644 mise.toml diff --git a/.github/config/lychee.toml b/.github/config/lychee.toml new file mode 100644 index 00000000000..3ee96b393a5 --- /dev/null +++ b/.github/config/lychee.toml @@ -0,0 +1,17 @@ +timeout = 30 +retry_wait_time = 5 +max_retries = 6 +max_concurrency = 4 + +# Check link anchors +include_fragments = true + +remap = [ + # workaround for https://github.com/lycheeverse/lychee/issues/1729 + 'https://github.com/(.*?)/(.*?)/blob/(.*?)/(.*#.*)$ https://raw.githubusercontent.com/$1/$2/$3/$4', +] + +# excluding links to pull requests and issues is done for performance +exclude = [ + '^https://github.com/open-telemetry/opentelemetry-java/(issues|pull)/\d+$', +] diff --git a/.github/workflows/reusable-markdown-link-check.yml b/.github/workflows/reusable-markdown-link-check.yml index 3d1f3815dde..d778dea64fa 100644 --- a/.github/workflows/reusable-markdown-link-check.yml +++ b/.github/workflows/reusable-markdown-link-check.yml @@ -1,4 +1,4 @@ -name: Reusable - Markdown link check +name: Reusable - Link check on: workflow_call: @@ -7,19 +7,22 @@ permissions: contents: read jobs: - markdown-link-check: + link-check: runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - - uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2.6.1 with: - lycheeVersion: v0.18.1 - # excluding links to pull requests and issues is done for performance - args: > - --include-fragments - --exclude "^https://github.com/open-telemetry/opentelemetry-java/(issues|pull)/\\d+$" - --max-retries 6 - --retry-wait-time 10 - --max-concurrency 4 - . + fetch-depth: 0 # needed for merge-base used in lint:links-in-modified-files + + - uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1 + + - name: Link check - relative links (all files) + if: github.event_name == 'pull_request' + env: + GITHUB_TOKEN: ${{ github.token }} + run: mise run lint:local-links + + - name: Link check (modified files only) + env: + GITHUB_TOKEN: ${{ github.token }} + run: mise run lint:links-in-modified-files --base origin/${{ github.base_ref }} --head ${{ github.event.pull_request.head.sha }} --event ${{ github.event_name }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 83440586446..63c712e26eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1429,7 +1429,7 @@ the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specificat is _not_ meant for end users. Log appenders use the API to bridge logs from existing log frameworks (e.g. JUL, Log4j, SLf4J, Logback) into OpenTelemetry. Users configure the Log SDK to dictate how logs are processed and exported. -See [opentelemetry.io](https://opentelemetry.io/docs/instrumentation/java/manual/#logs) for +See [opentelemetry.io](https://opentelemetry.io/docs/languages/java/api/#logrecordbuilder) for documentation on usage. ### API @@ -3902,7 +3902,7 @@ See the `opentelemetry-extension-kotlin` module for details. #### Breaking changes -- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the [YAML Model for Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/tree/main/model#yaml-model-for-semantic-conventions). +- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the [YAML Model for Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/model/README.md#yaml-model-for-semantic-conventions). - All API classes have been moved into the `io.opentelemetry.api.` prefix to support JPMS users. - The API no longer uses the `grpc-context` as the context implementation. It now uses `io.opentelemetry.context.Context`. This is published in the `opentelemetry-context` artifact. Interactions with the context were mostly moved to static methods in the `Span` and `Baggage` interfaces. - The Baggage API has been reworked to more closely match the specification. This includes the removal of the `BaggageManager`. Baggage is fully functional within the API, without needing to install an SDK. diff --git a/mise.toml b/mise.toml new file mode 100644 index 00000000000..2f3504de779 --- /dev/null +++ b/mise.toml @@ -0,0 +1,21 @@ +[tools] +lychee = "0.20.1" + +[settings] +# Only install tools explicitly defined in the [tools] section above +idiomatic_version_file_enable_tools = [] + +# Windows configuration for file-based tasks +# Based on: https://github.com/jdx/mise/discussions/4461 +windows_executable_extensions = ["sh"] +windows_default_file_shell_args = "bash" +use_file_shell_for_executable_tasks = true + +[tasks."lint:links"] +file = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-java-contrib/refs/heads/main/.mise/tasks/lint/links.sh" + +[tasks."lint:local-links"] +file = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-java-contrib/refs/heads/main/.mise/tasks/lint/local-links.sh" + +[tasks."lint:links-in-modified-files"] +file = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-java-contrib/refs/heads/main/.mise/tasks/lint/links-in-modified-files.sh" diff --git a/sdk-extensions/incubator/README.md b/sdk-extensions/incubator/README.md index 1938182c9e3..3dc539bf0d2 100644 --- a/sdk-extensions/incubator/README.md +++ b/sdk-extensions/incubator/README.md @@ -122,4 +122,4 @@ Additional notes on usage: [`last_value`]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#last-value-aggregation [`drop`]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#drop-aggregation [`explicit_bucket_histogram`]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation -[`exponential_bucket_histogram`]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exponential-bucket-histogram-aggregation +[`exponential_bucket_histogram`]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#base2-exponential-bucket-histogram-aggregation From 22e1ea9b5184742ae7a8748d4e6136f1b0ec6d9f Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 8 Oct 2025 18:49:13 +0200 Subject: [PATCH 2/3] fix links --- .github/config/lychee.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/config/lychee.toml b/.github/config/lychee.toml index 3ee96b393a5..ce81581c300 100644 --- a/.github/config/lychee.toml +++ b/.github/config/lychee.toml @@ -14,4 +14,5 @@ remap = [ # excluding links to pull requests and issues is done for performance exclude = [ '^https://github.com/open-telemetry/opentelemetry-java/(issues|pull)/\d+$', + '^https://www.javadoc.io/badge/(.*?)/(.*?).svg$', # returns 522 ] From 4ead00b8a11bddf0d88eee3f56947d10bb3d0744 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 9 Oct 2025 09:35:43 +0200 Subject: [PATCH 3/3] Update CHANGELOG.md Co-authored-by: Trask Stalnaker --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63c712e26eb..bee47ad1bf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1429,7 +1429,7 @@ the [Logs Bridge API](https://github.com/open-telemetry/opentelemetry-specificat is _not_ meant for end users. Log appenders use the API to bridge logs from existing log frameworks (e.g. JUL, Log4j, SLf4J, Logback) into OpenTelemetry. Users configure the Log SDK to dictate how logs are processed and exported. -See [opentelemetry.io](https://opentelemetry.io/docs/languages/java/api/#logrecordbuilder) for +See [opentelemetry.io](https://opentelemetry.io/docs/languages/java/api/#loggerprovider) for documentation on usage. ### API