Skip to content

Commit

Permalink
Add markdown link check (#4287)
Browse files Browse the repository at this point in the history
* Add markdown link check

* Fix links

* Now detects anchor links too!

* Reword comment
  • Loading branch information
trask authored Mar 22, 2022
1 parent e54e7ac commit 559d05a
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 18 deletions.
11 changes: 11 additions & 0 deletions .github/scripts/markdown_link_check_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"ignorePatterns": [
{
"pattern": "^https://github\\.com/open-telemetry/opentelemetry-java/pull/"
},
{
"pattern": "^https://mvnrepository\\.com/artifact/"
}
],
"retryOn429": true
}
28 changes: 28 additions & 0 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,37 @@ jobs:
name: coverage-report
path: all/build/reports/jacoco/test/html

markdown-link-check:
# release branches are excluded because links to external urls can break at any time which
# requires unnecessary release branch maintenance
if: ${{ !startsWith(github.ref_name, 'v') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check markdown links
# using retry because of sporadic external site failures
uses: nick-invision/retry@v2.6.0
with:
# timing out has not been a problem
timeout_minutes: 15
# give external site some time to hopefully recover
retry_wait_seconds: 120
max_attempts: 5
command: |
npm install -g markdown-link-check
find . -type f \
-name '*.md' \
-not -path './.github/*' \
-not -path './node_modules/*' \
-print0 \
| xargs -0 -n1 markdown-link-check --config .github/scripts/markdown_link_check_config.json
publish-snapshots:
name: Publish snapshots
if: ${{ github.event_name == 'push' && github.repository == 'open-telemetry/opentelemetry-java' }}
# snapshot publishing is not dependent on markdown-link-check success, because links to external
# urls can break at any time
needs: build
runs-on: ubuntu-20.04
steps:
Expand Down
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,8 @@ in the `opentelemetry-sdk-extension-autoconfigure` module, where it is actually
Note: In an effort to accelerate our work toward a 1.0.0 release, we have skipped the deprecation phase
on a number of breaking changes. We apologize for the inconvenience this may have caused. We are very
aware that these changes will impact users. If you need assistance in migrating from previous releases,
please open a [discussion topic](https://github.com/opentelemetry/opentelemetry-java/discussions) at
[https://github.com/opentelemetry/opentelemetry-java/discussions](https://github.com/opentelemetry/opentelemetry-java/discussions).
please open a [discussion topic](https://github.com/open-telemetry/opentelemetry-java/discussions) at
[https://github.com/open-telemetry/opentelemetry-java/discussions](https://github.com/open-telemetry/opentelemetry-java/discussions).

Many classes have been made final that previously were not. Please reach out if you have a need to
provide extended functionality, and we can figure out how best to solve your use-case.
Expand Down Expand Up @@ -813,8 +813,8 @@ the `http://` or `https://` in front of your endpoint.
Note: In an effort to accelerate our work toward a 1.0.0 release, we have skipped the deprecation phase
on a number of breaking changes. We apologize for the inconvenience this may have caused. We are very
aware that these changes will impact users. If you need assistance in migrating from previous releases,
please open a [discussion topic](https://github.com/opentelemetry/opentelemetry-java/discussions) at
[https://github.com/opentelemetry/opentelemetry-java/discussions](https://github.com/opentelemetry/opentelemetry-java/discussions).
please open a [discussion topic](https://github.com/open-telemetry/opentelemetry-java/discussions) at
[https://github.com/open-telemetry/opentelemetry-java/discussions](https://github.com/open-telemetry/opentelemetry-java/discussions).

#### Breaking Changes

Expand Down Expand Up @@ -1385,7 +1385,7 @@ See the `opentelemetry-extension-kotlin` module for details.
- `DefaultSpan` was removed from the public API. Instead, use `Span.wrap(spanContext)` if you need a non-functional span that propagates the trace context.
- `DefaultMeter`, `DefaultMeterProvider`, `DefaultTracer` and `DefaultTracerProvider` were removed from the public API. You can access the same functionality with `getDefault()` methods on the `Meter`, `MeterProvider, `Tracer`, and `TracerProvider` classes, respectively.
- Some functionality from the `Tracer` interface is now available either on the `Span` interface or `Context` interface.
- The `OpenTelemetry` class is now an interface, with implementations. Methods on this interface have changed their names to reflect this change. For more information, see [OpenTelemetry.java](/api/src/main/java/io/opentelemetry/api/OpenTelemetry.java).
- The `OpenTelemetry` class is now an interface, with implementations. Methods on this interface have changed their names to reflect this change. For more information, see [OpenTelemetry.java](api/all/src/main/java/io/opentelemetry/api/OpenTelemetry.java).
- All builder-creation methods have been renamed to `.builder()`.
- `StatusCanonicalCode` has been renamed to `StatusCode`.
- `Span.getContext()` has been renamed to `Span.getSpanContext()`.
Expand Down
10 changes: 0 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,6 @@ of libraries with the old version number.
To update it, you must fetch the tags, via `git fetch --all --tags` - which should work, even if you
have forked the repo, as long as the trunk repo is set as an upstream remote.

### Updating OTLP proto dependency version

The OTLP proto dependency version is defined [here](proto/build.gradle). To bump the version,

1. Find the latest release
version [here](https://github.com/open-telemetry/opentelemetry-proto/releases/latest)
2. Download the zip source code archive
3. Run `shasum -a 256 ~/path/to/downloaded.zip` to compute its checksum
4. Update `protoVersion` and `protoChecksum` in the build file with the new version and checksum

### Composing builds

Beware that this section is only meant for developers of opentelemetry-java, or closely related
Expand Down
2 changes: 1 addition & 1 deletion exporters/zipkin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Javadocs][javadoc-image]][javadoc-url]

This is an OpenTelemetry exporter that sends span data using the [io.zipkin.reporter2:zipkin-reporter](https://github.com/openzipkin/zipkin-reporter-java") library.
This is an OpenTelemetry exporter that sends span data using the [io.zipkin.reporter2:zipkin-reporter](https://github.com/openzipkin/zipkin-reporter-java) library.

By default, this POSTs json in [Zipkin format](https://zipkin.io/zipkin-api/#/default/post_spans) to
a specified HTTP URL. This could be to a [Zipkin](https://zipkin.io) service, or anything that
Expand Down
4 changes: 2 additions & 2 deletions sdk-extensions/autoconfigure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ environment variables, e.g., `OTEL_TRACES_EXPORTER=zipkin`.

* [General notes](#general-notes)
* [Exporters](#exporters)
+ [OTLP exporter (both span and metric exporters)](#otlp-exporter-both-span-and-metric-exporters)
+ [OTLP exporter (span, metric, and log exporters)](#otlp-exporter-span-metric-and-log-exporters)
+ [Jaeger exporter](#jaeger-exporter)
+ [Zipkin exporter](#zipkin-exporter)
+ [Prometheus exporter](#prometheus-exporter)
Expand All @@ -24,7 +24,7 @@ environment variables, e.g., `OTEL_TRACES_EXPORTER=zipkin`.
* [Batch span processor](#batch-span-processor)
* [Sampler](#sampler)
* [Span limits](#span-limits)
* [Interval metric reader](#interval-metric-reader)
* [Periodic Metric Reader](#periodic-metric-reader)
* [Customizing the OpenTelemetry SDK](#customizing-the-opentelemetry-sdk)

## General notes
Expand Down

0 comments on commit 559d05a

Please sign in to comment.