Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into suppress-tracing-tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
dyladan committed May 19, 2021
2 parents c2d6c01 + 24adbd6 commit 527ddf2
Show file tree
Hide file tree
Showing 37 changed files with 27 additions and 42 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
metapackages/*/package-lock.json
packages/*/package-lock.json
integration-tests/*/package-lock.json
key: ${{ runner.os }}-lint-${{ hashFiles('**/package.json') }}
# increment the trailing number to break the cache manually
key: ${{ runner.os }}-lint-${{ hashFiles('**/package.json') }}-0

# On a cache hit, use ci to speed up the install process
- name: Bootstrap (cache hit)
Expand Down
19 changes: 14 additions & 5 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module.exports = {
plugins: [
"@typescript-eslint",
"header"
],
extends: [
"./node_modules/gts",
"header",
"node"
],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
"project": "./tsconfig.json"
},
rules: {
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/no-this-alias": "off",
"brace-style": ["error", "1tbs"],
"eqeqeq": [
"error",
"smart"
Expand All @@ -32,8 +32,14 @@ module.exports = {
"@typescript-eslint/no-shadow": ["warn"],
"@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "^_", "args": "after-used"}],
"@typescript-eslint/no-inferrable-types": ["error", { ignoreProperties: true }],
"@typescript-eslint/no-empty-function": ["off"],
"@typescript-eslint/ban-types": ["warn", {
"types": {
"Function": null,
}
}],
"@typescript-eslint/no-shadow": ["warn"],
"arrow-parens": ["error", "as-needed"],
"prettier/prettier": ["error", { "singleQuote": true, "arrowParens": "avoid" }],
"node/no-deprecated-api": ["warn"],
"header/header": [2, "block", [{
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,
Expand All @@ -53,6 +59,9 @@ module.exports = {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-shadow": ["off"],
"@typescript-eslint/no-floating-promises": ["off"],
"@typescript-eslint/no-non-null-assertion": ["off"],
"@typescript-eslint/explicit-module-boundary-types": ["off"]
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"eslint-config-airbnb-base": "14.2.1",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-node": "^11.1.0",
"gh-pages": "3.1.0",
"gts": "3.1.0",
"husky": "4.3.8",
"lerna": "3.22.1",
"lerna-changelog": "1.0.1",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-api-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"@types/node": "14.14.43",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-context-async-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@types/node": "14.14.43",
"@types/shimmer": "1.0.1",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-context-zone-peer-dep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"@types/zone.js": "0.5.12",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-context-zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "3.1.0",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
"karma-mocha": "2.0.1",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"cpx": "1.5.0",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"cpx": "1.5.0",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-exporter-collector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"cpx": "1.5.0",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-exporter-jaeger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@types/node": "14.14.43",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
Expand Down
10 changes: 6 additions & 4 deletions packages/opentelemetry-exporter-jaeger/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ export interface ExporterConfig {
// Below require is needed as jaeger-client types does not expose the thrift,
// udp_sender, util etc. modules.

export const UDPSender =
require('jaeger-client/dist/src/reporters/udp_sender').default;
/* eslint-disable @typescript-eslint/no-var-requires */
export const UDPSender = require('jaeger-client/dist/src/reporters/udp_sender')
.default;
export const Utils = require('jaeger-client/dist/src/util').default;
export const ThriftUtils = require('jaeger-client/dist/src/thrift').default;

export const HTTPSender =
require('jaeger-client/dist/src/reporters/http_sender').default;
export const HTTPSender = require('jaeger-client/dist/src/reporters/http_sender')
.default;
/* eslint-enable @typescript-eslint/no-var-requires */

export type TagValue = string | number | boolean;

Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-exporter-prometheus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@types/node": "14.14.43",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-exporter-zipkin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-instrumentation-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-instrumentation-grpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"grpc": "1.24.7",
"gts": "3.1.0",
"mocha": "7.2.0",
"node-pre-gyp": "0.17.0",
"nyc": "15.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-instrumentation-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"axios": "0.21.1",
"codecov": "3.8.1",
"got": "9.6.0",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-instrumentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"cpx": "1.5.0",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export abstract class InstrumentationBase<T = any>
return exports;
}

// eslint-disable-next-line @typescript-eslint/no-var-requires
const version = require(path.join(baseDir, 'package.json')).version;
module.moduleVersion = version;
if (module.name === name) {
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@types/node": "14.14.43",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-metrics/src/Meter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { UpDownCounterMetric } from './UpDownCounterMetric';
import { UpDownSumObserverMetric } from './UpDownSumObserverMetric';
import { ValueObserverMetric } from './ValueObserverMetric';
import { ValueRecorderMetric } from './ValueRecorderMetric';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const merge = require('lodash.merge');

/**
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-metrics/src/MeterProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import * as api from '@opentelemetry/api-metrics';
import { Resource } from '@opentelemetry/resources';
import { Meter } from '.';
import { DEFAULT_CONFIG, MeterConfig } from './types';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const merge = require('lodash.merge');

/**
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@types/shimmer": "1.0.1",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-propagator-b3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@types/mocha": "8.2.2",
"@types/node": "14.14.43",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"mocha": "7.2.0",
"nyc": "15.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-propagator-jaeger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-resource-detector-aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@types/node": "14.14.43",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-resource-detector-gcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@types/node": "14.14.43",
"@types/semver": "7.3.5",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@types/node": "14.14.43",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-sdk-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"gcp-metadata": "^4.1.4",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"mocha": "7.2.0",
"nyc": "15.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-semantic-conventions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"@types/node": "14.14.43",
"@types/sinon": "9.0.11",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nock": "12.0.3",
"nyc": "15.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-shim-opentracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"@types/mocha": "8.2.2",
"@types/node": "14.14.43",
"codecov": "3.8.1",
"gts": "3.1.0",
"mocha": "7.2.0",
"nyc": "15.1.0",
"rimraf": "3.0.2",
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-tracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"@types/sinon": "9.0.11",
"@types/webpack-env": "1.16.0",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-tracing/src/BasicTracerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { DEFAULT_CONFIG } from './config';
import { MultiSpanProcessor } from './MultiSpanProcessor';
import { NoopSpanProcessor } from './export/NoopSpanProcessor';
import { SDKRegistrationConfig, TracerConfig } from './types';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const merge = require('lodash.merge');
import { SpanExporter } from './export/SpanExporter';
import { BatchSpanProcessor } from './export/BatchSpanProcessor';
Expand Down
1 change: 0 additions & 1 deletion packages/opentelemetry-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"@types/webpack-env": "1.16.0",
"babel-loader": "8.2.2",
"codecov": "3.8.1",
"gts": "3.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
Expand Down
3 changes: 0 additions & 3 deletions packages/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,5 @@
"karma-spec-reporter": "0.0.32",
"karma-webpack": "4.0.2",
"webpack": "4.44.2"
},
"Add these to devDependencies for linting": {
"gts": "3.1.0"
}
}

0 comments on commit 527ddf2

Please sign in to comment.