From 6c4cd1d25157ba3120ffd156288775ab9afb4e67 Mon Sep 17 00:00:00 2001 From: Naseem Date: Mon, 8 Jun 2020 15:29:21 -0400 Subject: [PATCH] ci: lint markdown files (#1147) * ci: add markdown linting Signed-off-by: Naseem * fix: lint markdown files Signed-off-by: Naseem * docs: add markdown lint configuration Signed-off-by: Naseem * docs: lint change log Signed-off-by: Naseem --- api/.markdownlint.json | 6 ++++++ api/README.md | 3 +++ api/packages/opentelemetry-context-base/README.md | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 api/.markdownlint.json diff --git a/api/.markdownlint.json b/api/.markdownlint.json new file mode 100644 index 00000000000..484d3db4c04 --- /dev/null +++ b/api/.markdownlint.json @@ -0,0 +1,6 @@ +{ + "MD013": false, + "MD024": false, + "MD033": false, + "MD041": false +} diff --git a/api/README.md b/api/README.md index 2e965c0fd42..b824c4ae36b 100644 --- a/api/README.md +++ b/api/README.md @@ -1,4 +1,5 @@ # OpenTelemetry API for JavaScript + [![Gitter chat][gitter-image]][gitter-url] [![NPM Published Version][npm-img]][npm-url] [![dependencies][dependencies-image]][dependencies-url] @@ -99,6 +100,7 @@ api.metrics.setGlobalMeterProvider(meterProvider); Because the npm installer and node module resolution algorithm could potentially allow two or more copies of any given package to exist within the same `node_modules` structure, the OpenTelemetry API takes advantage of a variable on the `global` object to store the global API. When an API method in the API package is called, it checks if this `global` API exists and proxies calls to it if and only if it is a compatible API version. This means if a package has a dependency on an OpenTelemetry API version which is not compatible with the API used by the end user, the package will receive a no-op implementation of the API. ## Advanced Use + ### API Registration Options If you prefer to choose your own propagator or context manager, you may pass an options object into the `tracerProvider.register()` method. Omitted or `undefined` options will be replaced by a default value and `null` values will be skipped. @@ -176,6 +178,7 @@ async function doSomething() { ``` ## Useful links + - For more information on OpenTelemetry, visit: - For more about OpenTelemetry JavaScript: - For help or feedback on this project, join us on [gitter][gitter-url] diff --git a/api/packages/opentelemetry-context-base/README.md b/api/packages/opentelemetry-context-base/README.md index efba8898451..a0eb48c24b7 100644 --- a/api/packages/opentelemetry-context-base/README.md +++ b/api/packages/opentelemetry-context-base/README.md @@ -1,4 +1,5 @@ # OpenTelemetry Base Context Manager + [![Gitter chat][gitter-image]][gitter-url] [![NPM Published Version][npm-img]][npm-url] [![dependencies][dependencies-image]][dependencies-url] @@ -7,7 +8,7 @@ This package provides the ContextManager interface (which is used by concrete implementations) and a no-op implementation (which is used internally when no context propagation is defined). It's intended for use both on the server and in the browser. -## What is a Context Manager ? +## What is a Context Manager To understand why they exists, we'll need to understand how Javascript works: when you make native function call (networks, setInterval etc) you generally call C++ code that will later callback your own code. @@ -18,6 +19,7 @@ ContextManager's aim to offer exactly that, it's API offer to store an object in This package only include the interface and a Noop implementation, for more information please see the [async-hooks based ContextManager][ah-context-manager] for NodeJS. ## Useful links + - For more information on OpenTelemetry, visit: - For more about OpenTelemetry JavaScript: - For help or feedback on this project, join us on [gitter][gitter-url]