diff --git a/.github/config/lychee.toml b/.github/config/lychee.toml new file mode 100644 index 00000000000..ce81581c300 --- /dev/null +++ b/.github/config/lychee.toml @@ -0,0 +1,18 @@ +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+$', + '^https://www.javadoc.io/badge/(.*?)/(.*?).svg$', # returns 522 +] 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..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/instrumentation/java/manual/#logs) for +See [opentelemetry.io](https://opentelemetry.io/docs/languages/java/api/#loggerprovider) 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