Skip to content

Commit e5a65c6

Browse files
Yosef Arbivvmarchaud
Yosef Arbiv
andauthored
ci: add markdown lint and fixed markdown files (open-telemetry#716)
Co-authored-by: Valentin Marchaud <[email protected]>
1 parent 572ed66 commit e5a65c6

File tree

40 files changed

+334
-240
lines changed

40 files changed

+334
-240
lines changed

.github/workflows/lint.yml

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v2
1515

16+
- name: Lint markdown files
17+
uses: avto-dev/markdown-lint@v1
18+
with:
19+
ignore: "./**/CHANGELOG.md"
20+
args: "./**/*.md"
21+
1622
- name: restore lerna
1723
uses: actions/cache@master # must use unreleased master to cache multiple paths
1824
id: cache

.markdownlint.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"MD013": false,
3+
"MD024": false,
4+
"MD033": false,
5+
"MD041": false
6+
}
7+

CONTRIBUTING.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,29 @@ The Conventional Commits specification is a lightweight convention on top of com
2525
We use [commitlint](https://github.com/conventional-changelog/commitlint) and [husky](https://github.com/typicode/husky) to prevent bad commit message.
2626
For example, you want to submit the following commit message `git commit -s -am "my bad commit"`.
2727
You will receive the following error :
28-
```
28+
29+
```text
2930
✖ type must be one of [ci, feat, fix, docs, style, refactor, perf, test, revert, chore] [type-enum]
3031
```
32+
3133
Here an exemple that will pass the verification: `git commit -s -am "chore(opentelemetry-core): update deps"`
3234

3335
### Fork
3436

3537
In the interest of keeping this repository clean and manageable, you should work from a fork. To create a fork, click the 'Fork' button at the top of the repository, then clone the fork locally using `git clone [email protected]:USERNAME/opentelemetry-js-contrib.git`.
3638

3739
You should also add this repository as an "upstream" repo to your local copy, in order to keep it up to date. You can add this as a remote like so:
38-
```
40+
41+
```bash
3942
git remote add upstream https://github.com/open-telemetry/opentelemetry-js-contrib.git
4043

4144
#verify that the upstream exists
4245
git remote -v
4346
```
4447

4548
To update your fork, fetch the upstream repo's branches and commits, then merge your main with upstream's main:
46-
```
49+
50+
```bash
4751
git fetch upstream
4852
git checkout main
4953
git merge upstream/main
@@ -63,22 +67,26 @@ The `opentelemetry-js-contrib` project is written in TypeScript.
6367
- `npm test` tests code the same way that our CI will test it.
6468
- `npm run lint:fix` lint (and maybe fix) any changes.
6569

66-
6770
### Generating API documentation
71+
6872
- `npm run docs` to generate API documentation. Generates the documentation in `packages/opentelemetry-api/docs/out`
6973

7074
### Generating CHANGELOG documentation
75+
7176
- `npm run changelog` to generate CHANGELOG documentation in your terminal (see [RELEASING.md](RELEASING.md) for more details).
7277

7378
### Benchmarks
79+
7480
When two or more approaches must be compared, please write a benchmark in the benchmark/index.js module so that we can keep track of the most efficient algorithm.
7581

7682
- `npm run bench` to run your benchmark.
7783

7884
## Contributing Vendor Components
85+
7986
This repo is generally meant for hosting components that work with popular open-source frameworks and tools. However, it is also possible to contribute components specific to a 3rd party vendor in this repo.
8087

8188
### Adding a New Vendor Component
89+
8290
Vendor components that are hosted in this repo will be versioned the same as all other contrib components, and released in lockstep with them under the `@opentelemetry` org in NPM.
8391

8492
In exchange, vendor component contributors are expected to:
@@ -96,4 +104,5 @@ In exchange, vendor component contributors are expected to:
96104
- Update their components' usage of Core APIs upon the introduction of breaking changes upstream
97105

98106
### Removing Vendor Components
107+
99108
All vendor components are subject to removal from the repo at the sole discretion of the maintainers. Reasons for removal include but are not limited to failing to adhere to any of the expectations defined above in a timely manner. "Timely manner" can vary depending on the urgency of the task, for example if a flaky unit test is blocking a release for the entire repo that would be far more urgent than responding to a question about usage. As a rule of thumb, 2-3 business days is a good goal for non-urgent response times.

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,13 @@ Node.JS `v8` | See [Node Support](#node-support) below
114114
Web Browsers | ✅ See [Browser Support](#browser-support) below
115115

116116
### Node Support
117+
117118
Automated tests are run using the latest release of each currently active version of Node.JS.
118119
While Node.JS v8 is no longer supported by the Node.JS team, the latest version of Node.JS v8 is still included in our testing suite.
119120
Please note that versions of Node.JS v8 prior to `v8.5.0` will NOT work, because OpenTelemetry Node depends on the `perf_hooks` module introduced in `v8.5.0`
120121

121122
### Browser Support
123+
122124
Automated browser tests are run in the latest version of Headless Chrome.
123125
There is currently no list of officially supported browsers, but OpenTelemetry is developed using standard web technologies with wide support and should work in currently supported versions of major browsers.
124126

RELEASING.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This repository uses [Release Please](https://github.com/googleapis/release-please) to manage its releases automatically and independently.
44
Modified packages are automatically published to NPM when the auto-generated Release Please PR is merged.
55

6-
# Manual Publishing Process
6+
## Manual Publishing Process
77

88
For posterity, or in the event of any failures with release-please, the process for performing a manual release is below.
99

@@ -42,13 +42,16 @@ Decide on the next `major.minor.patch` release number based on [semver](http://s
4242
Since we use `lerna`, we can use [lerna-changelog](https://github.com/lerna/lerna-changelog#lerna-changelog)
4343

4444
#### How to use
45+
4546
Pass your [github token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) to generate the changelog automatically.
4647
For security reasons, when you create a Github token, select the permissions: under **repo**, select **Access public repositories**, **commit status**.
4748

4849
In your terminal, execute the following command:
50+
4951
```bash
5052
GITHUB_AUTH=<your token> lerna-changelog
5153
```
54+
5255
It will print something like:
5356

5457
```md
@@ -64,10 +67,12 @@ It will print something like:
6467
- Helpful Hacker ([@helpful-hacker](https://github.com/helpful-hacker))
6568
- [@careful-coder](https://github.com/careful-coder)
6669
```
70+
6771
By default lerna-changelog will show all pull requests that have been merged since the latest tagged commit in the repository. That is however only true for pull requests **with certain labels applied** (see [lerna.json](lerna.json) for authorized labels).
6872

6973
You can also use the `--from` and `--to` options to view a different range of pull requests:
70-
```
74+
75+
```text
7176
GITHUB_AUTH=xxxxx lerna-changelog --from=v1.0.0 --to=v2.0.0
7277
```
7378

@@ -102,6 +107,7 @@ done
102107
Check your e-mail and make sure the number of “you’ve published this module” emails matches the number you expect.
103108

104109
## Publish the GitHub Release
110+
105111
Publish the GitHub release, ensuring that the tag points to the newly landed commit corresponding to release proposal `x.y.z`.
106112

107113
## Update CHANGELOG
@@ -110,7 +116,6 @@ Publish the GitHub release, ensuring that the tag points to the newly landed com
110116
* Create a new commit with the exact title: `Post Release: update CHANGELOG.md`.
111117
* Go through PR review and merge it to GitHub main branch.
112118

113-
114119
## Known Issues
115120

116121
* The `examples/` and `getting-started/` folders are not part of lerna packages, we need to manually bump the version in `package.json`.

examples/connect/README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
OpenTelemetry Connect Instrumentation allows the user to automatically collect trace data and export them to the backend of choice (Collector Exporter), to give observability to distributed systems.
44

55
This is a simple example that demonstrates tracing calls made to Connect API. The example shows key aspects of tracing such as
6+
67
- Root Span (on Client)
78
- Child Span (on Client)
89
- Span Events
@@ -11,15 +12,15 @@ This is a simple example that demonstrates tracing calls made to Connect API. Th
1112
## Installation
1213

1314
```sh
14-
$ # from this directory
15-
$ npm install
15+
# from this directory
16+
npm install
1617
```
1718

1819
## Run the Application
1920

2021
### Collector - docker container
2122

22-
- Run docker container with collector
23+
- Run docker container with collector
2324

2425
```sh
2526
# from this directory
@@ -28,26 +29,28 @@ $ npm install
2829

2930
### Server
3031

31-
- Run the server
32+
- Run the server
3233

3334
```sh
3435
# from this directory
3536
$ npm run server
3637
```
3738

38-
- Run the client
39+
- Run the client
3940

4041
```sh
4142
# from this directory
4243
npm run client
4344
```
4445

4546
#### Zipkin UI
46-
Go to Zipkin with your browser [http://localhost:9411/]()
47+
48+
Go to Zipkin with your browser <http://localhost:9411/>
4749

4850
<p align="center"><img src="images/trace1.png?raw=true"/></p>
4951

5052
## Useful links
53+
5154
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
5255
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node>
5356

examples/dns/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ shows key aspects of tracing such as
1212
## Installation
1313

1414
```sh
15-
$ # from this directory
16-
$ npm install
15+
# from this directory
16+
npm install
1717
```
1818

1919
Setup [Zipkin Tracing](https://zipkin.io/pages/quickstart.html)
@@ -27,14 +27,14 @@ Setup [Jaeger Tracing](https://www.jaegertracing.io/docs/latest/getting-started/
2727
- Run the client
2828

2929
```sh
30-
$ # from this directory
31-
$ npm run zipkin:client
30+
# from this directory
31+
npm run zipkin:client
3232
```
3333

3434
#### Zipkin UI
3535

3636
`zipkin:client` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
37-
Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-id)]() (e.g http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)
37+
Go to Zipkin with your browser <http://localhost:9411/zipkin/traces/(your-trace-id)> (e.g <http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6>)
3838

3939
<p align="center"><img src="./images/zipkin-ui.png?raw=true"/></p>
4040

@@ -43,14 +43,14 @@ Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-
4343
- Run the client
4444

4545
```sh
46-
$ # from this directory
47-
$ npm run jaeger:client
46+
# from this directory
47+
npm run jaeger:client
4848
```
4949

5050
#### Jaeger UI
5151

5252
`jaeger:client` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
53-
Go to Jaeger with your browser [http://localhost:16686/trace/(your-trace-id)]() (e.g http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)
53+
Go to Jaeger with your browser <http://localhost:16686/trace/(your-trace-id)> (e.g <http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6>)
5454

5555
<p align="center"><img src="images/jaeger-ui.png?raw=true"/></p>
5656

examples/express/README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ OpenTelemetry Express Instrumentation allows the user to automatically collect t
44

55
This is a simple example that demonstrates tracing calls made to Express API. The example
66
shows key aspects of tracing such as
7+
78
- Root Span (on Client)
89
- Child Span (on Client)
910
- Span Events
@@ -12,8 +13,8 @@ shows key aspects of tracing such as
1213
## Installation
1314

1415
```sh
15-
$ # from this directory
16-
$ npm install
16+
# from this directory
17+
npm install
1718
```
1819

1920
Setup [Zipkin Tracing](https://zipkin.io/pages/quickstart.html)
@@ -24,36 +25,37 @@ Setup [Jaeger Tracing](https://www.jaegertracing.io/docs/latest/getting-started/
2425

2526
### Zipkin
2627

27-
- Run the server
28+
- Run the server
2829

2930
```sh
3031
# from this directory
3132
$ npm run zipkin:server
3233
```
3334

34-
- Run the client
35+
- Run the client
3536

3637
```sh
3738
# from this directory
3839
npm run zipkin:client
3940
```
4041

4142
#### Zipkin UI
43+
4244
`zipkin:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
43-
Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-id)]() (e.g http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)
45+
Go to Zipkin with your browser <http://localhost:9411/zipkin/traces/(your-trace-id)> (e.g <http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6>)
4446

4547
<p align="center"><img src="./images/zipkin.jpg?raw=true"/></p>
4648

4749
### Jaeger
4850

49-
- Run the server
51+
- Run the server
5052

5153
```sh
5254
# from this directory
5355
$ npm run jaeger:server
5456
```
5557

56-
- Run the client
58+
- Run the client
5759

5860
```sh
5961
# from this directory
@@ -63,11 +65,12 @@ Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-
6365
#### Jaeger UI
6466

6567
`jaeger:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
66-
Go to Jaeger with your browser [http://localhost:16686/trace/(your-trace-id)]() (e.g http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)
68+
Go to Jaeger with your browser <http://localhost:16686/trace/(your-trace-id)> (e.g <http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6>)
6769

6870
<p align="center"><img src="images/jaeger.jpg?raw=true"/></p>
6971

7072
## Useful links
73+
7174
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
7275
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node>
7376

examples/fastify/README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
OpenTelemetry Fastify Instrumentation allows the user to automatically collect trace data and export them to the backend of choice (Collector Exporter), to give observability to distributed systems.
44

55
This is a simple example that demonstrates tracing calls made to Fastify API. The example shows key aspects of tracing such as
6+
67
- Root Span (on Client)
78
- Child Span (on Client)
89
- Span Events
@@ -11,15 +12,15 @@ This is a simple example that demonstrates tracing calls made to Fastify API. Th
1112
## Installation
1213

1314
```sh
14-
$ # from this directory
15-
$ npm install
15+
# from this directory
16+
npm install
1617
```
1718

1819
## Run the Application
1920

2021
### Collector - docker container
2122

22-
- Run docker container with collector
23+
- Run docker container with collector
2324

2425
```sh
2526
# from this directory
@@ -28,26 +29,28 @@ $ npm install
2829

2930
### Server
3031

31-
- Run the server
32+
- Run the server
3233

3334
```sh
3435
# from this directory
3536
$ npm run server
3637
```
3738

38-
- Run the client
39+
- Run the client
3940

4041
```sh
4142
# from this directory
4243
npm run client
4344
```
4445

4546
#### Zipkin UI
46-
Go to Zipkin with your browser [http://localhost:9411/]()
47+
48+
Go to Zipkin with your browser <http://localhost:9411/>
4749

4850
<p align="center"><img src="images/trace1.png?raw=true"/></p>
4951

5052
## Useful links
53+
5154
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
5255
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-node>
5356

0 commit comments

Comments
 (0)