Skip to content

Commit

Permalink
Merge branch 'master' into concurrent-export-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
obecny authored Dec 10, 2020
2 parents ed67c82 + 1a24f40 commit 2eda370
Show file tree
Hide file tree
Showing 53 changed files with 5,083 additions and 221 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
1 change: 0 additions & 1 deletion packages/opentelemetry-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export * from './metrics/Observation';
export * from './metrics/ObserverResult';
export * from './trace/attributes';
export * from './trace/Event';
export * from './trace/instrumentation/Plugin';
export * from './trace/link_context';
export * from './trace/link';
export * from './trace/NoopLogger';
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export * from './correlation-context/correlation-context';
export * from './correlation-context/propagation/HttpCorrelationContext';
export * from './platform';
export * from './trace/NoRecordingSpan';
export * from './trace/Plugin';
export * from './trace/sampler/AlwaysOffSampler';
export * from './trace/sampler/AlwaysOnSampler';
export * from './trace/sampler/ParentBasedSampler';
Expand Down
10 changes: 2 additions & 8 deletions packages/opentelemetry-core/src/platform/BaseAbstractPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@
* limitations under the License.
*/

import {
Tracer,
Plugin,
Logger,
PluginConfig,
TracerProvider,
PluginInternalFiles,
} from '@opentelemetry/api';
import { Tracer, Logger, TracerProvider } from '@opentelemetry/api';
import { Plugin, PluginConfig, PluginInternalFiles } from '../trace/Plugin';

/** This class represent the base to patch plugin. */
export abstract class BaseAbstractPlugin<T> implements Plugin<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@
* limitations under the License.
*/

import {
Logger,
Plugin,
PluginConfig,
TracerProvider,
} from '@opentelemetry/api';
import { Logger, TracerProvider } from '@opentelemetry/api';
import { Plugin, PluginConfig } from '../../trace/Plugin';
import { BaseAbstractPlugin } from '../BaseAbstractPlugin';

/** This class represent the base to patch plugin. */
Expand Down
5 changes: 2 additions & 3 deletions packages/opentelemetry-core/src/platform/node/BasePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
* limitations under the License.
*/

import { Logger, TracerProvider } from '@opentelemetry/api';
import {
Plugin,
Logger,
PluginConfig,
PluginInternalFiles,
PluginInternalFilesVersion,
TracerProvider,
} from '@opentelemetry/api';
} from '../../trace/Plugin';
import * as semver from 'semver';
import * as path from 'path';
import { BaseAbstractPlugin } from '../BaseAbstractPlugin';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* limitations under the License.
*/

import { Logger } from '../../common/Logger';
import { TracerProvider } from '../tracer_provider';
import { Logger, TracerProvider } from '@opentelemetry/api';

/** Interface Plugin to apply patch. */
export interface Plugin<T = any> {
Expand Down
8 changes: 6 additions & 2 deletions packages/opentelemetry-grpc-utils/test/grpcUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ import {
NoopTracerProvider,
SpanKind,
propagation,
PluginConfig,
} from '@opentelemetry/api';
import { NoopLogger, HttpTraceContext, BasePlugin } from '@opentelemetry/core';
import {
NoopLogger,
HttpTraceContext,
BasePlugin,
PluginConfig,
} from '@opentelemetry/core';
import { NodeTracerProvider } from '@opentelemetry/node';
import { AsyncHooksContextManager } from '@opentelemetry/context-async-hooks';
import { ContextManager } from '@opentelemetry/context-base';
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-instrumentation-http/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
7 changes: 7 additions & 0 deletions packages/opentelemetry-instrumentation-http/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"env": {
"mocha": true,
"node": true
},
...require('../../eslint.config.js')
}
4 changes: 4 additions & 0 deletions packages/opentelemetry-instrumentation-http/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/bin
/coverage
/doc
/test
Loading

0 comments on commit 2eda370

Please sign in to comment.