Skip to content

Commit

Permalink
Merge pull request open-telemetry#105 from opentelemetrybot/opentelem…
Browse files Browse the repository at this point in the history
…etrybot/merge-main

[AutoMerge][Main] Merging staged change(s) to main
  • Loading branch information
MSNev committed Apr 25, 2023
2 parents 94a0efa + 0c0dd67 commit 7d94d1e
Show file tree
Hide file tree
Showing 52 changed files with 292 additions and 152 deletions.
25 changes: 0 additions & 25 deletions auto-merge/js/experimental/packages/sdk-logs/tsconfig.esm.json

This file was deleted.

25 changes: 0 additions & 25 deletions auto-merge/js/experimental/packages/sdk-logs/tsconfig.esnext.json

This file was deleted.

25 changes: 0 additions & 25 deletions auto-merge/js/experimental/packages/sdk-logs/tsconfig.json

This file was deleted.

50 changes: 47 additions & 3 deletions common/config/rush/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ npm install --save @opentelemetry/sdk-logs
The basic setup of the SDK can be seen as followings:

```js
const logsAPI = require('@opentelemetry/api-logs');
const logsAPI = require('@opentelemetry/sandbox-api-logs');
const {
LoggerProvider,
SimpleLogRecordProcessor,
ConsoleLogRecordExporter,
} = require('@opentelemetry/sdk-logs');
} = require('@opentelemetry/sandbox-sdk-logs');

// To start a logger, you first need to initialize the Logger provider.
const loggerProvider = new LoggerProvider();
Expand Down
File renamed without changes.
22 changes: 22 additions & 0 deletions pkgs/sdk/logs/karma.debug.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*!
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const karmaBaseConfig = require("../../../karma.base");

module.exports = (config) => {
config.set(Object.assign({}, karmaBaseConfig, {
}));
};
42 changes: 42 additions & 0 deletions pkgs/sdk/logs/karma.webpack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*!
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const webpackNodePolyfills = require("../../../webpack.node-polyfills.js");

module.exports = {
mode: "development",
target: "web",
output: { filename: "bundle.js" },
resolve: { extensions: [".ts", ".js"] },
devtool: "inline-source-map",
module: {
rules: [
{ test: /.ts$/, use: "ts-loader" },
{
enforce: "post",
exclude: /(node_modules|.test.[tj]sx?$)/,
test: /.ts$/,
use: {
loader: "istanbul-instrumenter-loader",
options: { esModules: true }
}
},
// This setting configures Node polyfills for the browser that will be
// added to the webpack bundle for Karma tests.
{ parser: { node: webpackNodePolyfills } }
]
}
};
24 changes: 24 additions & 0 deletions pkgs/sdk/logs/karma.worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*!
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const karmaWebpackConfig = require('../../../karma.webpack');
const karmaBaseConfig = require('../../../karma.worker');

module.exports = (config) => {
config.set(Object.assign({}, karmaBaseConfig, {
webpack: karmaWebpackConfig,
}))
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@opentelemetry/sdk-logs",
"name": "@opentelemetry/sandbox-sdk-logs",
"version": "0.38.0",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -29,21 +29,26 @@
"node": ">=14"
},
"scripts": {
"prepublishOnly": "npm run compile",
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"build": "npm run lint:fix-quiet && npm run version && tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json && npm run package",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test:browser": "nyc karma start --single-run",
"tdd": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
"compile": "npm run build",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"lint:fix": "npm run lint -- --fix",
"lint:fix-quiet": "npm run lint -- --fix --quiet",
"package": "npx rollup -c ./rollup.config.js --bundleConfigAsCjs",
"peer-api-check": "node ../../../scripts/peer-api-check.js",
"prepublishOnly": "npm run compile",
"rebuild": "npm run build",
"tdd": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
"test": "npm run test:node && npm run test:browser && npm run test:webworker",
"test:browser": "nyc karma start ./karma.conf.js --single-run",
"test:debug": "nyc karma start ./karma.debug.conf.js --wait",
"test:node": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:webworker": "",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"precompile": "lerna run version --scope $(npm pkg get name) --include-dependencies",
"prewatch": "node ../../../scripts/version-update.js",
"peer-api-check": "node ../../../scripts/peer-api-check.js"
"watch": "npm run version && tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json"
},
"keywords": [
"opentelemetry",
Expand All @@ -68,16 +73,28 @@
],
"sideEffects": false,
"peerDependencies": {
"@opentelemetry/api": ">=1.4.0 <1.5.0",
"@opentelemetry/api-logs": ">=0.38.0"
"@opentelemetry/sandbox-api": "1.4.1",
"@opentelemetry/sandbox-api-logs": "0.38.0"
},
"devDependencies": {
"@types/mocha": "10.0.0",
"@types/node": "18.6.5",
"@types/sinon": "10.0.13",
"@opentelemetry/api": ">=1.4.0 <1.5.0",
"@opentelemetry/api-logs": ">=0.38.0",
"codecov": "3.8.3",
"@opentelemetry/sandbox-api": "1.4.1",
"@opentelemetry/sandbox-api-logs": "0.38.0",
"@types/jquery": "^3.5.14",
"@types/mocha": "^10.0.0",
"@types/node": "^18.14.2",
"@types/sinon": "^10.0.13",
"@types/webpack-env": "1.16.3",
"@typescript-eslint/eslint-plugin": "5.3.1",
"@typescript-eslint/parser": "5.3.1",
"chromium": "^3.0.3",
"codecov": "^3.8.3",
"eslint": "7.32.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "4.2.1",
"istanbul-instrumenter-loader": "3.0.1",
"karma": "6.3.16",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
Expand All @@ -87,13 +104,20 @@
"karma-typescript": "^5.5.3",
"karma-webpack": "^4.0.2",
"mocha": "10.0.0",
"nyc": "15.1.0",
"sinon": "14.0.0",
"nyc": "^15.1.0",
"pako": "^2.0.3",
"puppeteer": "^14.2.1",
"sinon": "^14.0.0",
"ts-loader": "8.4.0",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
"typedoc": "^0.23.26",
"typedoc-plugin-missing-exports": "^1.0.0",
"typedoc-plugin-resolve-crossmodule-references": "^0.3.3",
"typescript": "^4.7.4",
"webpack": "^4.46.0"
},
"dependencies": {
"@opentelemetry/core": "^1.11.0",
"@opentelemetry/resources": "^1.11.0"
"@opentelemetry/sandbox-core": "1.12.0",
"@opentelemetry/sandbox-resources": "1.12.0"
}
}
}
21 changes: 21 additions & 0 deletions pkgs/sdk/logs/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*!
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { createConfig } from "../../../rollup.base.config";
const version = require("./package.json").version;
const inputName = "build/esm/index.js";

export default createConfig("opentelemetry.sandbox.sdk-logs", inputName, "otel-sndbx.sdk-logs", version);
Loading

0 comments on commit 7d94d1e

Please sign in to comment.