Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan authored Sep 28, 2022
2 parents f0dc26d + 1c450f5 commit 369af85
Show file tree
Hide file tree
Showing 123 changed files with 3,966 additions and 637 deletions.
4 changes: 0 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ Before creating a pull request, please make sure:
## Short description of the changes

-

## Checklist

- [ ] Ran `npm run test-all-versions` for the edited package(s) on the latest commit if applicable.
4 changes: 4 additions & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ components:
- willarmiros
plugins/node/instrumentation-amqplib:
- blumamir
plugins/node/instrumentation-dataloader:
- henrinormak
plugins/node/instrumentation-fs:
- rauno56
plugins/node/instrumentation-tedious:
Expand All @@ -44,6 +46,8 @@ components:
- rauno56
plugins/node/opentelemetry-instrumentation-mongodb:
- osherv
plugins/node/opentelemetry-instrumentation-mongoose:
- blumamir
plugins/node/opentelemetry-instrumentation-nestjs-core:
- rauno56
plugins/node/opentelemetry-instrumentation-redis:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@v6
with:
days-before-stale: 60
days-before-close: 14
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/test-all-versions.pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: TAV for PR
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled

jobs:
parse-labels:
runs-on: ubuntu-latest
container:
image: node:16
env:
PR_LABELS: ${{ toJSON(github.event.pull_request.labels.*.name) }}
outputs:
args: ${{ steps.lerna-args.outputs.args }}
steps:
- name: Checkout
uses: actions/checkout@v3
# Need lerna to list all packages
- name: Install lerna
run: npm install -g lerna
- name: Parse labels into lerna scope arguments
id: lerna-args
run: |
OUTPUT=`node scripts/parse-lerna-scopes.mjs "$PR_LABELS"`
echo "::set-output name=args::$OUTPUT"
tav:
uses: ./.github/workflows/test-all-versions.yml
needs: parse-labels
with:
lerna-args: ${{ needs.parse-labels.outputs.args }}
if: ${{ needs.parse-labels.outputs.args != '' }}
13 changes: 13 additions & 0 deletions .github/workflows/test-all-versions.push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: TAV for Push
on:
push:
branches:
- "main"
- "release/**"
- "release-please/**"

jobs:
tav:
uses: ./.github/workflows/test-all-versions.yml
with:
lerna-args: ""
58 changes: 27 additions & 31 deletions .github/workflows/test-all-versions.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Test All Versions
on:
push:
branches:
- "main"
- "release/**"
- "release-please/**"
schedule:
- cron: "30 4 * * *"
workflow_dispatch:
inputs:
lerna-args:
type: string
workflow_call:
inputs:
lerna-args:
required: true
type: string

jobs:
tav:
Expand All @@ -16,12 +19,14 @@ jobs:
fail-fast: false
matrix:
node: ["14", "16", "18"]
include:
- node: "18"
lerna-extra-args: >-
--ignore @opentelemetry/instrumentation-fastify
--ignore @opentelemetry/instrumentation-restify
--ignore @opentelemetry/resource-detector-alibaba-cloud
runs-on: ubuntu-latest
services:
memcached:
image: memcached:1.6.9-alpine
ports:
- 11211:11211
mongo:
image: mongo
ports:
Expand Down Expand Up @@ -65,6 +70,13 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
rabbitmq:
image: rabbitmq:3
ports:
- 22221:5672
env:
RABBITMQ_DEFAULT_USER: username
RABBITMQ_DEFAULT_PASS: password
redis:
image: redis
ports:
Expand All @@ -74,26 +86,7 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
cassandra:
image: bitnami/cassandra:3
ports:
- 9042:9042
rabbitmq:
image: rabbitmq:3
ports:
- 22221:5672
env:
RABBITMQ_DEFAULT_USER: username
RABBITMQ_DEFAULT_PASS: password
env:
RUN_CASSANDRA_TESTS: 1
RUN_MEMCACHED_TESTS: 1
RUN_MONGODB_TESTS: 1
RUN_MYSQL_TESTS: 1
RUN_MSSQL_TESTS: 1
RUN_POSTGRES_TESTS: 1
RUN_REDIS_TESTS: 1
CASSANDRA_HOST: localhost
MONGODB_DB: opentelemetry-tests
MONGODB_HOST: 127.0.0.1
MONGODB_PORT: 27017
Expand All @@ -103,14 +96,17 @@ jobs:
MYSQL_PASSWORD: secret
MYSQL_PORT: 3306
MYSQL_USER: otel
OPENTELEMETRY_MEMCACHED_HOST: localhost
OPENTELEMETRY_MEMCACHED_PORT: 11211
OPENTELEMETRY_REDIS_HOST: localhost
OPENTELEMETRY_REDIS_PORT: 6379
POSTGRES_DB: circle_database
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
RUN_MONGODB_TESTS: 1
RUN_MSSQL_TESTS: 1
RUN_MYSQL_TESTS: 1
RUN_POSTGRES_TESTS: 1
RUN_REDIS_TESTS: 1
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
Expand Down Expand Up @@ -147,4 +143,4 @@ jobs:
- name: Bootstrap Dependencies
run: lerna bootstrap --no-ci --hoist --nohoist='zone.js' --nohoist='mocha' --nohoist='ts-mocha'
- name: Run test-all-versions
run: lerna run test-all-versions ${{ matrix.lerna-extra-args }} --stream --concurrency 1
run: lerna run test-all-versions ${{ inputs.lerna-args }} ${{ matrix.lerna-extra-args }} --stream --concurrency 1
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
matrix:
node: ["14", "16", "18"]
include:
# tests fail on node@18, incompatibility with nock?
- node: "18"
lerna-extra-args: >-
--ignore @opentelemetry/resource-detector-alibaba-cloud
--ignore @opentelemetry/instrumentation-fastify
--ignore @opentelemetry/instrumentation-restify
runs-on: ubuntu-latest
services:
memcached:
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.27.2","detectors/node/opentelemetry-resource-detector-aws":"1.1.2","detectors/node/opentelemetry-resource-detector-gcp":"0.27.2","detectors/node/opentelemetry-resource-detector-github":"0.27.0","metapackages/auto-instrumentations-node":"0.32.1","metapackages/auto-instrumentations-web":"0.30.0","packages/opentelemetry-host-metrics":"0.30.0","packages/opentelemetry-id-generator-aws-xray":"1.1.0","packages/opentelemetry-test-utils":"0.32.0","plugins/node/instrumentation-amqplib":"0.31.0","plugins/node/instrumentation-fs":"0.5.0","plugins/node/instrumentation-tedious":"0.4.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.33.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.9.1","plugins/node/opentelemetry-instrumentation-bunyan":"0.30.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.30.0","plugins/node/opentelemetry-instrumentation-connect":"0.30.0","plugins/node/opentelemetry-instrumentation-dns":"0.30.0","plugins/node/opentelemetry-instrumentation-express":"0.31.1","plugins/node/opentelemetry-instrumentation-generic-pool":"0.30.0","plugins/node/opentelemetry-instrumentation-graphql":"0.31.0","plugins/node/opentelemetry-instrumentation-hapi":"0.30.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.32.1","plugins/node/opentelemetry-instrumentation-knex":"0.30.0","plugins/node/opentelemetry-instrumentation-koa":"0.32.0","plugins/node/instrumentation-lru-memoizer":"0.31.0","plugins/node/opentelemetry-instrumentation-memcached":"0.30.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.32.0","plugins/node/opentelemetry-instrumentation-mysql":"0.31.1","plugins/node/opentelemetry-instrumentation-mysql2":"0.32.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.31.0","plugins/node/opentelemetry-instrumentation-net":"0.30.1","plugins/node/opentelemetry-instrumentation-pg":"0.31.1","plugins/node/opentelemetry-instrumentation-pino":"0.32.0","plugins/node/opentelemetry-instrumentation-redis":"0.33.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.33.0","plugins/node/opentelemetry-instrumentation-restify":"0.30.0","plugins/node/opentelemetry-instrumentation-router":"0.30.0","plugins/node/opentelemetry-instrumentation-winston":"0.30.0","plugins/web/opentelemetry-instrumentation-document-load":"0.30.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.31.0","plugins/web/opentelemetry-plugin-react-load":"0.28.0","propagators/opentelemetry-propagator-aws-xray":"1.1.0","propagators/opentelemetry-propagator-grpc-census-binary":"0.26.0","propagators/opentelemetry-propagator-instana":"0.2.0","propagators/opentelemetry-propagator-ot-trace":"0.26.1","plugins/node/opentelemetry-instrumentation-fastify":"0.29.0","packages/opentelemetry-propagation-utils":"0.28.0","plugins/web/opentelemetry-instrumentation-long-task":"0.31.0","detectors/node/opentelemetry-resource-detector-docker":"0.1.2","detectors/node/opentelemetry-resource-detector-instana":"0.3.0"}
{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.27.2","detectors/node/opentelemetry-resource-detector-aws":"1.1.2","detectors/node/opentelemetry-resource-detector-docker":"0.1.2","detectors/node/opentelemetry-resource-detector-gcp":"0.27.2","detectors/node/opentelemetry-resource-detector-github":"0.27.0","detectors/node/opentelemetry-resource-detector-instana":"0.3.0","metapackages/auto-instrumentations-node":"0.33.0","metapackages/auto-instrumentations-web":"0.30.0","packages/opentelemetry-host-metrics":"0.30.1","packages/opentelemetry-id-generator-aws-xray":"1.1.0","packages/opentelemetry-propagation-utils":"0.29.0","packages/opentelemetry-test-utils":"0.32.0","plugins/node/instrumentation-amqplib":"0.31.0","plugins/node/instrumentation-dataloader":"0.2.0","plugins/node/instrumentation-fs":"0.5.0","plugins/node/instrumentation-lru-memoizer":"0.31.0","plugins/node/instrumentation-mongoose":"0.31.0","plugins/node/instrumentation-tedious":"0.4.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.33.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.9.2","plugins/node/opentelemetry-instrumentation-bunyan":"0.30.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.30.0","plugins/node/opentelemetry-instrumentation-connect":"0.30.0","plugins/node/opentelemetry-instrumentation-dns":"0.30.0","plugins/node/opentelemetry-instrumentation-express":"0.31.1","plugins/node/opentelemetry-instrumentation-fastify":"0.30.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.30.0","plugins/node/opentelemetry-instrumentation-graphql":"0.31.0","plugins/node/opentelemetry-instrumentation-hapi":"0.30.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.32.1","plugins/node/opentelemetry-instrumentation-knex":"0.30.0","plugins/node/opentelemetry-instrumentation-koa":"0.32.0","plugins/node/opentelemetry-instrumentation-memcached":"0.30.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.32.1","plugins/node/opentelemetry-instrumentation-mysql":"0.31.1","plugins/node/opentelemetry-instrumentation-mysql2":"0.32.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.31.0","plugins/node/opentelemetry-instrumentation-net":"0.30.1","plugins/node/opentelemetry-instrumentation-pg":"0.31.1","plugins/node/opentelemetry-instrumentation-pino":"0.32.0","plugins/node/opentelemetry-instrumentation-redis":"0.33.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.33.0","plugins/node/opentelemetry-instrumentation-restify":"0.30.0","plugins/node/opentelemetry-instrumentation-router":"0.30.0","plugins/node/opentelemetry-instrumentation-winston":"0.30.0","plugins/web/opentelemetry-instrumentation-document-load":"0.30.0","plugins/web/opentelemetry-instrumentation-long-task":"0.31.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.31.0","plugins/web/opentelemetry-plugin-react-load":"0.28.0","propagators/opentelemetry-propagator-aws-xray":"1.1.0","propagators/opentelemetry-propagator-grpc-census-binary":"0.26.0","propagators/opentelemetry-propagator-instana":"0.2.0","propagators/opentelemetry-propagator-ot-trace":"0.26.1"}
6 changes: 4 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
plugins: [
"@typescript-eslint",
"header"
"header",
"import"
],
extends: [
"./node_modules/gts",
Expand Down Expand Up @@ -32,7 +33,8 @@ module.exports = {
pattern: / \* Copyright The OpenTelemetry Authors[\r\n]+ \*[\r\n]+ \* Licensed under the Apache License, Version 2\.0 \(the \"License\"\);[\r\n]+ \* you may not use this file except in compliance with the License\.[\r\n]+ \* You may obtain a copy of the License at[\r\n]+ \*[\r\n]+ \* https:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0[\r\n]+ \*[\r\n]+ \* Unless required by applicable law or agreed to in writing, software[\r\n]+ \* distributed under the License is distributed on an \"AS IS\" BASIS,[\r\n]+ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[\r\n]+ \* See the License for the specific language governing permissions and[\r\n]+ \* limitations under the License\./gm,
template:
`\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n `
}]]
}]],
"import/no-extraneous-dependencies": ["error", { devDependencies: ["test/**/*.ts"] }],
},
overrides: [
{
Expand Down
1 change: 0 additions & 1 deletion examples/fastify/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ async function subsystem(fastify) {
done();
}, 2000);
});

}

app.post('/run_test/:id', async (req, res) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/graphql/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { OTLPTraceExporter } = require('@opentelemetry/exporter-otlp-http');
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
const { ExpressInstrumentation } = require('@opentelemetry/instrumentation-express');
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');

const provider = new NodeTracerProvider({
resource: new Resource({
Expand Down
6 changes: 4 additions & 2 deletions examples/grpc-census-prop/capitalize_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ const { Fetch } = grpc.load(PROTO_PATH).rpc;
* Creates a gRPC client, makes a gRPC call and waits before shutting down
*/
function main() {
const client = new Fetch('localhost:50051',
grpc.credentials.createInsecure());
const client = new Fetch(
'localhost:50051',
grpc.credentials.createInsecure(),
);
const data = process.argv[2] || 'opentelemetry';
console.log('> ', data);

Expand Down
6 changes: 4 additions & 2 deletions examples/grpc_dynamic_codegen/capitalize_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ const definition = protoLoader.loadSync(PROTO_PATH, PROTO_OPTIONS);
const rpcProto = grpc.loadPackageDefinition(definition).rpc;

function main() {
const client = new rpcProto.Fetch('localhost:50051',
grpc.credentials.createInsecure());
const client = new rpcProto.Fetch(
'localhost:50051',
grpc.credentials.createInsecure(),
);
const data = process.argv[2] || 'opentelemetry';
console.log('> ', data);

Expand Down
45 changes: 0 additions & 45 deletions examples/mongodb/package.json

This file was deleted.

36 changes: 0 additions & 36 deletions examples/mongodb/tracer.js

This file was deleted.

Loading

0 comments on commit 369af85

Please sign in to comment.