Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] run markdown-link-check on version change #36645

29 changes: 19 additions & 10 deletions .github/workflows/check-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,44 @@ jobs:
changedfiles:
name: changed files
runs-on: ubuntu-24.04
env:
PR_HEAD: ${{ github.event.pull_request.head.sha }}
if: ${{ github.actor != 'dependabot[bot]' }}
outputs:
md: ${{ steps.changes.outputs.md }}
md_files: ${{ steps.changed-files.outputs.md_all_changed_files }}
yaml_files: ${{ steps.changed-files.outputs.yaml_all_changed_files }} # used to catch MD_LINK_CHECK_VERSION updates and runs check-links to confirm functionality
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changes
run: |
echo "md=$(git diff --name-only --diff-filter=ACMRTUXB $(git merge-base origin/main $PR_HEAD) $PR_HEAD | grep .md$ | xargs)" >> $GITHUB_OUTPUT
id: changed-files
uses: tj-actions/changed-files@v45
with:
files_yaml: |
md:
- '**.md'
yaml:
- .github/workflows/check-links.yaml

check-links:
runs-on: ubuntu-24.04
needs: changedfiles
if: ${{needs.changedfiles.outputs.md}}
if: needs.changedfiles.outputs.md_files || needs.changedfiles.outputs.yaml_files
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install markdown-link-check
run: npm install -g markdown-link-check@${{ env.MD_LINK_CHECK_VERSION }}

- name: Run markdown-link-check
run: |
if [ -n "${{ needs.changedfiles.outputs.yaml_files }}" ]; then
md=$(find . -type f -name "*.md")
else
md="${{ needs.changedfiles.outputs.md_files }}"
fi

markdown-link-check \
--verbose \
--config .github/workflows/check_links_config.json \
${{needs.changedfiles.outputs.md}} \
$md \
|| { echo "Check that anchor links are lowercase"; exit 1; }
3 changes: 3 additions & 0 deletions .github/workflows/check_links_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
},
{
"pattern": "^#"
},
{
"pattern": "https://blogs\\.oracle\\.com/developers/post/connecting-a-go-application-to-oracle-database"
}
],
"aliveStatusCodes": [429, 200]
Expand Down
2 changes: 1 addition & 1 deletion cmd/telemetrygen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can build locally the Docker image with:
make docker-telemetrygen
```

Using github actions, we also push a docker image on commit to main or on release to this [Github docker registry](https://github.com/open-telemetry/opentelemetry-collector-contrib/pkgs/container/opentelemetry-collector-contrib%2Ftelemetrygen).
Using github actions, we also push a docker image on commit to main or on release to this [Github docker registry](https://github.com/orgs/open-telemetry/packages/container/package/opentelemetry-collector-contrib%2Ftelemetrygen).

## Running

Expand Down
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/conventions.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (

// NetworkAttributes is the set of known network attributes
type NetworkAttributes struct {
// see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/span-general.md#general-network-connection-attributes
// see https://github.com/open-telemetry/semantic-conventions/blob/main/docs/attributes-registry/network.md#network-attributes
NetTransport string
NetPeerIP string
NetPeerPort int64
Expand Down
2 changes: 1 addition & 1 deletion pkg/stanza/docs/operators/tcp_input.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The `tcp_input` operator listens for logs on one or more TCP connections. The op
| `attributes` | {} | A map of `key: value` pairs to add to the entry's attributes. |
| `one_log_per_packet` | false | Skip log tokenization, set to true if logs contains one log per record and multiline is not used. This will improve performance. |
| `resource` | {} | A map of `key: value` pairs to add to the entry's resource. |
| `add_attributes` | false | Adds `net.*` attributes according to [semantic convention][https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/span-general.md#general-network-connection-attributes]. |
| `add_attributes` | false | Adds `net.*` attributes according to [semantic convention][https://github.com/open-telemetry/semantic-conventions/blob/main/docs/attributes-registry/network.md#network-attributes]. |
| `multiline` | | A `multiline` configuration block. See below for details. |
| `preserve_leading_whitespaces` | false | Whether to preserve leading whitespaces. |
| `preserve_trailing_whitespaces` | false | Whether to preserve trailing whitespaces. |
Expand Down
2 changes: 1 addition & 1 deletion pkg/translator/prometheus/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prometheus Normalization

[OpenTelemetry's metric semantic convention](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/README.md) is not compatible with [Prometheus' own metrics naming convention](https://prometheus.io/docs/practices/naming/). This module provides centralized functions to convert OpenTelemetry metrics to Prometheus-compliant metrics. These functions are used by the following components for Prometheus:
[OpenTelemetry's metric semantic convention](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metrics.md) is not compatible with [Prometheus' own metrics naming convention](https://prometheus.io/docs/practices/naming/). This module provides centralized functions to convert OpenTelemetry metrics to Prometheus-compliant metrics. These functions are used by the following components for Prometheus:

* [prometheusreceiver](../../../receiver/prometheusreceiver/)
* [prometheusexporter](../../../exporter/prometheusexporter/)
Expand Down
2 changes: 1 addition & 1 deletion pkg/translator/prometheus/normalize_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

// The map to translate OTLP units to Prometheus units
// OTLP metrics use the c/s notation as specified at https://ucum.org/ucum.html
// (See also https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/README.md#instrument-units)
// (See also https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metrics.md#instrument-units)
// Prometheus best practices for units: https://prometheus.io/docs/practices/naming/#base-units
// OpenMetrics specification for units: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#units-and-base-units
var unitMap = map[string]string{
Expand Down
2 changes: 1 addition & 1 deletion receiver/azureblobreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!-- end autogenerated section -->


This receiver reads logs and trace data from [Azure Blob Storage](https://azure.microsoft.com/services/storage/blobs/).
This receiver reads logs and trace data from [Azure Blob Storage](https://azure.microsoft.com/en-us/products/storage/blobs/).

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion receiver/tcplogreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Receives logs over TCP.
| `attributes` | {} | A map of `key: value` pairs to add to the entry's attributes |
| `one_log_per_packet` | false | Skip log tokenization, set to true if logs contains one log per record and multiline is not used. This will improve performance. |
| `resource` | {} | A map of `key: value` pairs to add to the entry's resource |
| `add_attributes` | false | Adds `net.*` attributes according to [semantic convention][https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/span-general.md#general-network-connection-attributes] |
| `add_attributes` | false | Adds `net.*` attributes according to [semantic convention][https://github.com/open-telemetry/semantic-conventions/blob/main/docs/attributes-registry/network.md#network-attributes] |
| `multiline` | | A `multiline` configuration block. See below for details |
| `encoding` | `utf-8` | The encoding of the file being read. See the list of supported encodings below for available options |
| `operators` | [] | An array of [operators](../../pkg/stanza/docs/operators/README.md#what-operators-are-available). See below for more details |
Expand Down
Loading