Skip to content

Commit

Permalink
chore: fix markdown linting and add npm script (#1217)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored Jun 18, 2020
1 parent 2486c3d commit f9f5df5
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 23 deletions.
7 changes: 2 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@ Please answer these questions before submitting a bug report.

### What version of OpenTelemetry are you using?


### What version of Node are you using?


### What did you do?
If possible, provide a recipe for reproducing the error.

If possible, provide a recipe for reproducing the error.

### What did you expect to see?


### What did you see instead?


### Additional context

Add any other context about the problem here.
11 changes: 7 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ labels: feature-request

**NB:** Before opening a feature request against this repo, consider whether the feature should/could be implemented in the [other OpenTelemetry client libraries](https://github.com/open-telemetry/). If so, please [open an issue on opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification/issues/new) first.

### Is your feature request related to a problem? Please describe.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
### Describe the solution you'd like

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
### Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
### Additional context

Add any other context or screenshots about the feature request here.
17 changes: 11 additions & 6 deletions .github/ISSUE_TEMPLATE/plugin_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,26 @@ labels: plugin-request
You are welcome to try out the [plugin api](https://github.com/open-telemetry/opentelemetry-js/blob/master/doc/plugin-guide.md) to build your own plugin. If you do try out the plugin api, please let us know if you have any questions/feedback.
-->

**Is your plugin request related to a problem? Please describe.**
### Is your plugin request related to a problem? Please describe

<!--
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-->

**Is it applicable for Node or Browser or both**
### Is it applicable for Node or Browser or both

### Do you expect this plugin to be commonly used

**Do you expect this plugin to be commonly used**
Weekly Downloads:

**What version of plugin are you interested in using**
### What version of plugin are you interested in using

Versions:

**Additional context**
### Additional context

<!--
Add any other context or screenshots about the plugin request here.
-->
- **Is there a reference you could point for the well-defined lifecycle methods**

#### Is there a reference you could point for the well-defined lifecycle methods**
3 changes: 2 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"MD013": false,
"MD024": false,
"MD033": false,
"MD041": false
"MD041": false,
"MD026": false
}
1 change: 0 additions & 1 deletion examples/tracer-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ The screen will look as follows:

![Screenshot of the running example](images/xml-http-request.png)


### Fetch

To see the results, open the browser at <http://localhost:8090/fetch/> and make sure you have the browser console open. The application is using the `ConsoleSpanExporter` and will post the created spans to the browser console.
Expand Down
2 changes: 2 additions & 0 deletions metapackages/plugins-node-all/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# OpenTelemetry Plugins Node Core

[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
Expand All @@ -22,6 +23,7 @@ In addition to all [node core plugins][otel-plugins-node-core], the following pl
Note: [@opentelemetry/plugin-dns][otel-plugin-dns] is excluded by default because it requires some manual configuration to prevent infinite loops with exporters.

## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us on [gitter][gitter-url]
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"lint": "lerna run lint",
"lint:fix": "lerna run lint:fix",
"lint:examples": "eslint ./examples/**/*.js",
"lint:examples:fix": "eslint ./examples/**/*.js --fix"
"lint:examples:fix": "eslint ./examples/**/*.js --fix",
"lint:markdown": "./node_modules/.bin/markdownlint $(git ls-files '*.md') -i ./CHANGELOG.md",
"lint:markdown:fix": "./node_modules/.bin/markdownlint $(git ls-files '*.md') -i ./CHANGELOG.md --fix"
},
"repository": "open-telemetry/opentelemetry-js",
"keywords": [
Expand All @@ -40,19 +42,20 @@
"devDependencies": {
"@commitlint/cli": "8.3.5",
"@commitlint/config-conventional": "8.3.4",
"@typescript-eslint/eslint-plugin": "3.3.0",
"@typescript-eslint/parser": "3.3.0",
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "7.2.0",
"eslint-config-airbnb-base": "14.2.0",
"eslint-plugin-import": "2.21.2",
"eslint-plugin-header": "3.0.0",
"@typescript-eslint/eslint-plugin": "3.3.0",
"@typescript-eslint/parser": "3.3.0",
"eslint-plugin-import": "2.21.2",
"gh-pages": "3.0.0",
"gts": "2.0.2",
"husky": "4.2.5",
"lerna": "3.22.1",
"lerna-changelog": "1.0.1",
"markdownlint-cli": "0.23.1",
"typescript": "3.9.5"
},
"husky": {
Expand Down
2 changes: 2 additions & 0 deletions packages/opentelemetry-exporter-collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ npm install --save @opentelemetry/exporter-collector
```

## Usage in Web

The CollectorExporter in Web expects the endpoint to end in `/v1/trace`.

```js
Expand All @@ -36,6 +37,7 @@ provider.register();
```

## Usage in Node

The CollectorExporter in Node expects the URL to only be the hostname. It will not work with `/v1/trace`.

```js
Expand Down
3 changes: 3 additions & 0 deletions packages/opentelemetry-plugin-fetch/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# OpenTelemetry Fetch Instrumentation for web

[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
Expand Down Expand Up @@ -41,13 +42,15 @@ fetch('http://localhost:8090/fetch.js');
```

## Example Screenshots

![Screenshot of the running example](images/trace1.png)
![Screenshot of the running example](images/trace2.png)
![Screenshot of the running example](images/trace3.png)

See [examples/tracer-web/fetch](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/tracer-web) for a short example.

## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us on [gitter][gitter-url]
Expand Down
7 changes: 5 additions & 2 deletions packages/opentelemetry-plugin-grpc-js/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# OpenTelemetry @grpc/grpc-js Instrumentation for Node.js

[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
Expand All @@ -12,7 +13,7 @@ For automatic instrumentation see the

## Installation

```
```sh
npm install --save @opentelemetry/plugin-grpc-js
```

Expand All @@ -21,6 +22,7 @@ npm install --save @opentelemetry/plugin-grpc-js
OpenTelemetry gRPC Instrumentation allows the user to automatically collect trace data and export them to the backend of choice, to give observability to distributed systems when working with [gRPC](https://www.npmjs.com/package/@grpc/grpc-js).

To load a specific plugin (**gRPC** in this case), specify it in the Node Tracer's configuration.

```javascript
const { NodeTracerProvider } = require('@opentelemetry/node');

Expand All @@ -36,6 +38,7 @@ const provider = new NodeTracerProvider({
```

To load all of the [supported plugins](https://github.com/open-telemetry/opentelemetry-js#plugins), use below approach. Each plugin is only loaded when the module that it patches is loaded; in other words, there is no computational overhead for listing plugins for unused modules.

```javascript
const { NodeTracerProvider } = require('@opentelemetry/node');

Expand All @@ -44,8 +47,8 @@ const provider = new NodeTracerProvider();

<!-- See [examples/grpc-js](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/grpc-js) for a short example. -->


## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us on [gitter][gitter-url]
Expand Down

0 comments on commit f9f5df5

Please sign in to comment.