diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b67e335b8d2..db00d033819 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,7 +9,7 @@ When submitting code, please apply [Square Code Style](https://github.com/square ## License By contributing your code, you agree to license your contribution under -the terms of the [APLv2](LICENSE). +the terms of the [APLv2](../LICENSE). All files are released with the Apache 2.0 license. diff --git a/.github/workflows/test_markdown.yml b/.github/workflows/test_markdown.yml new file mode 100644 index 00000000000..7b0a741a135 --- /dev/null +++ b/.github/workflows/test_markdown.yml @@ -0,0 +1,33 @@ +# yamllint --format github .github/workflows/test_markdown.yml +--- +name: test_markdown + +on: # yamllint disable-line rule:truthy + push: # non-tagged pushes to master + branches: + - master + tags-ignore: + - '*' + paths: + - '**/*.md' + - ./build-bin/mlc_config.json + pull_request: # pull requests targeted at the master branch. + branches: + - master + paths: + - '**/*.md' + - ./build-bin/mlc_config.json + +jobs: + test-markdown: + name: Test Markdown + runs-on: ubuntu-22.04 # newest available distribution, aka jellyfish + # skip commits made by the release plugin + if: "!contains(github.event.head_commit.message, 'maven-release-plugin')" + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Check Markdown links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + config-file: './build-bin/mlc_config.json' diff --git a/README.md b/README.md index e52535276d1..06967e653f0 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,11 @@ You can also start Zipkin via Docker. docker run -d -p 9411:9411 openzipkin/zipkin ``` -Once the server is running, you can view traces with the Zipkin UI at `http://your_host:9411/zipkin/`. +Once the server is running, you can view traces with the Zipkin UI at http://localhost:9411/zipkin. If your applications aren't sending traces, yet, configure them with [Zipkin instrumentation](https://zipkin.io/pages/tracers_instrumentation) or try one of our [examples](https://github.com/openzipkin?utf8=%E2%9C%93&q=example). -Check out the [`zipkin-server`](/zipkin-server) documentation for configuration details, or [Docker examples](docker/examples) for how to use docker-compose. +Check out the [`zipkin-server`](zipkin-server/README.md) documentation for configuration details, or [Docker examples](docker/examples) for how to use docker-compose. ### Zipkin Slim @@ -213,10 +213,10 @@ commits to master. ### Docker Images Released versions of zipkin-server are published to Docker Hub as `openzipkin/zipkin` and GitHub -Container Registry as `ghcr.io/openzipkin/zipkin`. See [docker](./docker) for details. +Container Registry as `ghcr.io/openzipkin/zipkin`. See [docker](docker) for details. ### Helm Charts -Helm charts are available at https://zipkin.io/zipkin-helm. +Helm charts are available via `helm repo add zipkin https://zipkin.io/zipkin-helm`. See [zipkin-helm](https://github.com/openzipkin/zipkin-helm) for details. ### Javadocs diff --git a/build-bin/README.md b/build-bin/README.md index 406daddd7e4..7c757ecba0a 100644 --- a/build-bin/README.md +++ b/build-bin/README.md @@ -22,6 +22,15 @@ On deploy: * Besides production Docker images, this project includes [../docker/test-images]. * [docker_push] pushes test-images, but only to ghcr.io +### Markdown validation + +[mlc_config.json](mlc_config.json) is run by GitHub Action, but you can also run it locally, +assuming you installed markdown-link-check via NPM. + +```bash +$ find . -name \*.md |grep -v node|xargs markdown-link-check -c ./build-bin/mlc_config.json +``` + [//]: # (Below here should be standard for all projects) ## Build Overview diff --git a/build-bin/mlc_config.json b/build-bin/mlc_config.json new file mode 100644 index 00000000000..7eb0347dc65 --- /dev/null +++ b/build-bin/mlc_config.json @@ -0,0 +1,25 @@ +{ + "ignorePatterns": [ + { + "pattern": "https://oss.sonatype.org/content/repositories/snapshots" + }, + { + "pattern": "http://localhost:9411/api/v[12]/spans" + }, + { + "pattern": "http://localhost:9411/zipkin" + }, + { + "pattern": "http://localhost:9411/zipkin?serviceName=backend" + }, + { + "pattern": "http://localhost:8081" + }, + { + "pattern": "http://localhost:9000/api" + }, + { + "pattern": "http://localhost:3000" + } + ] +} diff --git a/docker/README.md b/docker/README.md index e07bb669969..bb6498e1a64 100644 --- a/docker/README.md +++ b/docker/README.md @@ -41,7 +41,7 @@ We also provide [example compose files](examples/README.md) that integrate colle such as Kafka or Elasticsearch. ## Configuration -Configuration is via environment variables, defined by [zipkin-server](https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md). Notably, you'll want to look at the `STORAGE_TYPE` environment variables, which +Configuration is via environment variables, defined by [zipkin-server](../zipkin-server/README.md). Notably, you'll want to look at the `STORAGE_TYPE` environment variables, which include "cassandra", "mysql" and "elasticsearch". Note: the `openzipkin/zipkin-slim` image only supports "elasticsearch" storage. To use other storage types, you must use the main image `openzipkin/zipkin`. @@ -102,7 +102,7 @@ The above is mentioned only for historical reasons. The OpenZipkin community do not support Docker's deprecated container links. ### MySQL -If using an external MySQL server or image, ensure schema and other parameters match the [docs](https://github.com/openzipkin/zipkin/tree/master/zipkin-storage/mysql-v1#applying-the-schema). +If using an external MySQL server or image, ensure schema and other parameters match the [docs](../zipkin-storage/mysql-v1/README.md#applying-the-schema). ## Building images diff --git a/docker/examples/README.md b/docker/examples/README.md index 14f0a5ed2a2..f713e55f06a 100644 --- a/docker/examples/README.md +++ b/docker/examples/README.md @@ -83,7 +83,7 @@ To add Kafka configuration, run: $ docker-compose -f docker-compose-kafka.yml up ``` -Then configure the [Kafka sender](https://github.com/openzipkin/zipkin-reporter-java/blob/master/kafka11/src/main/java/zipkin2/reporter/kafka11/KafkaSender.java) using a `bootstrapServers` value of `host.docker.internal:9092` if your application is inside the same docker network or `localhost:19092` if not, but running on the same host. +Then configure the [Kafka sender](https://github.com/openzipkin/zipkin-reporter-java/blob/master/kafka/src/main/java/zipkin2/reporter/kafka/KafkaSender.java) using a `bootstrapServers` value of `host.docker.internal:9092` if your application is inside the same docker network or `localhost:19092` if not, but running on the same host. In other words, if you are running a sample application on your laptop, you would use `localhost:19092` bootstrap server to send spans to the Kafka broker running in Docker. @@ -141,9 +141,9 @@ $ docker-compose -f docker-compose.yml -f docker-compose-example.yml up ``` Once the services start, open http://localhost:8081/ -* This calls the backend (http://127.0.0.1:9000/api) and shows its result: a formatted date. +* This calls the backend (http://localhost:9000/api) and shows its result: a formatted date. -Afterward, you can view traces that went through the backend via http://127.0.0.1:9411/zipkin?serviceName=backend +Afterward, you can view traces that went through the backend via http://localhost:9411/zipkin?serviceName=backend ## UI diff --git a/zipkin-collector/activemq/RATIONALE.md b/zipkin-collector/activemq/RATIONALE.md index b4c589a6d65..a1c05f41bfb 100644 --- a/zipkin-collector/activemq/RATIONALE.md +++ b/zipkin-collector/activemq/RATIONALE.md @@ -25,7 +25,7 @@ easier in the same way as bundling elasticsearch does. ## On a potential single-transport client -This package is using the normal activemq-jms client. During a [mail thread](http://activemq.2283324.n4.nabble.com/Interest-in-using-ActiveMQ-as-a-trace-data-transport-for-Zipkin-td4749755.html), we learned the +This package is using the normal activemq-jms client. During a [mail thread](https://marc.info/?l=activemq-users&m=155356007513108), we learned the the STOMP and AMQP 1.0 protocol are the more portable options for a portable integration as ActiveMQ, Artemis and RabbitMQ all support these. On the other hand Kafka does not support these protocols. Any future portability work could be limited by this. Meanwhile, using the standard JMS diff --git a/zipkin-lens/README.md b/zipkin-lens/README.md index d671e90caae..4953f72b527 100644 --- a/zipkin-lens/README.md +++ b/zipkin-lens/README.md @@ -37,7 +37,7 @@ It correctly bundles React in production mode and optimizes the build for the be ## Localization We use [LinguiJS](https://lingui.js.org/) for localization of the UI. Translations for strings are -found in the JSON files under [here](./src/translations). The Javascript files in the directory are +found in the JSON files under [here](src/translations). The Javascript files in the directory are compiled from the JSON files. We're always excited to have help maintaining these translations - if you see a string in the UI that is not translated or mistranslated, please feel free to send a PR to the JSON file to fix it. If you can, please run `yarn run compile` to also compile the translation @@ -46,13 +46,13 @@ of it. ### Adding a new locale -To add a new translated locale, first edit [.linguirc](./.linguirc) and add the locale to the +To add a new translated locale, first edit [.linguirc](.linguirc) and add the locale to the `locales` section. Next, run `yarn run extract` to extract a new file under `src/translations` for the locale. Translate as many strings in the JSON file as you can. Then run `yarn run compile` to compile the strings. -Finally, edit [App.jsx](./src/components/App/App.jsx) and -[LanguageSelector.tsx](./src/components/App/LanguageSelector.tsx) to import the new translation and +Finally, edit [App.tsx](src/components/App/App.tsx) and +[LanguageSelector.tsx](src/components/App/LanguageSelector.tsx) to import the new translation and add an entry to the language selector respectively. ## Dev Tools diff --git a/zipkin-server/README.md b/zipkin-server/README.md index 9bb3a149be3..d5d0764f92d 100644 --- a/zipkin-server/README.md +++ b/zipkin-server/README.md @@ -22,13 +22,13 @@ $ curl -sSL https://zipkin.io/quickstart.sh | bash -s $ java -jar zipkin.jar ``` -Once you've started, browse to http://your_host:9411 to find traces! +Once you've started, browse to http://localhost:9411/zipkin to find traces! ## Endpoints -The following endpoints are defined under the base url http://your_host:9411 -* / - [UI](../zipkin-ui) -* /config.json - [Configuration for the UI](#configuration-for-the-ui) +The following endpoints are defined under the base url `http://your_host:9411` +* / - [UI](../zipkin-lens) +* /config.json - [Configuration for the UI](#ui) * /api/v2 - [API](https://zipkin.io/zipkin-api/#/) * /health - Returns 200 status if OK * /info - Provides the version of the running instance @@ -170,21 +170,21 @@ Zipkin has a web UI, automatically included in the exec jar, and is hosted by de When the UI loads, it reads default configuration from the `/config.json` endpoint. -| Attribute | Property | Description | -|--------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| environment | zipkin.ui.environment | The value here becomes a label in the top-right corner. Not required. | -| defaultLookback | zipkin.ui.default-lookback | Default duration in millis to look back when finding traces. Affects the "Start time" element in the UI. Defaults to 900000 (15 minutes in millis). | -| searchEnabled | zipkin.ui.search-enabled | If the Discover screen is enabled. Defaults to true. | -| queryLimit | zipkin.ui.query-limit | Default limit for Find Traces. Defaults to 10. | -| instrumented | zipkin.ui.instrumented | Which sites this Zipkin UI covers. Regex syntax. e.g. `http:\/\/example.com\/.*` Defaults to match all websites (`.*`). | -| logsUrl | zipkin.ui.logs-url | Logs query service url pattern. If specified, a button will appear on the trace page and will replace {traceId} in the url by the traceId. Not required. | -| supportUrl | zipkin.ui.support-url | A URL where a user can ask for support. If specified, a link will be placed in the side menu to this URL, for example a page to file support tickets. Not required. | -| archivePostUrl | zipkin.ui.archive-post-url | Url to POST the current trace in Zipkin v2 json format. e.g. 'https://longterm/api/v2/spans'. If specified, a button will appear on the trace page accordingly. Not required. | -| archiveUrl | zipkin.ui.archive-url | Url to a web application serving an archived trace, templated by '{traceId}'. e.g. https://longterm/zipkin/trace/{traceId}'. This is shown in a confirmation message after a trace is successfully POSTed to the `archivePostUrl`. Not required. | -| dependency.enabled | zipkin.ui.dependency.enabled | If the Dependencies screen is enabled. Defaults to true. | -| dependency.lowErrorRate | zipkin.ui.dependency.low-error-rate | The rate of error calls on a dependency link that turns it yellow. Defaults to 0.5 (50%) set to >1 to disable. | -| dependency.highErrorRate | zipkin.ui.dependency.high-error-rate | The rate of error calls on a dependency link that turns it red. Defaults to 0.75 (75%) set to >1 to disable. | -| basePath | zipkin.ui.basepath | path prefix placed into the tag in the UI HTML; useful when running behind a reverse proxy. Default "/zipkin" | +| Attribute | Property | Description | +|--------------------------|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| environment | zipkin.ui.environment | The value here becomes a label in the top-right corner. Not required. | +| defaultLookback | zipkin.ui.default-lookback | Default duration in millis to look back when finding traces. Affects the "Start time" element in the UI. Defaults to 900000 (15 minutes in millis). | +| searchEnabled | zipkin.ui.search-enabled | If the Discover screen is enabled. Defaults to true. | +| queryLimit | zipkin.ui.query-limit | Default limit for Find Traces. Defaults to 10. | +| instrumented | zipkin.ui.instrumented | Which sites this Zipkin UI covers. Regex syntax. e.g. `http:\/\/example.com\/.*` Defaults to match all websites (`.*`). | +| logsUrl | zipkin.ui.logs-url | Logs query service url pattern. If specified, a button will appear on the trace page and will replace {traceId} in the url by the traceId. Not required. | +| supportUrl | zipkin.ui.support-url | A URL where a user can ask for support. If specified, a link will be placed in the side menu to this URL, for example a page to file support tickets. Not required. | +| archivePostUrl | zipkin.ui.archive-post-url | Url to POST the current trace in Zipkin v2 json format. e.g. `https://longterm/api/v2/spans`. If specified, a button will appear on the trace page accordingly. Not required. | +| archiveUrl | zipkin.ui.archive-url | Url to a web application serving an archived trace, templated by '{traceId}'. e.g. `https://longterm/zipkin/trace/{traceId}`. This is shown in a confirmation message after a trace is successfully POSTed to the `archivePostUrl`. Not required. | +| dependency.enabled | zipkin.ui.dependency.enabled | If the Dependencies screen is enabled. Defaults to true. | +| dependency.lowErrorRate | zipkin.ui.dependency.low-error-rate | The rate of error calls on a dependency link that turns it yellow. Defaults to 0.5 (50%) set to >1 to disable. | +| dependency.highErrorRate | zipkin.ui.dependency.high-error-rate | The rate of error calls on a dependency link that turns it red. Defaults to 0.75 (75%) set to >1 to disable. | +| basePath | zipkin.ui.basepath | path prefix placed into the tag in the UI HTML; useful when running behind a reverse proxy. Default "/zipkin" | To map properties to environment variables, change them to upper-underscore case format. For example, if using docker you can set `ZIPKIN_UI_QUERY_LIMIT=100` to affect `$.queryLimit` in `/config.json`. @@ -514,7 +514,7 @@ a valid v2 endpoint of the [Eureka REST API](https://github.com/Netflix/eureka/w | Variable | Instance field | Description | |----------------------------|----------------|------------------------------------------------------------------------------------------------| | `DISCOVERY_EUREKA_ENABLED` | N/A | `false` disables Eureka registration. Defaults to `true`. | -| `EUREKA_SERVICE_URL` | N/A | v2 endpoint of Eureka, e.g. https://eureka-prod/eureka/v2. No default | +| `EUREKA_SERVICE_URL` | N/A | v2 endpoint of Eureka, e.g. `https://eureka-prod/eureka/v2`. No default | | `EUREKA_APP_NAME` | .app | The application this instance registers to. Defaults to `zipkin` | | `EUREKA_HOSTNAME` | .hostName | The hostname used with `${QUERY_PORT}` to build the instance `vipAddress`. Defaults to detect. | | `EUREKA_INSTANCE_ID` | .instanceId | Defaults to `${EUREKA_HOSTNAME}:${EUREKA_APP_NAME}:${QUERY_PORT}`. | diff --git a/zipkin-storage/elasticsearch/README.md b/zipkin-storage/elasticsearch/README.md index d555f29c636..dfb9446fa28 100644 --- a/zipkin-storage/elasticsearch/README.md +++ b/zipkin-storage/elasticsearch/README.md @@ -15,10 +15,10 @@ only to healthy addresses. Here are some examples: -* http://1.1.1.1:9200,http://2.2.2.2:19200 -* http://1.1.1.1:9200,http://[2001:db8::c001]:9200 -* http://elasticsearch:9200,http://1.2.3.4:9200 -* http://elasticsearch-1:9200,http://elasticsearch-2:9200 +* `http://1.1.1.1:9200,http://2.2.2.2:19200` +* `http://1.1.1.1:9200,http://[2001:db8::c001]:9200` +* `http://elasticsearch:9200,http://1.2.3.4:9200` +* `http://elasticsearch-1:9200,http://elasticsearch-2:9200` ## Format Spans are stored in version 2 format, which is the same as the [v2 POST endpoint](https://zipkin.io/zipkin-api/#/default/post_spans) @@ -125,7 +125,7 @@ Elasticsearch 7.8 introduces [composable templates](https://www.elastic.co/guide deprecates [legacy/v1 templates](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html) used in version prior. Merging of multiple templates with matching index patterns is no longer allowed, and Elasticsearch will return error on PUT of the second template with matching index pattern and priority. Templates with matching index patterns are required to have different priorities, and Elasticsearch will -only use the template with the highest priority. This also means that [secondary template](https://gist.github.com/adriancole/1af1259102e7a2da1b3c9103565165d7) +only use the template with the highest priority. This also means that [secondary template](https://gist.github.com/codefromthecrypt/1af1259102e7a2da1b3c9103565165d7) is no longer achievable. By default, Zipkin will use legacy template during initialization, but you can opt to use composable template by diff --git a/zipkin/RATIONALE.md b/zipkin/RATIONALE.md index 36ea97e5ec0..71bd66df83d 100644 --- a/zipkin/RATIONALE.md +++ b/zipkin/RATIONALE.md @@ -30,7 +30,7 @@ utilities. Zipkin is a library with embedded use cases, such as inside Java agents or Android code. -For example, Android has a [hard limit on total methods in an application](https://developer.android.com/studio/build/multidex#avoid). +For example, Android has a [hard limit on total methods in an application](https://developer.android.com/build/multidex#avoid). Fields marked private imply accessors in order to share state in the same package. We routinely share state, such as codec internals within a package. If we marked fields private, we'd count against that limit without adding