Skip to content

Commit

Permalink
Merge branch 'master' into messaging-conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir Hadassi authored Dec 16, 2020
2 parents 750c5a4 + 48b60c9 commit da20a43
Show file tree
Hide file tree
Showing 136 changed files with 6,086 additions and 777 deletions.
27 changes: 0 additions & 27 deletions .circleci/checksum.sh

This file was deleted.

154 changes: 0 additions & 154 deletions .circleci/config.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/backcompat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Backwards Compatability

on: [push, pull_request]
on:
push:
branches: [master]
pull_request:

jobs:
types-node:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Lint

on: [push, pull_request]
on:
push:
branches: [master]
pull_request:

jobs:
build:
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Unit Tests
on:
push:
branches: [master]
pull_request:

jobs:
unit-test:
strategy:
fail-fast: false
matrix:
container: ["node:8", "node:10", "node:12", "node:14"]
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: |
node_modules
package-lock.json
packages/*/node_modules
key: ${{ runner.os }}-${{ matrix.container }}-${{ hashFiles('**/package.json') }}
- name: Install Root Dependencies
run: npm install --ignore-scripts
- name: Boostrap Dependencies
run: npx lerna bootstrap --no-ci
- name: Unit tests
run: npm run test
- name: Report Coverage
run: npm run codecov
if: ${{ matrix.container }} == 'node:12'
browser-tests:
runs-on: ubuntu-latest
container:
image: circleci/node:12-browsers
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Permission Setup
run: sudo chmod -R 777 /github /__w
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: |
node_modules
package-lock.json
packages/*/node_modules
key: ${{ runner.os }}-node:12-${{ hashFiles('**/package.json') }}
- name: Install Root Dependencies
run: npm install --ignore-scripts
- name: Boostrap Dependencies
run: npx lerna bootstrap --no-ci
- name: Unit tests
run: npm run test:browser
- name: Report Coverage
run: npm run codecov:browser
5 changes: 4 additions & 1 deletion .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Run w3c tests on push

on: [push]
on:
push:
branches: [master]
pull_request:

jobs:
build-and-deploy:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Last updated March 2020
| Metrics | Beta | v0.3 | Beta |
| Context | Beta | v0.3 | Beta |
| Propagation | Beta | v0.3 | Beta |
| Correlation Context | Alpha | v0.3 | Development |
| Baggage | Alpha | v0.3 | Development |
| OpenTracing Bridge | N/A | v0.3 | Beta |
| Resources | N/A | v0.3 | Beta |

Expand Down
2 changes: 1 addition & 1 deletion examples/metrics/metrics/observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const cpuUsageMetric = meter.createValueObserver('cpu_usage_per_app', {
description: 'Example of sync value observer used with async batch observer',
});

meter.createBatchObserver('metric_batch_observer', (observerBatchResult) => {
meter.createBatchObserver((observerBatchResult) => {
Promise.all([
someAsyncMetrics(),
// simulate waiting
Expand Down
2 changes: 1 addition & 1 deletion getting-started/ts-example/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.9",
"@types/node": "14.14.10",
"@types/node": "14.14.12",
"ts-node": "8.10.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion getting-started/ts-example/monitored-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.9",
"@types/node": "14.14.10",
"@types/node": "14.14.12",
"ts-node": "8.10.2"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions getting-started/ts-example/traced-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"license": "Apache-2.0",
"devDependencies": {
"@types/express": "4.17.9",
"@types/node": "14.14.10",
"ts-node": "9.0.0"
"@types/node": "14.14.12",
"ts-node": "9.1.1"
},
"dependencies": {
"@opentelemetry/core": "^0.13.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const axios = require("axios");
const { HttpTraceContext } = require("@opentelemetry/core");
const { BasicTracerProvider } = require("@opentelemetry/tracing");
const { context, propagation, trace } = require("@opentelemetry/api");
const { context, propagation, trace, ROOT_CONTEXT } = require("@opentelemetry/api");
const {
AsyncHooksContextManager,
} = require("@opentelemetry/context-async-hooks");
Expand Down Expand Up @@ -31,14 +31,14 @@ app.use(bodyParser.json());

// Mount our demo route
app.post("/verify-tracecontext", (req, res) => {
context.with(propagation.extract(req.headers), () => {
context.with(propagation.extract(ROOT_CONTEXT, req.headers), () => {
Promise.all(
req.body.map((action) => {
const span = tracer.startSpan("propagate-w3c");
let promise;
tracer.withSpan(span, () => {
const headers = {};
propagation.inject(headers);
propagation.inject(context.active(), headers);
promise = axios
.post(
action.url,
Expand All @@ -57,8 +57,8 @@ app.post("/verify-tracecontext", (req, res) => {
return promise;
})
)
.then(() => res.send("hello"))
.catch((err) => res.status(500).send(err));
.then(() => res.send("hello"))
.catch((err) => res.status(500).send(err));
});
});

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
"devDependencies": {
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@typescript-eslint/eslint-plugin": "4.9.0",
"@typescript-eslint/parser": "4.9.0",
"@typescript-eslint/eslint-plugin": "4.9.1",
"@typescript-eslint/parser": "4.9.1",
"beautify-benchmark": "0.2.4",
"benchmark": "2.1.4",
"eslint": "7.14.0",
"eslint": "7.15.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-plugin-header": "3.1.0",
"eslint-plugin-import": "2.22.1",
"gh-pages": "3.1.0",
"gts": "2.0.2",
"husky": "4.3.0",
"husky": "4.3.5",
"lerna": "3.22.1",
"lerna-changelog": "1.0.1",
"markdownlint-cli": "0.25.0",
Expand Down
Loading

0 comments on commit da20a43

Please sign in to comment.