Skip to content

Commit

Permalink
chore: merge branch 'master' into zipkin
Browse files Browse the repository at this point in the history
  • Loading branch information
obecny committed Sep 3, 2020
2 parents ba01dd7 + c70dabf commit fc4c8cb
Show file tree
Hide file tree
Showing 304 changed files with 9,175 additions and 3,300 deletions.
1 change: 1 addition & 0 deletions .circleci/checksum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ fi
openssl md5 package.json >> $FILE

find packages/*/package.json | xargs -I{} openssl md5 {} >> $FILE
find metapackages/*/package.json | xargs -I{} openssl md5 {} >> $FILE

sort -o $FILE $FILE
14 changes: 8 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ node_test_env: &node_test_env


cache_1: &cache_1
key: npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
key: npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
paths:
- ./node_modules
- ./package-lock.json
Expand All @@ -25,13 +25,15 @@ cache_1: &cache_1
- packages/opentelemetry-web/node_modules

cache_2: &cache_2
key: npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
key: npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
paths:
- packages/opentelemetry-plugin-grpc/node_modules
- packages/opentelemetry-plugin-http/node_modules
- packages/opentelemetry-plugin-https/node_modules
- packages/opentelemetry-exporter-collector/node_modules
- packages/opentelemetry-plugin-xml-http-request/node_modules
- packages/opentelemetry-resource-detector-aws/node_modules
- packages/opentelemetry-resource-detector-gcp/node_modules
- packages/opentelemetry-resources/node_modules

node_unit_tests: &node_unit_tests
Expand All @@ -53,10 +55,10 @@ node_unit_tests: &node_unit_tests
echo "CIRCLE_NODE_VERSION=${CIRCLE_NODE_VERSION}"
- restore_cache:
keys:
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
- restore_cache:
keys:
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
- run:
name: Install Root Dependencies
command: npm install --ignore-scripts
Expand Down Expand Up @@ -93,10 +95,10 @@ browsers_unit_tests: &browsers_unit_tests
echo "CIRCLE_NODE_VERSION=${CIRCLE_NODE_VERSION}"
- restore_cache:
keys:
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-01-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
- restore_cache:
keys:
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-F267A71D
- npm-cache-02-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/checksums.txt" }}-20B74F85
- run:
name: Install Root Dependencies
command: npm install --ignore-scripts
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/backcompat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Backwards Compatability

on: [push, pull_request]

jobs:
types-node:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: restore lerna
uses: actions/cache@master # must use unreleased master to cache multiple paths
id: cache
with:
path: |
node_modules
packages/*/node_modules
metapackages/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Bootstrap
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --only=dev --ignore-scripts
npx lerna bootstrap --no-ci --ignore-scripts -- --only=dev
- name: Install and Build API Dependencies
run: npx lerna bootstrap --no-ci --scope backcompat-* --include-filtered-dependencies

- name:
run: |
npm run test:backcompat
10 changes: 9 additions & 1 deletion .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
# Fetch all history (needed for lerna / semantic release to correctly version)
fetch-depth: 0
# pulls all tags (needed for lerna / semantic release to correctly version)
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Node.js
uses: actions/setup-node@master
with:
Expand All @@ -35,6 +40,9 @@ jobs:
npx lerna bootstrap --no-ci
- name: Publish
run: npx lerna publish --canary --dist-tag canary --preid canary --yes
run: npx lerna publish --canary --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# Push new version tag to github
- run: git push --tags
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ package.json.lerna_backup

# VsCode configs
.vscode/

#IDEA
.idea
*.iml
7 changes: 5 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "packages/opentelemetry-exporter-collector/src/platform/node/protos"]
path = packages/opentelemetry-exporter-collector/src/platform/node/protos
[submodule "packages/opentelemetry-exporter-collector-grpc/protos"]
path = packages/opentelemetry-exporter-collector-grpc/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git
[submodule "packages/opentelemetry-exporter-collector-proto/protos"]
path = packages/opentelemetry-exporter-collector-proto/protos
url = https://github.com/open-telemetry/opentelemetry-proto.git
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,95 @@ All notable changes to this project will be documented in this file.

## Unreleased

## 0.11.0

### :boom: Breaking Change

* `opentelemetry-api`, `opentelemetry-core`, `opentelemetry-node`, `opentelemetry-plugin-http`, `opentelemetry-plugin-https`, `opentelemetry-sdk-node`, `opentelemetry-tracing`, `opentelemetry-web`
* [#1458](https://github.com/open-telemetry/opentelemetry-js/pull/1458) refactor: rename HttpText to TextMap propagator ([@dengliming](https://github.com/dengliming))
* `opentelemetry-api`, `opentelemetry-core`, `opentelemetry-exporter-collector-grpc`, `opentelemetry-exporter-collector-proto`, `opentelemetry-exporter-collector`, `opentelemetry-metrics`
* [#1446](https://github.com/open-telemetry/opentelemetry-js/pull/1446) Collector split ([@obecny](https://github.com/obecny))
* `opentelemetry-exporter-collector`, `opentelemetry-exporter-jaeger`, `opentelemetry-exporter-zipkin`, `opentelemetry-node`, `opentelemetry-resources`, `opentelemetry-web`
* [#1419](https://github.com/open-telemetry/opentelemetry-js/pull/1419) chore!: refer to resource labels as attributes ([@mwear](https://github.com/mwear))

### :rocket: (Enhancement)

* `opentelemetry-api`, `opentelemetry-core`, `opentelemetry-shim-opentracing`, `opentelemetry-tracing`
* [#1447](https://github.com/open-telemetry/opentelemetry-js/pull/1447) Move SpanContext isValid to the API ([@srjames90](https://github.com/srjames90))
* `opentelemetry-plugin-xml-http-request`
* [#1476](https://github.com/open-telemetry/opentelemetry-js/pull/1476) Align xhr span name with spec ([@johnbley](https://github.com/johnbley))
* `opentelemetry-resource-detector-gcp`, `opentelemetry-sdk-node`
* [#1469](https://github.com/open-telemetry/opentelemetry-js/pull/1469) chore: bump gcp-metadata ([@dyladan](https://github.com/dyladan))
* `opentelemetry-exporter-prometheus`
* [#1310](https://github.com/open-telemetry/opentelemetry-js/pull/1310) feat: prometheus serializer ([@legendecas](https://github.com/legendecas))
* [#1428](https://github.com/open-telemetry/opentelemetry-js/pull/1428) feat: Add missing prometheus exports for ValueRecorder, SumObserver & UpDownSumObserver ([@paulfairless](https://github.com/paulfairless))
* `opentelemetry-core`, `opentelemetry-tracing`
* [#1344](https://github.com/open-telemetry/opentelemetry-js/pull/1344) feat: introduces ability to suppress tracing via context ([@michaelgoin](https://github.com/michaelgoin))
* `opentelemetry-api`, `opentelemetry-exporter-collector-proto`, `opentelemetry-plugin-http`, `opentelemetry-semantic-conventions`, `opentelemetry-tracing`
* [#1372](https://github.com/open-telemetry/opentelemetry-js/pull/1372) feat: adding possibility of recording exception ([@obecny](https://github.com/obecny))
* `opentelemetry-api`, `opentelemetry-core`, `opentelemetry-exporter-collector-grpc`, `opentelemetry-exporter-collector-proto`, `opentelemetry-exporter-collector`, `opentelemetry-metrics`
* [#1446](https://github.com/open-telemetry/opentelemetry-js/pull/1446) Collector split ([@obecny](https://github.com/obecny))
* `opentelemetry-metrics`
* [#1366](https://github.com/open-telemetry/opentelemetry-js/pull/1366) fix: ignore non-number value on BaseBoundInstrument.update ([@legendecas](https://github.com/legendecas))
* `opentelemetry-node`
* [#1440](https://github.com/open-telemetry/opentelemetry-js/pull/1440) fix: add Hapi and Koa to default supported plugins ([@carolinee21](https://github.com/carolinee21))
* `opentelemetry-resources`
* [#1408](https://github.com/open-telemetry/opentelemetry-js/pull/1408) Feat: Migrate EC2 Plugin Resource Detector from IMDSv1 to IMDSv2 ([@EdZou](https://github.com/EdZou))
* `opentelemetry-core`
* [#1349](https://github.com/open-telemetry/opentelemetry-js/pull/1349) feat: faster span and trace id generation ([@dyladan](https://github.com/dyladan))
* `opentelemetry-context-async-hooks`
* [#1356](https://github.com/open-telemetry/opentelemetry-js/pull/1356) feat: use a symbol to store patched listeners ([@Flarna](https://github.com/Flarna))
* `opentelemetry-semantic-conventions`
* [#1407](https://github.com/open-telemetry/opentelemetry-js/pull/1407) semantic conventions for operating system ([@obecny](https://github.com/obecny))
* [#1409](https://github.com/open-telemetry/opentelemetry-js/pull/1409) removing semantic conventions from code coverage ([@obecny](https://github.com/obecny))
* [#1388](https://github.com/open-telemetry/opentelemetry-js/pull/1388) chore: transpile semantic conventions to es5 ([@dyladan](https://github.com/dyladan))

### :bug: (Bug Fix)

* `opentelemetry-api`, `opentelemetry-metrics`
* [#1373](https://github.com/open-telemetry/opentelemetry-js/pull/1373) fix: updates ValueRecorder to allow negative values ([@michaelgoin](https://github.com/michaelgoin))
* `opentelemetry-metrics`
* [#1475](https://github.com/open-telemetry/opentelemetry-js/pull/1475) fix: proper histogram boundaries sort ([@AndrewGrachov](https://github.com/AndrewGrachov))
* `opentelemetry-core`
* [#1336](https://github.com/open-telemetry/opentelemetry-js/pull/1336) fix: correlation context propagation extract for a single entry ([@rubenvp8510](https://github.com/rubenvp8510))
* [#1406](https://github.com/open-telemetry/opentelemetry-js/pull/1406) Pass W3C Trace Context test suite at strictness 1 ([@michaelgoin](https://github.com/michaelgoin))
* `opentelemetry-context-base`
* [#1387](https://github.com/open-telemetry/opentelemetry-js/pull/1387) fix: allow multiple instances of core to interact with context ([@dyladan](https://github.com/dyladan))

### :books: (Refine Doc)

* `opentelemetry-exporter-collector`
* [#1432](https://github.com/open-telemetry/opentelemetry-js/pull/1432) docs(exporter-collector): CollectorTransportNode should be CollectorProtocolNode ([@Hongbo-Miao](https://github.com/Hongbo-Miao))
* [#1361](https://github.com/open-telemetry/opentelemetry-js/pull/1361) chore: adding info about collector compatible version, removing duplicated doc after merge ([@obecny](https://github.com/obecny))
* `opentelemetry-metrics`
* [#1427](https://github.com/open-telemetry/opentelemetry-js/pull/1427) chore: fix histogram type documentation ([@TigerHe7](https://github.com/TigerHe7))
* Other
* [#1431](https://github.com/open-telemetry/opentelemetry-js/pull/1431) Fix typo in document. ([@dengliming](https://github.com/dengliming))

#### Committers: 21

* Andrew ([@AndrewGrachov](https://github.com/AndrewGrachov))
* Bartlomiej Obecny ([@obecny](https://github.com/obecny))
* Cong Zou ([@EdZou](https://github.com/EdZou))
* Daniel Dyla ([@dyladan](https://github.com/dyladan))
* Gerhard Stöbich ([@Flarna](https://github.com/Flarna))
* Hongbo Miao ([@Hongbo-Miao](https://github.com/Hongbo-Miao))
* Igor Konforti ([@confiq](https://github.com/confiq))
* John Bley ([@johnbley](https://github.com/johnbley))
* Jonah Rosenblum ([@jonahrosenblum](https://github.com/jonahrosenblum))
* Mark Wolff ([@markwolff](https://github.com/markwolff))
* Matthew Wear ([@mwear](https://github.com/mwear))
* Michael Goin ([@michaelgoin](https://github.com/michaelgoin))
* Paul Fairless ([@paulfairless](https://github.com/paulfairless))
* Reginald McDonald ([@reggiemcdonald](https://github.com/reggiemcdonald))
* Ruben Vargas Palma ([@rubenvp8510](https://github.com/rubenvp8510))
* Sergio Regueira ([@sergioregueira](https://github.com/sergioregueira))
* Tiger He ([@TigerHe7](https://github.com/TigerHe7))
* [@carolinee21](https://github.com/carolinee21)
* [@dengliming](https://github.com/dengliming)
* [@srjames90](https://github.com/srjames90)
* legendecas ([@legendecas](https://github.com/legendecas))

## 0.10.2

### :rocket: (Enhancement)
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Since we use `lerna`, we can use [lerna-changelog](https://github.com/lerna/lern
#### 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**.
For security reasons, when you create a Github token, select the permissions: under **repo**, select **Access public repositories**, **Access commit status**.

In your terminal, execute the following command:

Expand Down
10 changes: 10 additions & 0 deletions backwards-compatability/node10/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {NodeSDK, api} from '@opentelemetry/sdk-node';
import {ConsoleSpanExporter} from '@opentelemetry/tracing';

const sdk = new NodeSDK({
traceExporter: new ConsoleSpanExporter(),
autoDetectResources: false,
});
sdk.start();

api.trace.getTracer('test');
20 changes: 20 additions & 0 deletions backwards-compatability/node10/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "backcompat-node10",
"version": "0.11.0",
"private": true,
"description": "Backwards compatability app for node8 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
"scripts": {
"test:backcompat": "tsc --noEmit index.ts"
},
"dependencies": {
"@opentelemetry/sdk-node": "^0.11.0",
"@opentelemetry/tracing": "^0.11.0"
},
"devDependencies": {
"@types/node": "^10.0.0",
"typescript": "^3.9.7"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"
}
10 changes: 10 additions & 0 deletions backwards-compatability/node12/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {NodeSDK, api} from '@opentelemetry/sdk-node';
import {ConsoleSpanExporter} from '@opentelemetry/tracing';

const sdk = new NodeSDK({
traceExporter: new ConsoleSpanExporter(),
autoDetectResources: false,
});
sdk.start();

api.trace.getTracer('test');
20 changes: 20 additions & 0 deletions backwards-compatability/node12/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "backcompat-node12",
"version": "0.11.0",
"private": true,
"description": "Backwards compatability app for node8 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
"scripts": {
"test:backcompat": "tsc --noEmit index.ts"
},
"dependencies": {
"@opentelemetry/sdk-node": "^0.11.0",
"@opentelemetry/tracing": "^0.11.0"
},
"devDependencies": {
"@types/node": "^12.0.0",
"typescript": "^3.9.7"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"
}
10 changes: 10 additions & 0 deletions backwards-compatability/node8/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {NodeSDK, api} from '@opentelemetry/sdk-node';
import {ConsoleSpanExporter} from '@opentelemetry/tracing';

const sdk = new NodeSDK({
traceExporter: new ConsoleSpanExporter(),
autoDetectResources: false,
});
sdk.start();

api.trace.getTracer('test');
20 changes: 20 additions & 0 deletions backwards-compatability/node8/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "backcompat-node8",
"version": "0.11.0",
"private": true,
"description": "Backwards compatability app for node8 types and the OpenTelemetry Node.js SDK",
"main": "index.js",
"scripts": {
"test:backcompat": "tsc --noEmit index.ts"
},
"dependencies": {
"@opentelemetry/sdk-node": "^0.11.0",
"@opentelemetry/tracing": "^0.11.0"
},
"devDependencies": {
"@types/node": "^8.0.0",
"typescript": "^3.9.7"
},
"author": "OpenTelemetry Authors",
"license": "Apache-2.0"
}
8 changes: 4 additions & 4 deletions examples/basic-tracer-node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example-basic-tracer-node",
"private": true,
"version": "0.10.2",
"version": "0.11.0",
"description": "Example of using @opentelemetry/tracing in Node.js",
"main": "index.js",
"scripts": {
Expand All @@ -24,9 +24,9 @@
"url": "https://github.com/open-telemetry/opentelemetry-js/issues"
},
"dependencies": {
"@opentelemetry/api": "^0.10.2",
"@opentelemetry/exporter-jaeger": "^0.10.2",
"@opentelemetry/tracing": "^0.10.2"
"@opentelemetry/api": "^0.11.0",
"@opentelemetry/exporter-jaeger": "^0.11.0",
"@opentelemetry/tracing": "^0.11.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js#readme"
}
8 changes: 6 additions & 2 deletions examples/collector-exporter-node/metrics.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
'use strict';

const { ConsoleLogger, LogLevel } = require('@opentelemetry/core');
const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector');
// const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector-grpc');
// const { CollectorMetricExporter } = require('@opentelemetry/exporter-collector-proto');
const { MeterProvider } = require('@opentelemetry/metrics');

const metricExporter = new CollectorMetricExporter({
serviceName: 'basic-metric-service',
// logger: new ConsoleLogger(LogLevel.DEBUG),
// url: 'http://localhost:55681/v1/metrics',
logger: new ConsoleLogger(LogLevel.DEBUG),
});

const meter = new MeterProvider({
exporter: metricExporter,
interval: 1000,
}).getMeter('example-prometheus');
}).getMeter('example-exporter-collector');

const requestCounter = meter.createCounter('requests', {
description: 'Example of a Counter',
Expand Down
Loading

0 comments on commit fc4c8cb

Please sign in to comment.