diff --git a/.lychee.toml b/.github/config/lychee.toml similarity index 87% rename from .lychee.toml rename to .github/config/lychee.toml index 6de9f0fb9..977b206f3 100644 --- a/.lychee.toml +++ b/.github/config/lychee.toml @@ -1,3 +1,6 @@ +# Lychee configuration file +# See https://lychee.cli.rs/guides/config/ + timeout = 30 retry_wait_time = 5 max_retries = 6 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c5a2bc905..e0e6abc4c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,19 +13,9 @@ on: jobs: check-links: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v6.0.2 - - - name: Check all links in *.md files - id: lychee - uses: lycheeverse/lychee-action@v2.8.0 - with: - lycheeVersion: v0.18.1 - args: >- - -v -n "*.md" "**/*.md" - --config .lychee.toml - --github-token ${{ github.token }} + # release branches are excluded + if: "!startsWith(github.ref_name, 'release/')" + uses: ./.github/workflows/reusable-link-check.yml build: runs-on: ubuntu-24.04 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index e8f7a65b2..874c9819c 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -7,19 +7,9 @@ on: jobs: check-links: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v6.0.2 - - - name: Check all links in *.md files - id: lychee - uses: lycheeverse/lychee-action@v2.8.0 - with: - lycheeVersion: v0.18.1 - args: >- - -v -n "*.md" "**/*.md" - --config .lychee.toml - --github-token ${{ github.token }} + # release branches are excluded + if: "!startsWith(github.ref_name, 'release/')" + uses: ./.github/workflows/reusable-link-check.yml build: runs-on: ubuntu-24.04 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 130c0bd44..4bce17994 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -9,18 +9,9 @@ on: jobs: check-links: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v6.0.2 - - - name: Check all links in *.md files - id: lychee - uses: lycheeverse/lychee-action@v2.8.0 - with: - lycheeVersion: v0.18.1 - args: >- - -v -n "*.md" "**/*.md" - --config .lychee.toml + # release branches are excluded + if: "!startsWith(github.ref_name, 'release/')" + uses: ./.github/workflows/reusable-link-check.yml build: runs-on: ubuntu-24.04 diff --git a/.github/workflows/reusable-link-check.yml b/.github/workflows/reusable-link-check.yml new file mode 100644 index 000000000..df5ab8d82 --- /dev/null +++ b/.github/workflows/reusable-link-check.yml @@ -0,0 +1,31 @@ +name: Reusable - Link check + +on: + workflow_call: + +permissions: + contents: read + +jobs: + link-check: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 # needed for merge-base used in modified-files mode + + - uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3 + + - name: Link check for pull requests + if: github.event_name == 'pull_request' + env: + GITHUB_TOKEN: ${{ github.token }} + GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }} + PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} + run: mise run lint:links + + - name: Link check for pushes and scheduled workflows + if: github.event_name != 'pull_request' + env: + GITHUB_TOKEN: ${{ github.token }} + run: mise run lint:links --full diff --git a/docs/advanced-config.md b/docs/advanced-config.md index 04d381b13..3fca7fc5d 100644 --- a/docs/advanced-config.md +++ b/docs/advanced-config.md @@ -31,9 +31,9 @@ The Splunk Distribution of OpenTelemetry Java uses the OTLP traces exporter as t ## Trace propagation configuration -| System property | Environment variable | Default value | Support | Description | -|--------------------|----------------------|------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `otel.propagators` | `OTEL_PROPAGATORS` | `tracecontext,baggage` | Stable | A comma-separated list of propagators that will be used. You can find the list of supported propagators [here](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure#propagator). | +| System property | Environment variable | Default value | Support | Description | +|--------------------|----------------------|------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `otel.propagators` | `OTEL_PROPAGATORS` | `tracecontext,baggage` | Stable | A comma-separated list of propagators that will be used. You can find the list of supported propagators [here](https://opentelemetry.io/docs/languages/java/configuration/#properties-general). | If you wish to be compatible with older versions of the Splunk Distribution of OpenTelemetry Java (or the SignalFx Tracing Java Agent) you can set the trace propagator to B3: @@ -62,7 +62,7 @@ export OTEL_PROPAGATORS=b3multi | `otel.traces.sampler` | `OTEL_TRACES_SAMPLER` | `always_on` | Stable | The sampler to use for tracing. | Splunk Distribution of OpenTelemetry Java supports all standard samplers as provided by -[OpenTelemetry Java SDK Autoconfigure](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure#sampler). +[OpenTelemetry Java SDK Autoconfigure](https://opentelemetry.io/docs/languages/java/configuration/#properties-traces). In addition, the distribution adds the following samplers: ### `internal_root_off` diff --git a/mise.toml b/mise.toml new file mode 100644 index 000000000..e06c045a7 --- /dev/null +++ b/mise.toml @@ -0,0 +1,17 @@ +[tools] +lychee = "0.23.0" + +[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 + +# Pick the tasks you need from flint (https://github.com/grafana/flint) +[tasks."lint:links"] +description = "Check for broken links in changed files + all local links" +file = "https://raw.githubusercontent.com/grafana/flint/0ac131d7832bd8964f6ca9e5af73207dca6a85ba/tasks/lint/links.sh" # v0.7.1