Skip to content

Commit

Permalink
Merge branch 'main' into fix/exporter-collector-endpoint-path
Browse files Browse the repository at this point in the history
  • Loading branch information
obecny committed Aug 30, 2021
2 parents 2e24a03 + f0caa22 commit c8074c0
Show file tree
Hide file tree
Showing 76 changed files with 240 additions and 598 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,17 @@ jobs:
with:
args: "./**/*.md -i ./CHANGELOG.md"

- name: restore lock files
uses: actions/cache@master # must use unreleased master to cache multiple paths
- name: restore lerna
id: cache
uses: actions/cache@v2
with:
# must be done before bootstrap to not include node_modules files in the cache paths
path: |
package-lock.json
packages/*/package-lock.json
benchmark/*/package-lock.json
backwards-compatability/*/package-lock.json
metapackages/*/package-lock.json
packages/*/package-lock.json
integration-tests/*/package-lock.json
# increment the trailing number to break the cache manually
key: ${{ runner.os }}-lint-${{ hashFiles('**/package.json') }}-0
node_modules
*/*/node_modules
key: lint-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}

# On a cache hit, use ci to speed up the install process
- name: Bootstrap (cache hit)
if: steps.cache.outputs.cache-hit == 'true'
run: |
npm ci --ignore-scripts
npx lerna bootstrap --ignore-scripts --hoist --nohoist='zone.js'
# On a cache miss, fall back to a regular install
- name: Bootstrap (cache miss)
# On a cache miss, install dependencies
- name: Bootstrap
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --ignore-scripts
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v2
with:
command: manifest
token: ${{secrets.RELEASE_PR_TOKEN}}
default-branch: main
57 changes: 18 additions & 39 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,23 @@ jobs:
with:
node-version: ${{ matrix.node_version }}

- name: restore lock files
uses: actions/cache@master # must use unreleased master to cache multiple paths
- name: restore lerna
id: cache
uses: actions/cache@v2
with:
# must be done before bootstrap to not include node_modules files in the cache paths
path: |
package-lock.json
packages/*/package-lock.json
benchmark/*/package-lock.json
backwards-compatability/*/package-lock.json
metapackages/*/package-lock.json
packages/*/package-lock.json
integration-tests/*/package-lock.json
key: ${{ runner.os }}-unit_test-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}
- name: Install and Build (cache miss) 🔧
node_modules
*/*/node_modules
key: unittest-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}

- name: Bootstrap
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js'
npm run compile
- name: Install and Build (cache hit) 🔧
if: steps.cache.outputs.cache-hit == 'true'
run: |
npm ci --ignore-scripts
npx lerna bootstrap --hoist --nohoist='zone.js'
npm run compile
- name: Build 🔧
run: npm run compile

- name: Unit tests
run: npm run test
Expand All @@ -66,35 +56,24 @@ jobs:
uses: actions/checkout@v1
- name: Permission Setup
run: sudo chmod -R 777 /github /__w
- name: restore lock files
uses: actions/cache@master # must use unreleased master to cache multiple paths

- name: restore lerna
uses: actions/cache@v2
id: cache
with:
# must be done before bootstrap to not include node_modules files in the cache paths
path: |
package-lock.json
packages/*/package-lock.json
benchmark/*/package-lock.json
backwards-compatability/*/package-lock.json
metapackages/*/package-lock.json
packages/*/package-lock.json
integration-tests/*/package-lock.json
key: ${{ runner.os }}-unit_test-${{ matrix.container }}-${{ hashFiles('**/package.json') }}
node_modules
*/*/node_modules
key: unittest-${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles('**/package.json') }}

- name: Install and Build (cache miss) 🔧
- name: Bootstrap
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --hoist --nohoist='zone.js'
npm run compile
- name: Install and Build (cache hit) 🔧
if: steps.cache.outputs.cache-hit == 'true'
run: |
npm ci --ignore-scripts
npx lerna bootstrap --hoist --nohoist='zone.js'
npm run compile
- name: Build 🔧
run: npm run compile
- name: Unit tests
run: npm run test:browser
- name: Report Coverage
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,21 @@ jobs:
integration-tests/*/package-lock.json
key: ${{ runner.os }}-w3c_integration-${{ hashFiles('**/package.json') }}

- name: Install and Build (cache miss) 🔧
- name: Install and Bootstrap (cache miss) 🔧
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install --ignore-scripts
npx lerna bootstrap --no-ci --scope=propagation-validation-server --include-dependencies
- name: Install and Build (cache hit) 🔧
- name: Install and Bootstrap (cache hit) 🔧
if: steps.cache.outputs.cache-hit == 'true'
run: |
npm ci --ignore-scripts
npx lerna bootstrap --scope=propagation-validation-server --include-dependencies
- name: Generate version.ts files
run: lerna run version

- name: Build 🔧
run: npm run compile
working-directory: ./integration-tests/propagation-validation-server
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# version.ts file is automatically generated at compile time

version.ts

# Logs
logs
*.log
Expand Down
28 changes: 28 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"packages/opentelemetry-api-metrics": "0.25.0",
"packages/opentelemetry-context-async-hooks": "0.25.0",
"packages/opentelemetry-context-zone-peer-dep": "0.25.0",
"packages/opentelemetry-context-zone": "0.25.0",
"packages/opentelemetry-core": "0.25.0",
"packages/opentelemetry-exporter-collector-grpc": "0.25.0",
"packages/opentelemetry-exporter-collector-proto": "0.25.0",
"packages/opentelemetry-exporter-collector": "0.25.0",
"packages/opentelemetry-exporter-jaeger": "0.25.0",
"packages/opentelemetry-exporter-prometheus": "0.25.0",
"packages/opentelemetry-exporter-zipkin": "0.25.0",
"packages/opentelemetry-instrumentation-fetch": "0.25.0",
"packages/opentelemetry-instrumentation-grpc": "0.25.0",
"packages/opentelemetry-instrumentation-http": "0.25.0",
"packages/opentelemetry-instrumentation-xml-http-request": "0.25.0",
"packages/opentelemetry-instrumentation": "0.25.0",
"packages/opentelemetry-propagator-b3": "0.25.0",
"packages/opentelemetry-propagator-jaeger": "0.25.0",
"packages/opentelemetry-resources": "0.25.0",
"packages/opentelemetry-sdk-metrics-base": "0.25.0",
"packages/opentelemetry-sdk-node": "0.25.0",
"packages/opentelemetry-sdk-trace-base": "0.25.0",
"packages/opentelemetry-sdk-trace-node": "0.25.0",
"packages/opentelemetry-sdk-trace-web": "0.25.0",
"packages/opentelemetry-semantic-conventions": "0.25.0",
"packages/opentelemetry-shim-opentracing": "0.25.0"
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ To request automatic tracing support for a module not on this list, please [file
- @opentelemetry/web -> @opentelemetry/sdk-trace-web
- @opentelemetry/metrics -> @opentelemetry/sdk-metrics-base
- @opentelemetry/node-sdk -> @opentelemetry/sdk-node
- W3C propagators in @opentelemetry/core were renamed
- `HttpTraceContextPropagator` -> `W3CTraceContextPropagator`
- `W3CBaggagePropagator` -> `W3CBaggagePropagator`

### 0.23.x to 0.24.x

Expand Down
4 changes: 2 additions & 2 deletions benchmark/propagator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const setups = [
}
},
{
name: 'HttpTraceContextPropagator',
propagator: new opentelemetry.HttpTraceContextPropagator(),
name: 'W3CTraceContextPropagator',
propagator: new opentelemetry.W3CTraceContextPropagator(),
injectCarrier: {},
extractCarrier: {
traceparent: '00-d4cda95b652f4a1592b449d5929fda1b-6e0c63257de34c92-00'
Expand Down
5 changes: 4 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ use the latest and greatest features, and best practices.
|[http](http/) | HTTP Instrumentation to automatically collect trace data and export them to the backend of choice | Intermediate |
|[https](https/) | HTTPS Instrumentation to automatically collect trace data and export them to the backend of choice | Intermediate |
|[grpc](grpc/) | gRPC Instrumentation to automatically collect trace data and export them to the backend of choice | Intermediate |
|[express](express/) | Express Instrumentation to automatically collect trace data and export them to the backend of choice | Intermediate |
|[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 |

Additional examples can be found at [@opentelemetry/opentelemetry-js-contrib][opentelemetry-js-contrib-examples]

## Contributing

Please see [CONTRIBUTING.md](https://github.com/open-telemetry/opentelemetry-js/blob/main/CONTRIBUTING.md) for instructions on how to contribute.

## LICENSE

Apache License 2.0

[opentelemetry-js-contrib-examples]: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const axios = require("axios");
const { HttpTraceContextPropagator } = require("@opentelemetry/core");
const { W3CTraceContextPropagator } = require("@opentelemetry/core");
const { BasicTracerProvider } = require("@opentelemetry/sdk-trace-base");
const { context, propagation, trace, ROOT_CONTEXT } = require("@opentelemetry/api");
const {
Expand All @@ -8,7 +8,7 @@ const {
const bodyParser = require("body-parser");

// set global propagator
propagation.setGlobalPropagator(new HttpTraceContextPropagator());
propagation.setGlobalPropagator(new W3CTraceContextPropagator());

// set global context manager
context.setGlobalContextManager(new AsyncHooksContextManager());
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"packages/*",
"integration-tests/*"
],
"version": "0.25.0",
"version": "independent",
"changelog": {
"repo": "open-telemetry/opentelemetry-js",
"labels": {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "opentelemetry",
"version": "0.25.0",
"version": "0.1.0",
"description": "OpenTelemetry is a distributed tracing and stats collection framework.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"scripts": {
"precompile": "lerna run version",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"prewatch": "npm run precompile",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"bench": "node benchmark",
Expand Down
4 changes: 3 additions & 1 deletion packages/opentelemetry-api-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"precompile": "lerna run version --scope $(npm pkg get name) --include-filtered-dependencies",
"prewatch": "npm run precompile"
},
"keywords": [
"opentelemetry",
Expand Down
18 changes: 0 additions & 18 deletions packages/opentelemetry-api-metrics/src/version.ts

This file was deleted.

4 changes: 3 additions & 1 deletion packages/opentelemetry-context-async-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../scripts/version-update.js"
"version": "node ../../scripts/version-update.js",
"precompile": "lerna run version --scope $(npm pkg get name) --include-filtered-dependencies",
"prewatch": "npm run precompile"
},
"keywords": [
"opentelemetry",
Expand Down
18 changes: 0 additions & 18 deletions packages/opentelemetry-context-async-hooks/src/version.ts

This file was deleted.

4 changes: 3 additions & 1 deletion packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"version": "node ../../scripts/version-update.js",
"tdd": "karma start",
"test:browser": "nyc karma start --single-run",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"precompile": "lerna run version --scope $(npm pkg get name) --include-filtered-dependencies",
"prewatch": "npm run precompile"
},
"keywords": [
"opentelemetry",
Expand Down
18 changes: 0 additions & 18 deletions packages/opentelemetry-context-zone-peer-dep/src/version.ts

This file was deleted.

4 changes: 3 additions & 1 deletion packages/opentelemetry-context-zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json"
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"precompile": "lerna run version --scope $(npm pkg get name) --include-filtered-dependencies",
"prewatch": "npm run precompile"
},
"keywords": [
"opentelemetry",
Expand Down
Loading

0 comments on commit c8074c0

Please sign in to comment.