ci: lint markdown files (#1147)

* ci: add markdown linting

Signed-off-by: Naseem <naseem@transit.app>

* fix: lint markdown files

Signed-off-by: Naseem <naseem@transit.app>

* docs: add markdown lint configuration

Signed-off-by: Naseem <naseem@transit.app>

* docs: lint change log

Signed-off-by: Naseem <naseem@transit.app>
This commit is contained in:
Naseem 2020-06-08 15:29:21 -04:00 committed by GitHub
parent a4da9de57d
commit e93a86633b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 554 additions and 359 deletions

View File

@ -9,6 +9,21 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Lint changelog file
uses: avto-dev/markdown-lint@v1
with:
# Commenting due to
# https://github.com/avto-dev/markdown-lint/blob/aab9be9823fcd706f6da3e6ad6c64874c23fbd4c/lint/rules/changelog.js#L51-L71
# TODO: adhere to, or overwrite above rule and uncomment rules
# rules: "/lint/rules/changelog.js"
config: "/lint/config/changelog.yml"
args: "./CHANGELOG.md"
- name: Lint markdown files
uses: avto-dev/markdown-lint@v1
with:
args: "./**/*.md -i ./CHANGELOG.md"
- name: restore lerna
uses: actions/cache@master # must use unreleased master to cache multiple paths
id: cache

6
.markdownlint.json Normal file
View File

@ -0,0 +1,6 @@
{
"MD013": false,
"MD024": false,
"MD033": false,
"MD041": false
}

View File

@ -6,58 +6,66 @@ All notable changes to this project will be documented in this file.
## 0.8.3
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-node`
* [#980](https://github.com/open-telemetry/opentelemetry-js/pull/980) feat: merge user supplied and default plugin configs ([@naseemkullah](https://github.com/naseemkullah))
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-context-async-hooks`
* [#1099](https://github.com/open-telemetry/opentelemetry-js/pull/1099) fix(asynchooks-scope): fix context loss using .with() #1101 ([@vmarchaud](https://github.com/vmarchaud))
#### :books: (Refine Doc)
### :books: (Refine Doc)
* Other
* [#1100](https://github.com/open-telemetry/opentelemetry-js/pull/1100) docs(batcher): document how to configure custom aggregators #989 ([@vmarchaud](https://github.com/vmarchaud))
* `opentelemetry-api`
* [#1106](https://github.com/open-telemetry/opentelemetry-js/pull/1106) chore: improve API documentation ([@mayurkale22](https://github.com/mayurkale22))
#### Committers: 7
- Bartlomiej Obecny ([@obecny](https://github.com/obecny))
- Daniel Dyla ([@dyladan](https://github.com/dyladan))
- Kanika Shah ([@kanikashah90](https://github.com/kanikashah90))
- Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
- Naseem ([@naseemkullah](https://github.com/naseemkullah))
- Valentin Marchaud ([@vmarchaud](https://github.com/vmarchaud))
- [@shivkanya9146](https://github.com/shivkanya9146)
* Bartlomiej Obecny ([@obecny](https://github.com/obecny))
* Daniel Dyla ([@dyladan](https://github.com/dyladan))
* Kanika Shah ([@kanikashah90](https://github.com/kanikashah90))
* Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
* Naseem ([@naseemkullah](https://github.com/naseemkullah))
* Valentin Marchaud ([@vmarchaud](https://github.com/vmarchaud))
* [@shivkanya9146](https://github.com/shivkanya9146)
## 0.8.2
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-exporter-collector`
* [#1063](https://github.com/open-telemetry/opentelemetry-js/pull/1063) feat: exporter collector TLS option ([@mzahor](https://github.com/mzahor))
* `opentelemetry-core`
* [#838](https://github.com/open-telemetry/opentelemetry-js/pull/838) feat: implement W3C Correlation Context propagator ([@rubenvp8510](https://github.com/rubenvp8510))
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-api`
* [#1067](https://github.com/open-telemetry/opentelemetry-js/pull/1067) fix: missing `global` in browser environments ([@legendecas](https://github.com/legendecas))
#### :books: (Refine Doc)
### :books: (Refine Doc)
* Other
* [#1057](https://github.com/open-telemetry/opentelemetry-js/pull/1057) chore: add examples README.md ([@mayurkale22](https://github.com/mayurkale22))
* `opentelemetry-core`
* [#1080](https://github.com/open-telemetry/opentelemetry-js/pull/1080) docs: document CorrelationContext propagator under Built-in Implement… ([@rubenvp8510](https://github.com/rubenvp8510))
#### Committers: 5
- Marian Zagoruiko ([@mzahor](https://github.com/mzahor))
- Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
- Olivier Albertini ([@OlivierAlbertini](https://github.com/OlivierAlbertini))
- Ruben Vargas Palma ([@rubenvp8510](https://github.com/rubenvp8510))
- legendecas ([@legendecas](https://github.com/legendecas))
* Marian Zagoruiko ([@mzahor](https://github.com/mzahor))
* Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
* Olivier Albertini ([@OlivierAlbertini](https://github.com/OlivierAlbertini))
* Ruben Vargas Palma ([@rubenvp8510](https://github.com/rubenvp8510))
* legendecas ([@legendecas](https://github.com/legendecas))
## 0.8.1
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* Other
* [#1050](https://github.com/open-telemetry/opentelemetry-js/pull/1050) feat: add plugin metapackages ([@dyladan](https://github.com/dyladan))
* `opentelemetry-resources`
@ -69,14 +77,15 @@ All notable changes to this project will be documented in this file.
* `opentelemetry-api`, `opentelemetry-metrics`
* [#1032](https://github.com/open-telemetry/opentelemetry-js/pull/1032) Make Labels Optional for CounterMetric::add ([@astorm](https://github.com/astorm))
### :bug: (Bug Fix)
#### :bug: (Bug Fix)
* `opentelemetry-plugin-http`
* [#1060](https://github.com/open-telemetry/opentelemetry-js/pull/1060) fix(http-plugin): don't modify user's headers object in plugin ([@BlumAmir](https://github.com/BlumAmir))
* `opentelemetry-exporter-collector`
* [#1053](https://github.com/open-telemetry/opentelemetry-js/pull/1053) fix: include proto files in deployment package ([@dyladan](https://github.com/dyladan))
#### :books: (Refine Doc)
### :books: (Refine Doc)
* Other
* [#1065](https://github.com/open-telemetry/opentelemetry-js/pull/1065) style: format README ([@naseemkullah](https://github.com/naseemkullah))
* [#1064](https://github.com/open-telemetry/opentelemetry-js/pull/1064) chore: update README ([@mayurkale22](https://github.com/mayurkale22))
@ -85,25 +94,28 @@ All notable changes to this project will be documented in this file.
* [#1056](https://github.com/open-telemetry/opentelemetry-js/pull/1056) fix readme: setting labelKeys when creating the counter ([@luebken](https://github.com/luebken))
#### Committers: 9
- Alan Storm ([@astorm](https://github.com/astorm))
- Amir Blum ([@BlumAmir](https://github.com/BlumAmir))
- Daniel Dyla ([@dyladan](https://github.com/dyladan))
- Justin Walz ([@justinwalz](https://github.com/justinwalz))
- Matthew Wear ([@mwear](https://github.com/mwear))
- Matthias Lübken ([@luebken](https://github.com/luebken))
- Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
- Naseem ([@naseemkullah](https://github.com/naseemkullah))
- [@shivkanya9146](https://github.com/shivkanya9146)
* Alan Storm ([@astorm](https://github.com/astorm))
* Amir Blum ([@BlumAmir](https://github.com/BlumAmir))
* Daniel Dyla ([@dyladan](https://github.com/dyladan))
* Justin Walz ([@justinwalz](https://github.com/justinwalz))
* Matthew Wear ([@mwear](https://github.com/mwear))
* Matthias Lübken ([@luebken](https://github.com/luebken))
* Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
* Naseem ([@naseemkullah](https://github.com/naseemkullah))
* [@shivkanya9146](https://github.com/shivkanya9146)
## 0.8.0
Released 2020-05-12
#### :boom: Breaking Change
### :boom: Breaking Change
* `opentelemetry-api`, `opentelemetry-metrics`
* [#1001](https://github.com/open-telemetry/opentelemetry-js/pull/1001) fix: observers should not expose bind/unbind method ([@legendecas](https://github.com/legendecas))
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-plugin-http`
* [#984](https://github.com/open-telemetry/opentelemetry-js/pull/984) fix(http-plugin): strip otel custom http header #983 ([@vmarchaud](https://github.com/vmarchaud))
* `opentelemetry-core`
@ -115,7 +127,8 @@ Released 2020-05-12
* `opentelemetry-exporter-collector`
* [#1008](https://github.com/open-telemetry/opentelemetry-js/pull/1008) fix: permission denied error when cloning submodules ([@sleighzy](https://github.com/sleighzy))
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-exporter-zipkin`, `opentelemetry-plugin-http`, `opentelemetry-tracing`
* [#1037](https://github.com/open-telemetry/opentelemetry-js/pull/1037) fix(tracing): span processor should receive a readable span as parameters ([@legendecas](https://github.com/legendecas))
* `opentelemetry-tracing`
@ -135,105 +148,119 @@ Released 2020-05-12
* `opentelemetry-core`
* [#981](https://github.com/open-telemetry/opentelemetry-js/pull/981) chore: splitting BasePlugin into browser and node ([@obecny](https://github.com/obecny))
#### :books: (Refine Doc)
### :books: (Refine Doc)
* Other
* [#1003](https://github.com/open-telemetry/opentelemetry-js/pull/1003) chore: test on node 14 ([@dyladan](https://github.com/dyladan))
* [#990](https://github.com/open-telemetry/opentelemetry-js/pull/990) fix(opentracing-shim): update opentracing shim example ([@sleighzy](https://github.com/sleighzy))
#### Committers: 7
- legendecas ([@legendecas](https://github.com/legendecas))
- Valentin Marchaud ([@vmarchaud](https://github.com/vmarchaud))
- Daniel Dyla ([@dyladan](https://github.com/dyladan))
- Ivan Senic ([@ivansenic](https://github.com/ivansenic))
- Mark Wolff ([@markwolff](https://github.com/markwolff))
- Simon Leigh ([@sleighzy](https://github.com/sleighzy))
- Bartlomiej Obecny ([@obecny](https://github.com/obecny))
* legendecas ([@legendecas](https://github.com/legendecas))
* Valentin Marchaud ([@vmarchaud](https://github.com/vmarchaud))
* Daniel Dyla ([@dyladan](https://github.com/dyladan))
* Ivan Senic ([@ivansenic](https://github.com/ivansenic))
* Mark Wolff ([@markwolff](https://github.com/markwolff))
* Simon Leigh ([@sleighzy](https://github.com/sleighzy))
* Bartlomiej Obecny ([@obecny](https://github.com/obecny))
## 0.7.0
Released 2020-04-23
#### :boom: Breaking Change
### :boom: Breaking Change
* `opentelemetry-exporter-collector`
* [#901](https://github.com/open-telemetry/opentelemetry-js/pull/901) grpc for node and support for new proto format for node and browser ([@obecny](https://github.com/obecny))
* `opentelemetry-api`, `opentelemetry-metrics`
* [#964](https://github.com/open-telemetry/opentelemetry-js/pull/964) chore: adding metric observable to be able to support async update ([@obecny](https://github.com/obecny))
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-plugin-http`
* [#960](https://github.com/open-telemetry/opentelemetry-js/pull/960) [http] fix: use url.URL ([@naseemkullah](https://github.com/naseemkullah))
* `opentelemetry-core`
* [#977](https://github.com/open-telemetry/opentelemetry-js/pull/977) fix(B3Propagator): B3 sampled causing gRPC error ([@mayurkale22](https://github.com/mayurkale22))
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-resources`
* [#899](https://github.com/open-telemetry/opentelemetry-js/pull/899) feat: resource auto-detection ([@mwear](https://github.com/mwear))
* `opentelemetry-metrics`
* [#930](https://github.com/open-telemetry/opentelemetry-js/pull/930) feat(aggregators): implement histogram aggregator ([@vmarchaud](https://github.com/vmarchaud))
#### Committers: 5
- Naseem ([@naseemkullah](https://github.com/naseemkullah))
- Matthew Wear ([@mwear](https://github.com/mwear))
- Bartlomiej Obecny ([@obecny](https://github.com/obecny))
- Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
- Valentin Marchaud ([@vmarchaud](https://github.com/vmarchaud))
* Naseem ([@naseemkullah](https://github.com/naseemkullah))
* Matthew Wear ([@mwear](https://github.com/mwear))
* Bartlomiej Obecny ([@obecny](https://github.com/obecny))
* Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
* Valentin Marchaud ([@vmarchaud](https://github.com/vmarchaud))
## 0.6.1
Released 2020-04-08
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-exporter-jaeger`
* [#924](https://github.com/open-telemetry/opentelemetry-js/pull/924) [Jaeger-Exporter] host default env var ([@naseemkullah](https://github.com/naseemkullah))
* `opentelemetry-metrics`
* [#933](https://github.com/open-telemetry/opentelemetry-js/pull/933) feat(meter): allow custom batcher #932 ([@vmarchaud](https://github.com/vmarchaud))
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-plugin-http`
* [#946](https://github.com/open-telemetry/opentelemetry-js/pull/946) Remove bad null check ([@dyladan](https://github.com/dyladan))
* `opentelemetry-exporter-prometheus`, `opentelemetry-metrics`
* [#941](https://github.com/open-telemetry/opentelemetry-js/pull/941) fix: do not clear other labelsets when updating metrics ([@dyladan](https://github.com/dyladan))
#### :books: (Refine Doc)
### :books: (Refine Doc)
* `opentelemetry-propagator-jaeger`
* [#937](https://github.com/open-telemetry/opentelemetry-js/pull/937) fix: Jaeger propagator example of usage" ([@shivkanya9146](https://github.com/shivkanya9146))
#### Committers: 4
- Daniel Dyla ([@dyladan](https://github.com/dyladan))
- Naseem ([@naseemkullah](https://github.com/naseemkullah))
- Valentin Marchaud ([@vmarchaud](https://github.com/vmarchaud))
- [@shivkanya9146](https://github.com/shivkanya9146)
* Daniel Dyla ([@dyladan](https://github.com/dyladan))
* Naseem ([@naseemkullah](https://github.com/naseemkullah))
* Valentin Marchaud ([@vmarchaud](https://github.com/vmarchaud))
* [@shivkanya9146](https://github.com/shivkanya9146)
## 0.6.0
Released 2020-04-01
#### :boom: Breaking Change
### :boom: Breaking Change
* `opentelemetry-api`, `opentelemetry-metrics`
* [#915](https://github.com/open-telemetry/opentelemetry-js/pull/915) Remove label set from metrics API ([@mayurkale22](https://github.com/mayurkale22))
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-tracing`
* [#913](https://github.com/open-telemetry/opentelemetry-js/pull/913) chore: remove unused default argument in Tracer ([@Flarna](https://github.com/Flarna))
* `opentelemetry-exporter-jaeger`
* [#916](https://github.com/open-telemetry/opentelemetry-js/pull/916) chore: removing force flush ([@obecny](https://github.com/obecny))
#### :books: (Refine Doc)
### :books: (Refine Doc)
* `opentelemetry-node`
* [#921](https://github.com/open-telemetry/opentelemetry-js/pull/921) chore: fix Require Path in README [@shivkanya9146](https://github.com/shivkanya9146))
#### Committers: 4
- Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
- Bartlomiej Obecny ([@obecny](https://github.com/obecny))
- Gerhard Stöbich ([@Flarna](https://github.com/Flarna))
- Shivkanya Andhare ([@shivkanya9146](https://github.com/shivkanya9146))
* Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
* Bartlomiej Obecny ([@obecny](https://github.com/obecny))
* Gerhard Stöbich ([@Flarna](https://github.com/Flarna))
* Shivkanya Andhare ([@shivkanya9146](https://github.com/shivkanya9146))
## 0.5.2
Released 2020-03-27
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-exporter-prometheus`, `opentelemetry-metrics`
* [#893](https://github.com/open-telemetry/opentelemetry-js/pull/893) Metrics: Add lastUpdateTimestamp associated with point ([@mayurkale22](https://github.com/mayurkale22))
* `opentelemetry-tracing`
@ -241,7 +268,8 @@ Released 2020-03-27
* `opentelemetry-api`, `opentelemetry-tracing`
* [#889](https://github.com/open-telemetry/opentelemetry-js/pull/889) feat: start a root span with spanOptions.parent = null ([@dyladan](https://github.com/dyladan))
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-core`, `opentelemetry-propagator-jaeger`
* [#904](https://github.com/open-telemetry/opentelemetry-js/pull/904) fix: add type checking in propagators ([@dyladan](https://github.com/dyladan))
* `opentelemetry-context-base`, `opentelemetry-core`, `opentelemetry-plugin-document-load`, `opentelemetry-plugin-user-interaction`, `opentelemetry-web`
@ -249,22 +277,24 @@ Released 2020-03-27
* Other
* [#884](https://github.com/open-telemetry/opentelemetry-js/pull/884) chore: fixing main package.json version ([@obecny](https://github.com/obecny))
#### :books: (Refine Doc)
### :books: (Refine Doc)
* `opentelemetry-context-base`, `opentelemetry-core`, `opentelemetry-plugin-document-load`, `opentelemetry-plugin-user-interaction`, `opentelemetry-web`
* [#906](https://github.com/open-telemetry/opentelemetry-js/pull/906) chore: fixing documentation for web tracer provider, fixing examples … ([@obecny](https://github.com/obecny))
#### Committers: 4
- Bartlomiej Obecny ([@obecny](https://github.com/obecny))
- Daniel Dyla ([@dyladan](https://github.com/dyladan))
- Mark Robert Henderson ([@aphelionz](https://github.com/aphelionz))
- Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
* Bartlomiej Obecny ([@obecny](https://github.com/obecny))
* Daniel Dyla ([@dyladan](https://github.com/dyladan))
* Mark Robert Henderson ([@aphelionz](https://github.com/aphelionz))
* Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
## 0.5.1
Released 2020-03-19
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-web`
* [#873](https://github.com/open-telemetry/opentelemetry-js/pull/873) Remove unnecessary `this` overwrite in stack context manager ([@dyladan](https://github.com/dyladan))
* `opentelemetry-plugin-mysql`
@ -273,20 +303,23 @@ Released 2020-03-19
* [#881](https://github.com/open-telemetry/opentelemetry-js/pull/881) fix: @opentelemetry/metrics fails to run due to bad import ([@mayurkale22](https://github.com/mayurkale22))
#### Committers: 2
- Daniel Dyla ([@dyladan](https://github.com/dyladan))
- Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
* Daniel Dyla ([@dyladan](https://github.com/dyladan))
* Mayur Kale ([@mayurkale22](https://github.com/mayurkale22))
## 0.5.0
Released 2020-03-16
### This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality but makes no promises around breaking changes.
### This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality but makes no promises around breaking changes
### :boom: Breaking Change
#### :boom: Breaking Change
* [#853](https://github.com/open-telemetry/opentelemetry-js/pull/853) Rename scope to context
* [#851](https://github.com/open-telemetry/opentelemetry-js/pull/851) Rename formatter to propagator
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* [#828](https://github.com/open-telemetry/opentelemetry-js/pull/828) feat: metric observer
* [#858](https://github.com/open-telemetry/opentelemetry-js/pull/858) chore: update out-of-date dependencies
* [#856](https://github.com/open-telemetry/opentelemetry-js/pull/856) fix: change loglevel for beta
@ -313,7 +346,8 @@ Released 2020-03-16
* [#719](https://github.com/open-telemetry/opentelemetry-js/pull/719) feat(plugin-http): sync. specs for statuscode
* [#701](https://github.com/open-telemetry/opentelemetry-js/pull/701) feat: add jaeger http trace format (#696)
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* [#798](https://github.com/open-telemetry/opentelemetry-js/pull/798) Respect sampled bit in probability sampler
* [#743](https://github.com/open-telemetry/opentelemetry-js/pull/743) fix: left pad jaeger trace ids
* [#715](https://github.com/open-telemetry/opentelemetry-js/pull/715) fix: unref jaeger socket to prevent process running indefinitely
@ -322,13 +356,14 @@ Released 2020-03-16
Released 2020-02-05
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-api`
* [#727](https://github.com/open-telemetry/opentelemetry-js/pull/727) Api separation (deprecate `opentelemetry-types`)
* [#749](https://github.com/open-telemetry/opentelemetry-js/pull/749) chore: rename registry to provider
### :sparkles: (Feature)
#### :sparkles: (Feature)
* `opentelemetry-plugin-http`
* [#719](https://github.com/open-telemetry/opentelemetry-js/pull/719) feat(plugin-http): sync. specs for statuscode
* `opentelemetry-exporter-jaeger`
@ -336,24 +371,26 @@ Released 2020-02-05
* `opentelemetry-plugin-user-interaction`
* [#658](https://github.com/open-telemetry/opentelemetry-js/pull/658) feat: plugin user interaction for web
#### :books: (Refine Doc)
### :books: (Refine Doc)
* [#689](https://github.com/open-telemetry/opentelemetry-js/pull/689) Add benchmark README and latest numbers
* [#733](https://github.com/open-telemetry/opentelemetry-js/pull/733) chore: add instruction for pg-pool plugin
* [#665](https://github.com/open-telemetry/opentelemetry-js/pull/665) docs: add ioredis example
* [#731](https://github.com/open-telemetry/opentelemetry-js/pull/731) Update Stackdriver exporter example
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-exporter-jaeger`
* [#715](https://github.com/open-telemetry/opentelemetry-js/pull/715) fix: unref jaeger socket to prevent process running indefinitely
* `opentelemetry-plugin-ioredis`
* [#671](https://github.com/open-telemetry/opentelemetry-js/pull/671) [ioredis plugin] fix: change supportedVersions to >1 <5
## 0.3.3
Released 2020-01-22
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-core`, `opentelemetry-exporter-collector`, `opentelemetry-exporter-zipkin`, `opentelemetry-node`, `opentelemetry-plugin-dns`, `opentelemetry-plugin-document-load`, `opentelemetry-plugin-grpc`, `opentelemetry-plugin-http`, `opentelemetry-plugin-https`, `opentelemetry-plugin-ioredis`, `opentelemetry-plugin-mongodb`, `opentelemetry-plugin-mysql`, `opentelemetry-plugin-postgres`, `opentelemetry-plugin-redis`, `opentelemetry-plugin-xml-http-request`, `opentelemetry-shim-opentracing`, `opentelemetry-tracing`, `opentelemetry-types`, `opentelemetry-web`
* [#582](https://github.com/open-telemetry/opentelemetry-js/pull/582) Named Tracers / Tracer Registry
* `opentelemetry-node`, `opentelemetry-plugin-postgres`
@ -362,16 +399,19 @@ Released 2020-01-22
* `opentelemetry-metrics`
* [#700](https://github.com/open-telemetry/opentelemetry-js/pull/700) implement named meter
#### :sparkles: (Feature)
### :sparkles: (Feature)
* `opentelemetry-propagator-jaeger`
* [#701](https://github.com/open-telemetry/opentelemetry-js/pull/701) add jaeger http trace format
* `opentelemetry-exporter-stackdriver-trace`
* [#648](https://github.com/open-telemetry/opentelemetry-js/pull/648) Stackdriver Trace exporter
#### :books: (Refine Doc)
### :books: (Refine Doc)
* [#673](https://github.com/open-telemetry/opentelemetry-js/pull/673) chore(getting-started): Added a TypeScript version for Getting Started Guide
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-plugin-ioredis`
* [#714](https://github.com/open-telemetry/opentelemetry-js/pull/714) fix: return module exports from ioredis
@ -379,7 +419,8 @@ Released 2020-01-22
Released 2020-01-03
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-plugin-http`, `opentelemetry-plugin-https`
* [#643](https://github.com/open-telemetry/opentelemetry-js/pull/643) feat(plugin-http): add/modify attributes
* [#651](https://github.com/open-telemetry/opentelemetry-js/pull/651) chore: add version script to all packages
@ -390,11 +431,13 @@ Released 2020-01-03
* `opentelemetry-test-utils`
* [#644](https://github.com/open-telemetry/opentelemetry-js/pull/644) feat: test-utils
#### :sparkles: (Feature)
### :sparkles: (Feature)
* `opentelemetry-plugin-ioredis`
* [#558](https://github.com/open-telemetry/opentelemetry-js/pull/558) feat(plugin): add ioredis plugin
#### :books: (Refine Doc)
### :books: (Refine Doc)
* `opentelemetry-node`, `opentelemetry-plugin-xml-http-request`
* [#646](https://github.com/open-telemetry/opentelemetry-js/pull/646) chore: update default plugins list and fix npm badge
* `opentelemetry-plugin-document-load`, `opentelemetry-plugin-mysql`, `opentelemetry-plugin-redis`, `opentelemetry-plugin-xml-http-request`, `opentelemetry-shim-opentracing`
@ -408,20 +451,24 @@ Released 2020-01-03
Released 2019-12-20
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-plugin-grpc`
* [#631](https://github.com/open-telemetry/opentelemetry-js/pull/631) fix(grpc): patch original client methods
* [#593](https://github.com/open-telemetry/opentelemetry-js/pull/593) fix: transpile to es2017 as esnext may result in unsupported JS code
#### :books: (Refine Doc)
### :books: (Refine Doc)
* Other
* [#629](https://github.com/open-telemetry/opentelemetry-js/pull/629) ci: deploy documentation on releases
* [#581](https://github.com/open-telemetry/opentelemetry-js/pull/581) feat: add OpenTracing example
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* [#633](https://github.com/open-telemetry/opentelemetry-js/pull/633) chore: enable incremental builds
#### :sparkles: (Feature)
### :sparkles: (Feature)
* `opentelemetry-plugin-xml-http-request`
* [#595](https://github.com/open-telemetry/opentelemetry-js/pull/595) feat: implement XMLHttpRequest plugin
@ -429,7 +476,8 @@ Released 2019-12-20
Released 2019-12-13
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-core`, `opentelemetry-node`, `opentelemetry-plugin-dns`, `opentelemetry-plugin-document-load`, `opentelemetry-plugin-grpc`, `opentelemetry-plugin-postgres`, `opentelemetry-plugin-redis`, `opentelemetry-tracing`, `opentelemetry-types`
* [#569](https://github.com/open-telemetry/opentelemetry-js/pull/569) chore: allow parent span to be null
* `opentelemetry-plugin-document-load`
@ -450,7 +498,8 @@ Released 2019-12-13
* `opentelemetry-core`, `opentelemetry-plugin-document-load`, `opentelemetry-tracing`, `opentelemetry-web`
* [#466](https://github.com/open-telemetry/opentelemetry-js/pull/466) chore: fixing coverage for karma using istanbul
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-exporter-jaeger`
* [#609](https://github.com/open-telemetry/opentelemetry-js/pull/609) Jaeger no flush interval
* `opentelemetry-plugin-dns`
@ -467,7 +516,8 @@ Released 2019-12-13
* `opentelemetry-core`
* [#472](https://github.com/open-telemetry/opentelemetry-js/pull/472) fix(core): add missing semver dependency
#### :books: (Refine Doc)
### :books: (Refine Doc)
* Other
* [#574](https://github.com/open-telemetry/opentelemetry-js/pull/574) chore: add CHANGELOG.md
* [#575](https://github.com/open-telemetry/opentelemetry-js/pull/575) Add exporter guide
@ -488,7 +538,8 @@ Released 2019-12-13
* `opentelemetry-plugin-postgres`
* [#473](https://github.com/open-telemetry/opentelemetry-js/pull/473) chore(plugin): postgres-pool plugin skeleton
#### :sparkles: (Feature)
### :sparkles: (Feature)
* `opentelemetry-core`, `opentelemetry-exporter-collector`
* [#552](https://github.com/open-telemetry/opentelemetry-js/pull/552) Collector exporter
* `opentelemetry-node`, `opentelemetry-plugin-mysql`
@ -515,7 +566,8 @@ Released 2019-12-13
Released 2019-11-04
#### :rocket: (Enhancement)
### :rocket: (Enhancement)
* `opentelemetry-shim-opentracing`, `opentelemetry-tracing`, `opentelemetry-types`
* [#449](https://github.com/open-telemetry/opentelemetry-js/pull/449) fix: allow recording links only at Span creation time
* `opentelemetry-core`, `opentelemetry-node`, `opentelemetry-tracing`, `opentelemetry-types`
@ -527,19 +579,22 @@ Released 2019-11-04
* `opentelemetry-core`, `opentelemetry-plugin-document-load`, `opentelemetry-tracing`, `opentelemetry-web`
* [#466](https://github.com/open-telemetry/opentelemetry-js/pull/466) chore: fixing coverage for karma using istanbul
#### :bug: (Bug Fix)
### :bug: (Bug Fix)
* `opentelemetry-tracing`
* [#444](https://github.com/open-telemetry/opentelemetry-js/pull/444) fix: batchSpanProcessor test failing intermittently
* `opentelemetry-core`
* [#472](https://github.com/open-telemetry/opentelemetry-js/pull/472) fix(core): add missing semver dependency
#### :books: (Refine Doc)
### :books: (Refine Doc)
* [#462](https://github.com/open-telemetry/opentelemetry-js/pull/462) chore: update README
* [#460](https://github.com/open-telemetry/opentelemetry-js/pull/460) chore: move members list out of community repo
* [#445](https://github.com/open-telemetry/opentelemetry-js/pull/445) chore: update CONTRIBUTING.md
* [#459](https://github.com/open-telemetry/opentelemetry-js/pull/459) chore: update API docs
#### :sparkles: (Feature)
### :sparkles: (Feature)
* `opentelemetry-metrics`, `opentelemetry-types`
* [#437](https://github.com/open-telemetry/opentelemetry-js/pull/437) feat(metrics): add registerMetric and getMetrics
* `opentelemetry-metrics`
@ -553,14 +608,14 @@ Released 2019-11-04
## 0.1.1
- chore: add prepare script and bump the version (#431)
- docs: fix broken links (#428)
- docs(exporter-jaeger): fix jaeger version (#430)
- fix(plugin-http): ensure no leaks (#398)
- Update readme (#421)
- refactor: cal duration once instead of each get duration call (#412)
- chore: add npm version badge (#414)
* chore: add prepare script and bump the version (#431)
* docs: fix broken links (#428)
* docs(exporter-jaeger): fix jaeger version (#430)
* fix(plugin-http): ensure no leaks (#398)
* Update readme (#421)
* refactor: cal duration once instead of each get duration call (#412)
* chore: add npm version badge (#414)
## 0.1.0
- Initial release
* Initial release

View File

@ -25,9 +25,11 @@ The Conventional Commits specification is a lightweight convention on top of com
We use [commitlint](https://github.com/conventional-changelog/commitlint) and [husky](https://github.com/typicode/husky) to prevent bad commit message.
For example, you want to submit the following commit message `git commit -s -am "my bad commit"`.
You will receive the following error :
```
```text
✖ type must be one of [ci, feat, fix, docs, style, refactor, perf, test, revert, chore] [type-enum]
```
Here an exemple that will pass the verification: `git commit -s -am "chore(opentelemetry-core): update deps"`
### Fork
@ -35,7 +37,8 @@ Here an exemple that will pass the verification: `git commit -s -am "chore(opent
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 git@github.com:USERNAME/opentelemetry-js.git`.
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:
```
```sh
git remote add upstream https://github.com/open-telemetry/opentelemetry-js.git
#verify that the upstream exists
@ -43,7 +46,8 @@ git remote -v
```
To update your fork, fetch the upstream repo's branches and commits, then merge your master with upstream's master:
```
```sh
git fetch upstream
git checkout master
git merge upstream/master
@ -90,12 +94,15 @@ The `opentelemetry-js` project is written in TypeScript.
- New or changed functionality is documented.
### Generating API documentation
- `npm run docs` to generate API documentation. Generates the documentation in `packages/opentelemetry-api/docs/out`
### Generating CHANGELOG documentation
- `npm run changelog` to generate CHANGELOG documentation in your terminal (see [RELEASING.md](RELEASING.md) for more details).
### Benchmarks
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.
- `npm run bench` to run your benchmark.

View File

@ -42,6 +42,7 @@
---
## About this project
This is the JavaScript version of [OpenTelemetry](https://opentelemetry.io/), a framework for collecting traces and metrics from applications.
## Quick start
@ -144,7 +145,7 @@ Maintainers ([@open-telemetry/js-maintainers](https://github.com/orgs/open-telem
*Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer).*
### Thanks to all the people who already contributed!
### Thanks to all the people who already contributed
<a href="https://github.com/open-telemetry/opentelemetry-js/graphs/contributors">
<img src="https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-js" />
@ -188,7 +189,7 @@ OpenTelemetry can collect tracing data automatically using plugins. Vendors/User
##### Contrib
These plugins are hosted at https://github.com/open-telemetry/opentelemetry-js-contrib/tree/master/plugins/node
These plugins are hosted at <https://github.com/open-telemetry/opentelemetry-js-contrib/tree/master/plugins/node>
- [@opentelemetry/plugin-mongodb][otel-contrib-plugin-mongodb]
- [@opentelemetry/plugin-mysql][otel-contrib-plugin-mysql]
@ -207,7 +208,7 @@ These plugins are hosted at https://github.com/open-telemetry/opentelemetry-js-c
##### Contrib
These plugins are hosted at https://github.com/open-telemetry/opentelemetry-js-contrib/tree/master/plugins/web
These plugins are hosted at <https://github.com/open-telemetry/opentelemetry-js-contrib/tree/master/plugins/web>
- [@opentelemetry/plugin-document-load][otel-contrib-plugin-document-load]
- [@opentelemetry/plugin-user-interaction][otel-contrib-plugin-user-interaction]

View File

@ -4,15 +4,20 @@ This document explains how to publish all OT modules at version x.y.z. Ensure th
Release Process:
* [Update to latest locally](#update-to-latest-locally)
* [Create a new branch](#create-a-new-branch)
* [Prepare each package for release](#prepare-each-package-for-release)
* [Use the Changelog to create a GitHub Release](#use-the-changelog-to-create-a-github-release)
* [Create a new PR](#create-a-new-pr)
* [Merge and pull](#merge-and-pull)
* [Publish all packages](#publish-all-packages)
* [Publish the GitHub Release](#publish-the-github-release)
* [Update CHANGELOG](#update-changelog)
- [Releasing OpenTelemetry Packages (for Maintainers Only)](#releasing-opentelemetry-packages-for-maintainers-only)
- [Update to latest locally](#update-to-latest-locally)
- [Create a new branch](#create-a-new-branch)
- [Prepare each package for release](#prepare-each-package-for-release)
- [Use the Changelog to create a GitHub Release](#use-the-changelog-to-create-a-github-release)
- [Generate the changelog with lerna](#generate-the-changelog-with-lerna)
- [How to use](#how-to-use)
- [Update Changelog file](#update-changelog-file)
- [Create a new PR](#create-a-new-pr)
- [Merge and pull](#merge-and-pull)
- [Publish all packages](#publish-all-packages)
- [Publish the GitHub Release](#publish-the-github-release)
- [Update CHANGELOG](#update-changelog)
- [Known Issues](#known-issues)
## Update to latest locally
@ -26,9 +31,9 @@ Create a new branch called `x.y.z-proposal` from the current commit.
Decide on the next `major.minor.patch` release number based on [semver](http://semver.org/) guidelines.
* Use `npm install` command to initialize all package directories
* Use `lerna publish --skip-npm --no-git-tag-version --no-push` to bump the version in all `package.json`
* Use `npm run bootstrap` to generate latest `version.ts` files
- Use `npm install` command to initialize all package directories
- Use `lerna publish --skip-npm --no-git-tag-version --no-push` to bump the version in all `package.json`
- Use `npm run bootstrap` to generate latest `version.ts` files
## Use the Changelog to create a GitHub Release
@ -37,13 +42,16 @@ Decide on the next `major.minor.patch` release number based on [semver](http://s
Since we use `lerna`, we can use [lerna-changelog](https://github.com/lerna/lerna-changelog#lerna-changelog)
#### How to use
Pass your [github token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) to generate the changelog automatically.
For security reasons, when you create a Github token, select the permissions: under **repo**, select **Access public repositories**, **commit status**.
In your terminal, execute the following command:
```bash
GITHUB_AUTH=<your token> lerna-changelog
```
It will print something like:
```md
@ -59,10 +67,12 @@ It will print something like:
- Helpful Hacker ([@helpful-hacker](https://github.com/helpful-hacker))
- [@careful-coder](https://github.com/careful-coder)
```
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).
You can also use the `--from` and `--to` options to view a different range of pull requests:
```
```sh
GITHUB_AUTH=xxxxx lerna-changelog --from=v1.0.0 --to=v2.0.0
```
@ -97,15 +107,15 @@ done
Check your e-mail and make sure the number of “youve published this module” emails matches the number you expect.
## Publish the GitHub Release
Publish the GitHub release, ensuring that the tag points to the newly landed commit corresponding to release proposal `x.y.z`.
## Update CHANGELOG
* After releasing is done, update the [CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-js/blob/master/CHANGELOG.md) and start new Unreleased label.
* Create a new commit with the exact title: `Post Release: update CHANGELOG.md`.
* Go through PR review and merge it to GitHub master branch.
- After releasing is done, update the [CHANGELOG.md](https://github.com/open-telemetry/opentelemetry-js/blob/master/CHANGELOG.md) and start new Unreleased label.
- Create a new commit with the exact title: `Post Release: update CHANGELOG.md`.
- Go through PR review and merge it to GitHub master branch.
## Known Issues
* The `examples/` and `getting-started/` folders are not part of lerna packages, we need to manually bump the version in `package.json`.
- The `examples/` and `getting-started/` folders are not part of lerna packages, we need to manually bump the version in `package.json`.

View File

@ -3,8 +3,9 @@
## How to run
To run your benchmark, just:
```sh
$ npm run bench
npm run bench
```
The minimum sample size is set to 10 to perform statistical analysis on benchmark, you can re-configure that in `benchmark.js`.
@ -15,7 +16,7 @@ The minimum sample size is set to 10 to perform statistical analysis on benchmar
### `v0.5.0` release
```
```text
Beginning NoopTracerProvider Benchmark...
5 tests completed.
@ -67,7 +68,7 @@ Beginning HttpTraceContext Benchmark...
### `v0.3.3` release
```
```text
Beginning NoopTracerProvider Benchmark...
5 tests completed.

View File

@ -7,6 +7,7 @@
Sometimes you may want to use a specific aggregator for one of your metric, export an average of the last X values instead of just the last one.
Here is what an aggregator that does that would look like:
```ts
import { Aggregator } from '@opentelemetry/metrics';
import { hrTime } from '@opentelemetry/core';
@ -43,6 +44,7 @@ export class AverageAggregator implements Aggregator {
Now we will need to implement our own batcher to configure the sdk to use our new aggregator. To simplify even more, we will just extend the `UngroupedBatcher` (which is the default) to avoid re-implementing the whole `Aggregator` interface.
Here the result:
```ts
import {
UngroupedBatcher,

View File

@ -4,7 +4,7 @@ Before contributing to this open source project, read our [CONTRIBUTING](../CONT
The code base is a monorepo. We use [Lerna](https://lerna.js.org/) for managing inter-module dependencies, which makes it easier to develop coordinated changes between the modules. Instead of running lerna directly, the commands are wrapped with `npm`;
### Requirements
## Requirements
Since this project supports multiple Node versions, using a version
manager such as [nvm](https://github.com/creationix/nvm) is recommended.
@ -12,67 +12,70 @@ manager such as [nvm](https://github.com/creationix/nvm) is recommended.
To get started once you have Node installed, run:
```sh
$ npm install
npm install
```
This will install all the necessary modules.
### Testing
## Testing
#### Unit Tests
### Unit Tests
To run the all unit tests, use:
```sh
$ npm run test
npm run test
```
To run the unit tests continuously in watch mode while developing, use:
```sh
$ npm run tdd
npm run tdd
```
### Linting
## Linting
We use [gts](https://www.npmjs.com/package/gts) to make sure that new code is conform to our coding standards.
Before raising a pull request, make sure there are no lint problems.
To check the linter, use:
```sh
$ npm run lint
npm run lint
```
To fix the linter, use:
```sh
$ npm run lint:fix
npm run lint:fix
```
### Continuous Integration
## Continuous Integration
We rely on CircleCI 2.0 for our tests. If you want to test how the CI behaves
locally, you can use the CircleCI Command Line Interface as described here:
https://circleci.com/docs/2.0/local-jobs/
<https://circleci.com/docs/2.0/local-jobs/>
After installing the `circleci` CLI, simply run one of the following:
```sh
$ circleci build --job lint
$ circleci build --job node8
$ circleci build --job node10
$ circleci build --job node11
$ circleci build --job node12
$ circleci build --job node12-browsers
circleci build --job lint
circleci build --job node8
circleci build --job node10
circleci build --job node11
circleci build --job node12
circleci build --job node12-browsers
```
### Docs
## Docs
We use [typedoc](https://www.npmjs.com/package/typedoc) to generate the api documentation.
To generate the docs, use:
```sh
$ npm run docs
npm run docs
```
The document will be available under `packages/opentelemetry-api/docs/out` path.

View File

@ -6,7 +6,7 @@ We provide support for several open source backends and vendors out-of-the-box l
A typical package layout:
```
```text
opentelemetry-exporter-myexporter
├── src
│ └── index.ts

View File

@ -11,14 +11,16 @@ Each plugin must extend the abstract class [BasePlugin][base-plugin] implementin
- `unpatch`: A function describing how the module exports for a given file should be unpatched. This should generally mirror the logic in `patch`; for example, if `patch` wraps a method, `unpatch` should unwrap it.
The core `PluginLoader` class is responsible for loading the instrumented plugins that use a patch mechanism to enable automatic tracing for specific target modules. In order to load new plugin, it should export `plugin` identifier.
```typescript
export const plugin = new HttpPlugin(...);
```
> Example of simple module plugin created and used in the tests.
https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-node/test/instrumentation/node_modules/%40opentelemetry/plugin-simple-module/simple-module.js
<https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-node/test/instrumentation/node_modules/%40opentelemetry/plugin-simple-module/simple-module.js>
After the plugin is created, it must be added in the [list of default supported plugins][DEFAULT_INSTRUMENTATION_PLUGINS].
```typescript
export const DEFAULT_INSTRUMENTATION_PLUGINS: Plugins = {
http: {
@ -42,7 +44,6 @@ We recommend using [`shimmer`][shimmer] to modify function properties on objects
Please refer to the [HTTP instrumentation][http-plugin] or [gRPC instrumentation][grpc-plugin] for more comprehensive examples.
[shimmer]: https://github.com/othiym23/shimmer
[builtin-plugins]: https://github.com/open-telemetry/opentelemetry-js#plugins
[base-plugin]: https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-core/src/trace/instrumentation/BasePlugin.ts#L29

View File

@ -3,7 +3,7 @@
This directory contains a number of examples of how to run real applications
with OpenTelemetry JavaScript.
### Maintained Examples
## Maintained Examples
Maintained Examples are expected to be updated with every OpenTelemetry JavaScript release, to
use the latest and greatest features, and best practices.
@ -20,7 +20,7 @@ use the latest and greatest features, and best practices.
|[collector-exporter-node](collector-exporter-node/) | This example shows how to use `@opentelemetry/exporter-collector` to instrument a simple Node.js application | Intermediate |
|[opentracing-shim](opentracing-shim/) | This is a simple example that demonstrates how existing OpenTracing instrumentation can be integrated with OpenTelemetry | Intermediate |
### Contributing
## Contributing
Please see [CONTRIBUTING.md](https://github.com/open-telemetry/opentelemetry-js/blob/master/CONTRIBUTING.md) for instructions on how to contribute.

View File

@ -7,21 +7,20 @@ Our example will export spans data simultaneously on `Console` and [Jaeger](http
## Installation
```sh
$ # from this directory
$ npm install
# from this directory
npm install
```
(Optional) Setup [Jaeger Tracing](https://www.jaegertracing.io/docs/latest/getting-started/#all-in-one): needs to be running on `localhost` port `16686`.
## Run the Application
```sh
$ # from this directory
$ npm start
# from this directory
npm start
```
#### Jaeger UI
### Jaeger UI
Open the Jaeger UI in your browser [http://localhost:16686](http://localhost:16686)
@ -34,6 +33,7 @@ Click on the trace to view its details.
<p align="center"><img src="./images/jaeger-ui-detail.png?raw=true"/></p>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing>

View File

@ -4,33 +4,34 @@ This example shows how to use [@opentelemetry/exporter-collector](https://github
This example will export spans data simultaneously using [Exporter Collector](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-exporter-collector) and grpc. It will use [proto format](https://github.com/open-telemetry/opentelemetry-proto).
## Installation
```shell script
$ # from this directory
$ npm install
# from this directory
npm install
```
## Run the Application
1. Run docker
```shell script
$ # from this directory
$ npm run docker:start
# from this directory
npm run docker:start
```
2. Run app
```shell script
$ # from this directory
$ npm start
# from this directory
npm start
```
3. Open page at http://localhost:9411/zipkin/ - you should be able to see the spans in zipkin
3. Open page at <http://localhost:9411/zipkin/> - you should be able to see the spans in zipkin
![Screenshot of the running example](images/spans.png)
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing>

View File

@ -5,8 +5,8 @@ OpenTelemetry gRPC Instrumentation allows the user to automatically collect trac
## Installation
```sh
$ # from this directory
$ npm install
# from this directory
npm install
```
Setup [Zipkin Tracing](https://zipkin.io/pages/quickstart.html)
@ -20,20 +20,21 @@ Setup [Jaeger Tracing](https://www.jaegertracing.io/docs/latest/getting-started/
- Run the server
```sh
$ # from this directory
$ npm run zipkin:server
# from this directory
npm run zipkin:server
```
- Run the client
```sh
$ # from this directory
$ npm run zipkin:client
# from this directory
npm run zipkin:client
```
#### Zipkin UI
`zipkin:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-id)]() (e.g http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)
Go to Zipkin with your browser <http://localhost:9411/zipkin/traces/(your-trace-id)> (e.g <http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)>
<p align="center"><img src="./images/zipkin.png"/></p>
@ -42,24 +43,26 @@ Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-
- Run the server
```sh
$ # from this directory
$ npm run jaeger:server
# from this directory
npm run jaeger:server
```
- Run the client
```sh
$ # from this directory
$ npm run jaeger:client
# from this directory
npm run jaeger:client
```
#### Jaeger UI
`jaeger:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
Go to Jaeger with your browser [http://localhost:50051/trace/(your-trace-id)]() (e.g http://localhost:50051/trace/4815c3d576d930189725f1f1d1bdfcc6)
Go to Jaeger with your browser <http://localhost:50051/trace/(your-trace-id)> (e.g <http://localhost:50051/trace/4815c3d576d930189725f1f1d1bdfcc6)>
<p align="center"><img src="./images/jaeger.png"/></p>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node>

View File

@ -4,6 +4,7 @@ OpenTelemetry HTTP Instrumentation allows the user to automatically collect trac
This is a simple example that demonstrates tracing HTTP request from client to server. The example
shows key aspects of tracing such as
- Root Span (on Client)
- Child Span (on Client)
- Child Span from a Remote Parent (on Server)
@ -14,8 +15,8 @@ shows key aspects of tracing such as
## Installation
```sh
$ # from this directory
$ npm install
# from this directory
npm install
```
Setup [Zipkin Tracing](https://zipkin.io/pages/quickstart.html)
@ -29,20 +30,21 @@ Setup [Jaeger Tracing](https://www.jaegertracing.io/docs/latest/getting-started/
- Run the server
```sh
$ # from this directory
$ npm run zipkin:server
# from this directory
npm run zipkin:server
```
- Run the client
```sh
$ # from this directory
$ npm run zipkin:client
# from this directory
npm run zipkin:client
```
#### Zipkin UI
`zipkin:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-id)]() (e.g http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)
Go to Zipkin with your browser <http://localhost:9411/zipkin/traces/(your-trace-id)> (e.g <http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)>
<p align="center"><img src="./images/zipkin-ui.png?raw=true"/></p>
@ -51,24 +53,26 @@ Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-
- Run the server
```sh
$ # from this directory
$ npm run jaeger:server
# from this directory
npm run jaeger:server
```
- Run the client
```sh
$ # from this directory
$ npm run jaeger:client
# from this directory
npm run jaeger:client
```
#### Jaeger UI
`jaeger:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
Go to Jaeger with your browser [http://localhost:16686/trace/(your-trace-id)]() (e.g http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)
Go to Jaeger with your browser <http://localhost:16686/trace/(your-trace-id)> (e.g <http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)>
<p align="center"><img src="images/jaeger-ui.png?raw=true"/></p>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node>

View File

@ -4,6 +4,7 @@ OpenTelemetry HTTPS Instrumentation allows the user to automatically collect tra
This is a simple example that demonstrates tracing HTTPS request from client to server. The example
shows key aspects of tracing such as
- Root Span (on Client)
- Child Span (on Client)
- Child Span from a Remote Parent (on Server)
@ -14,8 +15,8 @@ shows key aspects of tracing such as
## Installation
```sh
$ # from this directory
$ npm install
# from this directory
npm install
```
Setup [Zipkin Tracing](https://zipkin.io/pages/quickstart.html)
@ -29,20 +30,21 @@ Setup [Jaeger Tracing](https://www.jaegertracing.io/docs/latest/getting-started/
- Run the server
```sh
$ # from this directory
$ npm run zipkin:server
# from this directory
npm run zipkin:server
```
- Run the client
```sh
$ # from this directory
$ npm run zipkin:client
# from this directory
npm run zipkin:client
```
#### Zipkin UI
`zipkin:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-id)]() (e.g http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)
Go to Zipkin with your browser <http://localhost:9411/zipkin/traces/(your-trace-id)> (e.g <http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)>
<p align="center"><img src="./images/zipkin-ui.png?raw=true"/></p>
@ -51,24 +53,26 @@ Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-
- Run the server
```sh
$ # from this directory
$ npm run jaeger:server
# from this directory
npm run jaeger:server
```
- Run the client
```sh
$ # from this directory
$ npm run jaeger:client
# from this directory
npm run jaeger:client
```
#### Jaeger UI
`jaeger:server` script should output the `traceid` in the terminal (e.g `traceid: 4815c3d576d930189725f1f1d1bdfcc6`).
Go to Jaeger with your browser [http://localhost:16686/trace/(your-trace-id)]() (e.g http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)
Go to Jaeger with your browser <http://localhost:16686/trace/(your-trace-id)> (e.g <http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)>
<p align="center"><img src="images/jaeger-ui.png?raw=true"/></p>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node>

View File

@ -7,32 +7,38 @@ This is a simple example that demonstrates basic metrics collection and exports
## Installation
```sh
$ # from this directory
$ npm install
# from this directory
npm install
```
How to setup [Prometheus](https://prometheus.io/docs/prometheus/latest/getting_started/) please check
[Setup Prometheus](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-exporter-prometheus)
## Run the Application
- Run the example
### Observer
```sh
$ npm run start:observer
npm run start:observer
```
### Prometheus
1. In prometheus search for "metric_observer"
### Links
1. Prometheus Scrape Endpoint http://localhost:9464/metrics
2. Prometheus graph http://localhost:9090/graph
1. Prometheus Scrape Endpoint <http://localhost:9464/metrics>
2. Prometheus graph <http://localhost:9090/graph>
### Example
<p align="center"><img src="metrics/observer.png"/></p>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on OpenTelemetry metrics, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics>

View File

@ -13,6 +13,7 @@ The example shows key aspects of tracing such as
- Make a shim between OpenTracing and OpenTelemetry tracers
## Installation
```sh
# from this directory
$ npm install
@ -21,15 +22,18 @@ $ npm install
## Run the Application
### Zipkin
- Setup [Zipkin Tracing UI](https://zipkin.io/pages/quickstart.html)
- Run the server
```sh
# from this directory
$ npm run zipkin:server
```
- Run the client
```sh
# from this directory
$ npm run zipkin:client
@ -39,21 +43,23 @@ $ npm run zipkin:client
`zipkin:client` should output the `traceId` in the terminal.
Go to Zipkin with your browser [http://localhost:9411/zipkin/traces/(your-trace-id)]() (e.g http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)
Go to Zipkin with your browser <http://localhost:9411/zipkin/traces/(your-trace-id)> (e.g <http://localhost:9411/zipkin/traces/4815c3d576d930189725f1f1d1bdfcc6)>
<p align="center"><img src="./images/zipkin-ui.png?raw=true"/></p>
### Jaeger
- Setup [Jaeger Tracing UI](https://www.jaegertracing.io/docs/latest/getting-started/#all-in-one)
- Run the server
```sh
# from this directory
$ npm run jaeger:server
```
- Run the client
```sh
# from this directory
$ npm run jaeger:client
@ -63,11 +69,12 @@ $ npm run jaeger:client
`jaeger:client` should output the `traceId` in the terminal.
Go to Jaeger with your browser [http://localhost:16686/trace/(your-trace-id)]() (e.g http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)
Go to Jaeger with your browser <http://localhost:16686/trace/(your-trace-id)> (e.g <http://localhost:16686/trace/4815c3d576d930189725f1f1d1bdfcc6)>
<p align="center"><img src="images/jaeger-ui.png?raw=true"/></p>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node>
- For more information on OpenTracing, visit: <https://opentracing.io/>

View File

@ -7,18 +7,19 @@ This is a simple example that demonstrates basic metrics collection and exports
## Installation
```sh
$ # from this directory
$ npm install
# from this directory
npm install
```
Setup [Prometheus](https://prometheus.io/docs/prometheus/latest/getting_started/)
## Run the Application
- Run the server
```sh
$ # from this directory
$ npm run start
# from this directory
npm run start
```
- Replace the `prometheus.yml` provided by the Prometheus installation with the following:
@ -39,8 +40,8 @@ scrape_configs:
- Start Prometheus
```sh
$ # from the directory you downloaded prometheus
$ prometheus --config.file=prometheus.yml
# from the directory you downloaded prometheus
prometheus --config.file=prometheus.yml
```
### Prometheus UI
@ -50,6 +51,7 @@ If you are using the default configurations, the prometheus client will be avail
<p align="center"><img src="images/prom-ui.png?raw=true"/></p>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on OpenTelemetry metrics, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-metrics>
- For more information on OpenTelemetry for Node.js, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node>

View File

@ -5,15 +5,15 @@ This example shows how to use [@opentelemetry/web](https://github.com/open-telem
## Installation
```sh
$ # from this directory
$ npm install
# from this directory
npm install
```
## Run the Application
```sh
$ # from this directory
$ npm start
# from this directory
npm start
```
By default, the application will run on port `8090`.
@ -35,7 +35,6 @@ The screen will look as follows:
![Screenshot of the running example](images/xml-http-request.png)
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>

View File

@ -2,18 +2,19 @@
This guide will walk you through the setup and configuration process for a tracing backend (in this case [Zipkin](https://zipkin.io), but [Jaeger](https://www.jaegertracing.io) would be simple to use as well), a metrics backend like [Prometheus](https://prometheus.io), and auto-instrumentation of NodeJS. [You can find the guide for TypeScript here](ts-example/README.md#getting-started-with-opentelemetry-js-typescript).
1. [Tracing Your Application with OpenTelemetry](#tracing-your-application-with-opentelemetry)
1. [Setting up a Tracing Backend](#setting-up-a-tracing-backend)
2. [Trace Your NodeJS Application](#trace-your-nodejs-application)
1. [Install the required OpenTelemetry libraries](#install-the-required-opentelemetry-libraries)
2. [Initialize a global tracer](#initialize-a-global-tracer)
3. [Initialize and register a trace exporter](#initialize-and-register-a-trace-exporter)
2. [Collect Metrics Using OpenTelemetry](#collect-metrics-using-opentelemetry)
1. [Set up a Metrics Backend](#set-up-a-metrics-backend)
2. [Monitor Your NodeJS Application](#monitor-your-nodejs-application)
1. [Install the required OpenTelemetry metrics libraries](#install-the-required-opentelemetry-metrics-libraries)
2. [Initialize a meter and collect metrics](#initialize-a-meter-and-collect-metrics)
3. [Initialize and register a metrics exporter](#initialize-and-register-a-metrics-exporter)
- [Getting Started with OpenTelemetry JS](#getting-started-with-opentelemetry-js)
- [Tracing Your Application with OpenTelemetry](#tracing-your-application-with-opentelemetry)
- [Setting up a Tracing Backend](#setting-up-a-tracing-backend)
- [Trace Your NodeJS Application](#trace-your-nodejs-application)
- [Install the required OpenTelemetry libraries](#install-the-required-opentelemetry-libraries)
- [Initialize a global tracer](#initialize-a-global-tracer)
- [Initialize and Register a Trace Exporter](#initialize-and-register-a-trace-exporter)
- [Collect Metrics Using OpenTelemetry](#collect-metrics-using-opentelemetry)
- [Set up a Metrics Backend](#set-up-a-metrics-backend)
- [Monitor Your NodeJS Application](#monitor-your-nodejs-application)
- [Install the required OpenTelemetry metrics libraries](#install-the-required-opentelemetry-metrics-libraries)
- [Initialize a meter and collect metrics](#initialize-a-meter-and-collect-metrics)
- [Initialize and register a metrics exporter](#initialize-and-register-a-metrics-exporter)
## Tracing Your Application with OpenTelemetry
@ -32,7 +33,7 @@ The first thing we will need before we can start collecting traces is a tracing
In order to set up Zipkin as quickly as possible, run the latest [Docker Zipkin](https://github.com/openzipkin/docker-zipkin) container, exposing port `9411`. If you cant run Docker containers, you will need to download and run Zipkin by following the Zipkin [quickstart guide](https://zipkin.io/pages/quickstart.html).
```sh
$ docker run --rm -d -p 9411:9411 --name zipkin openzipkin/zipkin
docker run --rm -d -p 9411:9411 --name zipkin openzipkin/zipkin
```
Browse to <http://localhost:9411> to ensure that you can see the Zipkin UI.
@ -134,10 +135,10 @@ provider.addSpanProcessor(
console.log("tracing initialized");
```
Now if you run your application with the `tracing.js` file loaded, and you send requests to your application over HTTP (in the sample application just browse to http://localhost:8080), you will see traces exported to your tracing backend that look like this:
Now if you run your application with the `tracing.js` file loaded, and you send requests to your application over HTTP (in the sample application just browse to <http://localhost:8080),> you will see traces exported to your tracing backend that look like this:
```sh
$ node -r ./tracing.js app.js
node -r ./tracing.js app.js
```
<p align="center"><img src="./images/zipkin-trace.png?raw=true"/></p>
@ -292,7 +293,7 @@ Now, when we make requests to our service our meter will count all requests.
Counting metrics is only useful if we can export them somewhere that we can see them. For this, we're going to use prometheus. Creating and registering a metrics exporter is much like the tracing exporter above. First we will need to install the prometheus exporter.
```sh
$ npm install @opentelemetry/exporter-prometheus
npm install @opentelemetry/exporter-prometheus
```
Next, modify your `monitoring.js` file to look like this:
@ -358,7 +359,7 @@ Listening for requests on http://localhost:8080
Now, each time you browse to <http://localhost:8080> you should see "Hello from the backend" in your browser and your metrics in prometheus should update. You can verify the current metrics by browsing to <http://localhost:9464/metrics>, which should look like this:
```
```sh
# HELP requests Count all incoming requests
# TYPE requests counter
requests{route="/"} 1

View File

@ -2,18 +2,19 @@
This TypeScript guide will walk you through the setup and configuration process for a tracing backend (in this case [Zipkin](https://zipkin.io), but [Jaeger](https://www.jaegertracing.io) would be simple to use as well), a metrics backend like [Prometheus](https://prometheus.io), and auto-instrumentation of NodeJS. [You can find the guide for JavaScript here](../README.md#getting-started-with-opentelemetry-js).
1. [Tracing Your Application with OpenTelemetry](#tracing-your-application-with-opentelemetry)
1. [Setting up a Tracing Backend](#setting-up-a-tracing-backend)
2. [Trace Your NodeJS Application](#trace-your-nodejs-application)
1. [Install the required OpenTelemetry libraries](#install-the-required-opentelemetry-libraries)
2. [Initialize a global tracer](#initialize-a-global-tracer)
3. [Initialize and register a trace exporter](#initialize-and-register-a-trace-exporter)
2. [Collect Metrics Using OpenTelemetry](#collect-metrics-using-opentelemetry)
1. [Set up a Metrics Backend](#set-up-a-metrics-backend)
2. [Monitor Your NodeJS Application](#monitor-your-nodejs-application)
1. [Install the required OpenTelemetry metrics libraries](#install-the-required-opentelemetry-metrics-libraries)
2. [Initialize a meter and collect metrics](#initialize-a-meter-and-collect-metrics)
3. [Initialize and register a metrics exporter](#initialize-and-register-a-metrics-exporter)
- [Getting Started with OpenTelemetry JS (TypeScript)](#getting-started-with-opentelemetry-js-typescript)
- [Tracing Your Application with OpenTelemetry](#tracing-your-application-with-opentelemetry)
- [Setting up a Tracing Backend](#setting-up-a-tracing-backend)
- [Trace Your NodeJS Application](#trace-your-nodejs-application)
- [Install the required OpenTelemetry libraries](#install-the-required-opentelemetry-libraries)
- [Initialize a global tracer](#initialize-a-global-tracer)
- [Initialize and Register a Trace Exporter](#initialize-and-register-a-trace-exporter)
- [Collect Metrics Using OpenTelemetry](#collect-metrics-using-opentelemetry)
- [Set up a Metrics Backend](#set-up-a-metrics-backend)
- [Monitor Your NodeJS Application](#monitor-your-nodejs-application)
- [Install the required OpenTelemetry metrics libraries](#install-the-required-opentelemetry-metrics-libraries)
- [Initialize a meter and collect metrics](#initialize-a-meter-and-collect-metrics)
- [Initialize and register a metrics exporter](#initialize-and-register-a-metrics-exporter)
## Tracing Your Application with OpenTelemetry
@ -32,7 +33,7 @@ The first thing we will need before we can start collecting traces is a tracing
In order to set up Zipkin as quickly as possible, run the latest [Docker Zipkin](https://github.com/openzipkin/docker-zipkin) container, exposing port `9411`. If you cant run Docker containers, you will need to download and run Zipkin by following the Zipkin [quickstart guide](https://zipkin.io/pages/quickstart.html).
```sh
$ docker run --rm -d -p 9411:9411 --name zipkin openzipkin/zipkin
docker run --rm -d -p 9411:9411 --name zipkin openzipkin/zipkin
```
Browse to <http://localhost:9411> to ensure that you can see the Zipkin UI.
@ -137,10 +138,10 @@ provider.addSpanProcessor(
console.log("tracing initialized");
```
Now if you run your application with the `tracing.ts` file loaded, and you send requests to your application over HTTP (in the sample application just browse to http://localhost:8080), you will see traces exported to your tracing backend that look like this:
Now if you run your application with the `tracing.ts` file loaded, and you send requests to your application over HTTP (in the sample application just browse to <http://localhost:8080),> you will see traces exported to your tracing backend that look like this:
```sh
$ ts-node -r ./tracing.ts app.ts
ts-node -r ./tracing.ts app.ts
```
<p align="center"><img src="../images/zipkin-trace.png?raw=true"/></p>
@ -225,7 +226,7 @@ An example application which can be used with this guide can be found at in the
To create metrics on NodeJS, you will need `@opentelemetry/metrics`.
```sh
$ npm install @opentelemetry/metrics
npm install @opentelemetry/metrics
```
#### Initialize a meter and collect metrics
@ -291,7 +292,7 @@ Now, when we make requests to our service our meter will count all requests.
Counting metrics is only useful if we can export them somewhere that we can see them. For this, we're going to use prometheus. Creating and registering a metrics exporter is much like the tracing exporter above. First we will need to install the prometheus exporter.
```sh
$ npm install @opentelemetry/exporter-prometheus
npm install @opentelemetry/exporter-prometheus
```
Next, modify your `monitoring.ts` file to look like this:
@ -356,7 +357,7 @@ Listening for requests on http://localhost:8080
Now, each time you browse to <http://localhost:8080> you should see "Hello from the backend" in your browser and your metrics in prometheus should update. You can verify the current metrics by browsing to <http://localhost:9464/metrics>, which should look like this:
```
```sh
# HELP requests Count all incoming requests
# TYPE requests counter
requests{route="/"} 1

View File

@ -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]
@ -13,6 +14,7 @@ This package depends on all core node plugins maintained by OpenTelemetry author
- [@opentelemetry/plugin-https][otel-plugin-https]
## 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Plugins Web Core
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -11,6 +12,7 @@ This package depends on all core web plugins maintained by OpenTelemetry authors
- [@opentelemetry/plugin-xml-http-request][otel-plugin-xml-http-request]
## 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]

View File

@ -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: <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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry AsyncHooks-based 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 [async-hooks][async-hooks-doc] based context manager which is used internally by OpenTelemetry plugins to propagate specific context between function calls and async operations. It only targets NodeJS since async-hooks is only available there.
## What is a ContextManager ?
## What is a ContextManager
The definition and why they exist is available on [the readme of the context-base package][def-context-manager].
@ -25,13 +26,14 @@ There are known modules that break context propagation ([some of them are listed
### Prior arts
Context propagation is a big subject when talking about tracing in NodeJS, if you want more information about that here are some resources:
- https://www.npmjs.com/package/continuation-local-storage (which was the old way of doing context propagation)
- <https://www.npmjs.com/package/continuation-local-storage> (which was the old way of doing context propagation)
- Datadog's own implementation for their Javascript tracer: [here][dd-js-tracer-scope]
- OpenTracing implementation: [here][opentracing-scope]
- Discussion about context propagation by the NodeJS diagnostics working group: [here][diag-team-scope-discussion]
## 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]

View File

@ -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: <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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Context Zone Peer Dependency
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -9,7 +10,6 @@ This module provides *Zone Context Manager with a peer dependency for [zone-js]*
If you use Angular you already have the [zone-js] and you should use this package.
If you don't have your own [zone-js] please use [@opentelemetry/context-zone]
## Installation
```bash
@ -17,6 +17,7 @@ npm install --save @opentelemetry/context-zone-peer-dep
```
## Usage
```js
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracer } from '@opentelemetry/web';
@ -49,6 +50,7 @@ webTracerWithZone.withSpan(span1, () => {
```
## 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Context Zone
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -9,7 +10,6 @@ This module provides *Zone Context Manager with bundled [zone-js]* for Web appli
If you have your own [zone-js] please use [@opentelemetry/context-zone-peer-dep]
If you use Angular it means you already have the [zone-js] and you should use [@opentelemetry/context-zone-peer-dep]
## Installation
```bash
@ -17,6 +17,7 @@ npm install --save @opentelemetry/context-zone
```
## Usage
```js
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracer } from '@opentelemetry/web';
@ -49,6 +50,7 @@ webTracerWithZone.withSpan(span1, () => {
```
## 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Core
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -9,19 +10,24 @@ This package provides default implementations of the OpenTelemetry API for trace
## Built-in Implementations
- [OpenTelemetry Core](#opentelemetry-core)
- [Built-in Implementations](#built-in-implementations)
- [Built-in Propagators](#built-in-propagators)
* [HttpTraceContext Propagator](#httptracecontext-propagator)
* [B3 Propagator](#b3-propagator)
* [Composite Propagator](#composite-propagator)
* [Correlation Context Propagator](#correlation-context-propagator)
- [HttpTraceContext Propagator](#httptracecontext-propagator)
- [B3 Propagator](#b3-propagator)
- [Composite Propagator](#composite-propagator)
- [Correlation Context Propagator](#correlation-context-propagator)
- [Built-in Sampler](#built-in-sampler)
* [Always Sampler](#always-sampler)
* [Never Sampler](#never-sampler)
* [Probability Sampler](#probability-sampler)
- [Always Sampler](#always-sampler)
- [Never Sampler](#never-sampler)
- [Probability Sampler](#probability-sampler)
- [Useful links](#useful-links)
- [License](#license)
### Built-in Propagators
#### HttpTraceContext Propagator
OpenTelemetry provides a text-based approach to propagate context to remote services using the [W3C Trace Context](https://www.w3.org/TR/trace-context/) HTTP headers.
> This is used as a default Propagator
@ -35,7 +41,8 @@ api.propagation.setGlobalPropagator(new HttpTraceContext());
```
#### B3 Propagator
This is propagator for the B3 HTTP header format, which sends a `SpanContext` on the wire in an HTTP request, allowing other services to create spans with the right context. Based on: https://github.com/openzipkin/b3-propagation
This is propagator for the B3 HTTP header format, which sends a `SpanContext` on the wire in an HTTP request, allowing other services to create spans with the right context. Based on: <https://github.com/openzipkin/b3-propagation>
```js
const api = require("@opentelemetry/api");
@ -46,6 +53,7 @@ api.propagation.setGlobalPropagator(new B3Propagator());
```
#### Composite Propagator
Combines multiple propagators into a single propagator.
```js
@ -57,6 +65,7 @@ api.propagation.setGlobalPropagator(new CompositePropagator());
```
#### Correlation Context Propagator
Provides a text-based approach to propagate [correlation context](https://w3c.github.io/correlation-context/) to remote services using the [OpenTelemetry CorrelationContext Propagation](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/correlationcontext/api.md#header-name) HTTP headers.
```js
@ -68,9 +77,11 @@ api.propagation.setGlobalPropagator(new HttpCorrelationContext());
```
### Built-in Sampler
Sampler is used to make decisions on `Span` sampling.
#### Always Sampler
Samples every trace regardless of upstream sampling decisions.
> This is used as a default Sampler
@ -85,6 +96,7 @@ const tracerProvider = new NodeTracerProvider({
```
#### Never Sampler
Doesn't sample any trace, regardless of upstream sampling decisions.
```js
@ -97,6 +109,7 @@ const tracerProvider = new NodeTracerProvider({
```
#### Probability Sampler
Samples a configurable percentage of traces, and additionally samples any trace that was sampled upstream.
```js
@ -109,6 +122,7 @@ const tracerProvider = new NodeTracerProvider({
```
## 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Collector Exporter for web and node
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -14,6 +15,7 @@ npm install --save @opentelemetry/exporter-collector
```
## Usage in Web
```js
import { SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracerProvider } from '@opentelemetry/web';
@ -32,6 +34,7 @@ provider.register();
```
## Usage in Node
```js
const { BasicTracerProvider, SimpleSpanProcessor } = require('@opentelemetry/tracing');
const { CollectorExporter } = require('@opentelemetry/exporter-collector');
@ -50,6 +53,7 @@ provider.register();
```
By default, plaintext connection is used. In order to use TLS in Node.js, provide `credentials` option like so:
```js
const fs = require('fs');
const grpc = require('grpc');
@ -78,11 +82,13 @@ To see how to generate credentials, you can refer to the script used to generate
Note, that this will only work if TLS is also configured on the server.
## Running opentelemetry-collector locally to see the traces
1. Go to examples/basic-tracer-node
2. run `npm run collector:docker:ot`
3. Open page at `http://localhost:9411/zipkin/` to observe the traces
## 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]

View File

@ -1,8 +1,9 @@
### Important!
# Important
**Submodule is always pointing to certain revision number. So updating the master of the submodule repo will not have impact on your code.
Knowing this if you want to change the submodule to point to a different version (when for example proto has changed) here is how to do it:**
### Updating submodule to point to certain revision number
## Updating submodule to point to certain revision number
1. Make sure you are in the same folder as this instruction

View File

@ -43,7 +43,7 @@ Or run the `jaeger-all-in-one(.exe)` executable from the [binary distribution ar
jaeger-all-in-one --collector.zipkin.http-port=9411
```
You can then navigate to http://localhost:16686 to access the Jaeger UI.
You can then navigate to <http://localhost:16686> to access the Jaeger UI.
## Installation
@ -85,7 +85,7 @@ You can use built-in `SimpleSpanProcessor` or `BatchSpanProcessor` or write your
## Useful links
- To know more about Jaeger, visit: https://www.jaegertracing.io/docs/latest/getting-started/
- To know more about Jaeger, visit: <https://www.jaegertracing.io/docs/latest/getting-started/>
- 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Prometheus Metric Exporter
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -51,11 +52,12 @@ boundCounter.add(10);
## Viewing your metrics
With the above you should now be able to navigate to the Prometheus UI at: http://localhost:9464/metrics
With the above you should now be able to navigate to the Prometheus UI at: <http://localhost:9464/metrics>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- To learn more about Prometheus, visit: https://prometheus.io/
- To learn more about Prometheus, visit: <https://prometheus.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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Zipkin Trace Exporter
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -44,12 +45,13 @@ You can use built-in `SimpleSpanProcessor` or `BatchSpanProcessor` or write your
## Viewing your traces
Please visit the Zipkin UI endpoint http://localhost:9411
Please visit the Zipkin UI endpoint <http://localhost:9411>
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For Zipkin project at https://zipkin.io/
- For Zipkin project at <https://zipkin.io/>
- For help or feedback on this project, join us on [gitter][gitter-url]
## License

View File

@ -1,4 +1,5 @@
# OpenTelemetry Metrics SDK
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -16,6 +17,7 @@ npm install --save @opentelemetry/metrics
## Usage
### Counter
Choose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. Counters are defined as `Monotonic = true` by default, meaning that positive values are expected.
```js
@ -38,6 +40,7 @@ boundCounter.add(10);
```
### Observable
Choose this kind of metric when only last value is important without worry about aggregation
```js
@ -80,6 +83,7 @@ Values captured by `ValueRecorder.record(value)` are treated as individual event
`ValueRecorder` should be chosen either when capturing measurements that do not contribute meaningfully to a sum, or when capturing numbers that are additive in nature, but where the distribution of individual increments is considered interesting.
## 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry gRPC Instrumentation for Node.js
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -12,7 +13,7 @@ For automatic instrumentation see the
## Installation
```
```sh
npm install --save @opentelemetry/plugin-grpc
```
@ -21,6 +22,7 @@ npm install --save @opentelemetry/plugin-grpc
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).
To load a specific plugin (**gRPC** in this case), specify it in the Node Tracer's configuration.
```javascript
const { NodeTracerProvider } = require('@opentelemetry/node');
@ -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');
@ -44,8 +47,8 @@ const provider = new NodeTracerProvider();
See [examples/grpc](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/grpc) 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry HTTP Instrumentation for Node.js
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -21,6 +22,7 @@ npm install --save @opentelemetry/plugin-http
OpenTelemetry HTTP Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems.
To load a specific plugin (HTTP in this case), specify it in the Node Tracer's configuration.
```js
const { NodeTracerProvider } = require('@opentelemetry/node');
@ -37,6 +39,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.
```js
const { NodeTracerProvider } = require('@opentelemetry/node');
@ -61,6 +64,7 @@ Http plugin has few options available to choose from. You can set the following:
| `requireParentforIncomingSpans` | Boolean | Require that is a parent span to create new span for incoming requests. |
## 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry HTTPS Instrumentation for Node.js
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -21,6 +22,7 @@ npm install --save @opentelemetry/plugin-https
OpenTelemetry HTTPS Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems.
To load a specific plugin (HTTPS in this case), specify it in the Node Tracer's configuration.
```js
const { NodeTracerProvider } = require('@opentelemetry/node');
@ -37,6 +39,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.
```js
const { NodeTracerProvider } = require('@opentelemetry/node');
@ -56,6 +59,7 @@ Https plugin has few options available to choose from. You can set the following
| [`ignoreOutgoingUrls`](https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-plugin-http/src/types.ts#L28) | `IgnoreMatcher[]` | Http plugin will not trace all outgoing requests that match urls |
## 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry XMLHttpRequest Instrumentation for web
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -39,6 +40,7 @@ req.send();
```
## Example Screenshots
![Screenshot of the running example](images/main.jpg)
![Screenshot of the running example](images/request.jpg)
![Screenshot of the running example](images/cors.jpg)
@ -46,6 +48,7 @@ req.send();
See [examples/tracer-web](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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Resources Util
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -20,6 +21,7 @@ npm install --save @opentelemetry/resources
> TODO
## 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]

View File

@ -1,4 +1,5 @@
# OpenTracing shim
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -36,7 +37,6 @@ opentracing.initGlobalTracer(new TracerShim(tracer));
See [examples/opentracing-shim](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/opentracing-shim) for a short example.
## License
Apache 2.0 - See [LICENSE][license-url] for more information.

View File

@ -1,4 +1,5 @@
# OpenTelemetry Tracing SDK
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -43,9 +44,11 @@ span.end();
```
## Example
See [examples/basic-tracer-node](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/basic-tracer-node) for an end-to-end example, including exporting created spans.
## 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]

View File

@ -1,4 +1,5 @@
# OpenTelemetry Web SDK
[![Gitter chat][gitter-image]][gitter-url]
[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
@ -10,7 +11,8 @@ This module provides *automated instrumentation and tracing* for Web application
For manual instrumentation see the
[@opentelemetry/tracing](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing) package.
## How does automatic tracing work?
## How does automatic tracing work
This package exposes a class `WebTracerProvider` that will be able to automatically trace things in Browser only.
See the example how to use it.
@ -62,6 +64,7 @@ providerWithZone.register({
```
## 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]