From b197a83af4ef993ae4753de89c749d1d268c182c Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 16 Apr 2021 04:39:42 +0900 Subject: [PATCH 01/84] feat: add xray propagator (#421) * feat: add xray propagator * chore: cleanups * Remove AWS Distro link Co-authored-by: Valentin Marchaud --- .eslintignore | 1 + .eslintrc.js | 9 ++ LICENSE | 201 +++++++++++++++++++++++ README.md | 76 +++++++++ karma.conf.js | 24 +++ package.json | 69 ++++++++ src/AWSXRayPropagator.ts | 192 ++++++++++++++++++++++ src/index.ts | 17 ++ src/version.ts | 18 +++ test/AWSXRayPropagator.test.ts | 282 +++++++++++++++++++++++++++++++++ test/index-webpack.ts | 20 +++ tsconfig.json | 11 ++ 12 files changed, 920 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc.js create mode 100644 LICENSE create mode 100644 README.md create mode 100644 karma.conf.js create mode 100644 package.json create mode 100644 src/AWSXRayPropagator.ts create mode 100644 src/index.ts create mode 100644 src/version.ts create mode 100644 test/AWSXRayPropagator.test.ts create mode 100644 test/index-webpack.ts create mode 100644 tsconfig.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000000..378eac25d31 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +build diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000000..01b8d097408 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,9 @@ +module.exports = { + "env": { + "mocha": true, + "commonjs": true, + "browser": true, + "jquery": true + }, + ...require('../../eslint.config.js') +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000000..261eeb9e9f8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/README.md b/README.md new file mode 100644 index 00000000000..a6d0ae54ba7 --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +# OpenTelemetry Propagator AWS X-Ray + +[![NPM Published Version][npm-img]][npm-url] +[![dependencies][dependencies-image]][dependencies-url] +[![devDependencies][devDependencies-image]][devDependencies-url] +[![Apache License][license-image]][license-image] + +The OpenTelemetry Propagator for AWS X-Ray provides HTTP header propagation for systems that are using AWS `X-Amzn-Trace-Id` format. +This propagator translates the OpenTelemetry SpanContext into the equivalent AWS header format, for use with the OpenTelemetry JS SDK. +`TraceState` is currently not propagated. + +### Installation + +``` +npm install --save @opentelemetry/propagator-aws-xray +``` + +### Usage + +In the [global tracer configuration file](https://github.com/open-telemetry/opentelemetry-js/blob/master/getting-started/README.md#initialize-a-global-tracer), configure the following: + +```js +const { propagation } = require("@opentelemetry/api"); +const { AWSXRayPropagator } = require('@opentelemetry/propagator-aws-xray'); +// ... + +module.exports = ("service_name_here") => { + // set global propagator + propagation.setGlobalPropagator(new AWSXRayPropagator()); + // ...} +``` + +### Propagator Details + +Example header:`X-Amzn-Trace-Id: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1` + +The header consists of three parts: the root trace ID, the parent ID and the sampling decision. + +#### Root - The AWS X-Ray format trace ID + +* Format: (spec-version)-(timestamp)-(UUID) + * spec_version - The version of the AWS X-Ray header format. Currently, only "1" is valid. + * timestamp - 32-bit number in base16 format, corresponds to the first 8 characters of the OpenTelemetry trace ID. Note, while X-Ray calls this timestamp, for the purpose of propagation it is opaque and any value will work. + * UUID - 96-bit random number in base16 format, corresponds to the last 10 characters of the OpenTelemetry trace ID. + +Root is analogous to the [OpenTelemetry Trace ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext), with some small format changes. +For additional reading, see the [AWS X-Ray Trace ID](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-sendingdata.html#xray-api-traceids) public documentation. + +#### Parent - The ID of the AWS X-Ray Segment + +* 64-bit random number in base16 format. Populated from the [OpenTelemetry Span ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). + +#### Sampled - The sampling decision* + +* Defined in the AWS X-Ray specification as a tri-state field, with "0", "1" and "?" as valid values. Only "0" and "1" are used in this propagator. If "?", a new trace will be started. +* Populated from the [OpenTelemetry trace flags](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). + +## Useful links + +- For more information on OpenTelemetry, visit: +- For more about OpenTelemetry JavaScript: +- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] + +### License + +Apache 2.0 - See [LICENSE][license-url] for more information. + +[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions +[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE +[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat +[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-contrib.svg?path=propagators%2Fopentelemetry-propagator-aws-xray +[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=propagators%2Fopentelemetry-propagator-aws-xray +[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-contrib.svg?path=propagators%2Fopentelemetry-propagator-aws-xray&type=dev +[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=propagators%2Fopentelemetry-propagator-aws-xray&type=dev +[npm-url]: https://www.npmjs.com/package/@opentelemetry/propagator-aws-xray +[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fpropagator-aws-xray.svg diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 00000000000..edcd9f055fd --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,24 @@ +/*! + * Copyright 2020, 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.base'); + +module.exports = (config) => { + config.set(Object.assign({}, karmaBaseConfig, { + webpack: karmaWebpackConfig + })) +}; diff --git a/package.json b/package.json new file mode 100644 index 00000000000..732ea153ce9 --- /dev/null +++ b/package.json @@ -0,0 +1,69 @@ +{ + "name": "@opentelemetry/propagator-aws-xray", + "version": "0.15.0", + "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", + "main": "build/src/index.js", + "types": "build/src/index.d.ts", + "repository": "open-telemetry/opentelemetry-js-contrib", + "scripts": { + "precompile": "tsc --version", + "compile": "tsc --build", + "clean": "tsc --build --clean", + "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", + "test:browser": "nyc karma start --single-run", + "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", + "watch": "tsc --build --watch", + "prepare": "npm run compile" + }, + "keywords": [ + "opentelemetry", + "nodejs", + "tracing", + "profiling", + "awsxray" + ], + "author": "OpenTelemetry Authors", + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + }, + "files": [ + "build/src/**/*.js", + "build/src/**/*.js.map", + "build/src/**/*.d.ts", + "doc", + "LICENSE", + "README.md" + ], + "publishConfig": { + "access": "public" + }, + "devDependencies": { + "@types/mocha": "8.2.0", + "@types/node": "14.14.12", + "@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", + "karma-coverage-istanbul-reporter": "3.0.3", + "karma-mocha": "2.0.1", + "karma-spec-reporter": "0.0.32", + "karma-webpack": "5.0.0", + "mocha": "7.2.0", + "nyc": "15.1.0", + "rimraf": "3.0.2", + "ts-loader": "8.0.12", + "ts-mocha": "8.0.0", + "typescript": "4.1.3", + "webpack": "4.46.0" + }, + "dependencies": { + "@opentelemetry/api": "^0.18.0", + "@opentelemetry/core": "^0.18.0" + } +} diff --git a/src/AWSXRayPropagator.ts b/src/AWSXRayPropagator.ts new file mode 100644 index 00000000000..596d8d9c2c6 --- /dev/null +++ b/src/AWSXRayPropagator.ts @@ -0,0 +1,192 @@ +/* + * 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 + * + * https://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 { + Context, + TextMapPropagator, + SpanContext, + TraceFlags, + TextMapSetter, + TextMapGetter, + isSpanContextValid, + isValidSpanId, + isValidTraceId, + INVALID_TRACEID, + INVALID_SPANID, + getSpanContext, + setSpanContext, + INVALID_SPAN_CONTEXT, +} from '@opentelemetry/api'; + +export const AWSXRAY_TRACE_ID_HEADER = 'x-amzn-trace-id'; + +const TRACE_HEADER_DELIMITER = ';'; +const KV_DELIMITER = '='; + +const TRACE_ID_KEY = 'Root'; +const TRACE_ID_LENGTH = 35; +const TRACE_ID_VERSION = '1'; +const TRACE_ID_DELIMITER = '-'; +const TRACE_ID_DELIMITER_INDEX_1 = 1; +const TRACE_ID_DELIMITER_INDEX_2 = 10; +const TRACE_ID_FIRST_PART_LENGTH = 8; + +const PARENT_ID_KEY = 'Parent'; + +const SAMPLED_FLAG_KEY = 'Sampled'; +const IS_SAMPLED = '1'; +const NOT_SAMPLED = '0'; + +/** + * Implementation of the AWS X-Ray Trace Header propagation protocol. See AWS + * Tracing header spec + * + * An example AWS Xray Tracing Header is shown below: + * X-Amzn-Trace-Id: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1 + */ +export class AWSXRayPropagator implements TextMapPropagator { + inject(context: Context, carrier: unknown, setter: TextMapSetter) { + const spanContext = getSpanContext(context); + if (!spanContext || !isSpanContextValid(spanContext)) return; + + const otTraceId = spanContext.traceId; + const timestamp = otTraceId.substring(0, TRACE_ID_FIRST_PART_LENGTH); + const randomNumber = otTraceId.substring(TRACE_ID_FIRST_PART_LENGTH); + + const parentId = spanContext.spanId; + const samplingFlag = + (TraceFlags.SAMPLED & spanContext.traceFlags) === TraceFlags.SAMPLED + ? IS_SAMPLED + : NOT_SAMPLED; + // TODO: Add OT trace state to the X-Ray trace header + + const traceHeader = `Root=1-${timestamp}-${randomNumber};Parent=${parentId};Sampled=${samplingFlag}`; + setter.set(carrier, AWSXRAY_TRACE_ID_HEADER, traceHeader); + } + + extract(context: Context, carrier: unknown, getter: TextMapGetter): Context { + const spanContext = this.getSpanContextFromHeader(carrier, getter); + if (!isSpanContextValid(spanContext)) return context; + + return setSpanContext(context, spanContext); + } + + fields(): string[] { + return [AWSXRAY_TRACE_ID_HEADER]; + } + + private getSpanContextFromHeader( + carrier: unknown, + getter: TextMapGetter + ): SpanContext { + const traceHeader = getter.get(carrier, AWSXRAY_TRACE_ID_HEADER); + if (!traceHeader || typeof traceHeader !== 'string') + return INVALID_SPAN_CONTEXT; + + let pos = 0; + let trimmedPart: string; + let parsedTraceId = INVALID_TRACEID; + let parsedSpanId = INVALID_SPANID; + let parsedTraceFlags = null; + while (pos < traceHeader.length) { + const delimiterIndex = traceHeader.indexOf(TRACE_HEADER_DELIMITER, pos); + if (delimiterIndex >= 0) { + trimmedPart = traceHeader.substring(pos, delimiterIndex).trim(); + pos = delimiterIndex + 1; + } else { + //last part + trimmedPart = traceHeader.substring(pos).trim(); + pos = traceHeader.length; + } + const equalsIndex = trimmedPart.indexOf(KV_DELIMITER); + + const value = trimmedPart.substring(equalsIndex + 1); + + if (trimmedPart.startsWith(TRACE_ID_KEY)) { + parsedTraceId = AWSXRayPropagator._parseTraceId(value); + } else if (trimmedPart.startsWith(PARENT_ID_KEY)) { + parsedSpanId = AWSXRayPropagator._parseSpanId(value); + } else if (trimmedPart.startsWith(SAMPLED_FLAG_KEY)) { + parsedTraceFlags = AWSXRayPropagator._parseTraceFlag(value); + } + } + if (parsedTraceFlags === null) { + return INVALID_SPAN_CONTEXT; + } + const resultSpanContext: SpanContext = { + traceId: parsedTraceId, + spanId: parsedSpanId, + traceFlags: parsedTraceFlags, + isRemote: true, + }; + if (!isSpanContextValid(resultSpanContext)) { + return INVALID_SPAN_CONTEXT; + } + return resultSpanContext; + } + + private static _parseTraceId(xrayTraceId: string): string { + // Check length of trace id + if (xrayTraceId.length !== TRACE_ID_LENGTH) { + return INVALID_TRACEID; + } + + // Check version trace id version + if (!xrayTraceId.startsWith(TRACE_ID_VERSION)) { + return INVALID_TRACEID; + } + + // Check delimiters + if ( + xrayTraceId.charAt(TRACE_ID_DELIMITER_INDEX_1) !== TRACE_ID_DELIMITER || + xrayTraceId.charAt(TRACE_ID_DELIMITER_INDEX_2) !== TRACE_ID_DELIMITER + ) { + return INVALID_TRACEID; + } + + const epochPart = xrayTraceId.substring( + TRACE_ID_DELIMITER_INDEX_1 + 1, + TRACE_ID_DELIMITER_INDEX_2 + ); + const uniquePart = xrayTraceId.substring( + TRACE_ID_DELIMITER_INDEX_2 + 1, + TRACE_ID_LENGTH + ); + const resTraceId = epochPart + uniquePart; + + // Check the content of trace id + if (!isValidTraceId(resTraceId)) { + return INVALID_TRACEID; + } + + return resTraceId; + } + + private static _parseSpanId(xrayParentId: string): string { + return isValidSpanId(xrayParentId) ? xrayParentId : INVALID_SPANID; + } + + private static _parseTraceFlag(xraySampledFlag: string): TraceFlags | null { + if (xraySampledFlag === NOT_SAMPLED) { + return TraceFlags.NONE; + } + if (xraySampledFlag === IS_SAMPLED) { + return TraceFlags.SAMPLED; + } + return null; + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000000..dea84766834 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,17 @@ +/* + * 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 + * + * https://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. + */ + +export * from './AWSXRayPropagator'; diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 00000000000..1e4172026f1 --- /dev/null +++ b/src/version.ts @@ -0,0 +1,18 @@ +/* + * 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 + * + * https://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. + */ + +// this is autogenerated file, see scripts/version-update.js +export const VERSION = '0.15.0'; diff --git a/test/AWSXRayPropagator.test.ts b/test/AWSXRayPropagator.test.ts new file mode 100644 index 00000000000..b7ca77a9036 --- /dev/null +++ b/test/AWSXRayPropagator.test.ts @@ -0,0 +1,282 @@ +/* + * 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 + * + * https://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 * as assert from 'assert'; + +import { + defaultTextMapGetter, + defaultTextMapSetter, + getSpan, + INVALID_SPAN_CONTEXT, + ROOT_CONTEXT, + setSpanContext, + SpanContext, + TraceFlags, +} from '@opentelemetry/api'; +import { TraceState } from '@opentelemetry/core'; + +import { AWSXRAY_TRACE_ID_HEADER, AWSXRayPropagator } from '../src'; + +describe('AWSXRayPropagator', () => { + const xrayPropagator = new AWSXRayPropagator(); + const TRACE_ID = '8a3c60f7d188f8fa79d48a391a778fa6'; + const SPAN_ID = '53995c3f42cd8ad8'; + const SAMPLED_TRACE_FLAG = TraceFlags.SAMPLED; + const NOT_SAMPLED_TRACE_FLAG = TraceFlags.NONE; + + let carrier: { [key: string]: unknown }; + + beforeEach(() => { + carrier = {}; + }); + + describe('.inject()', () => { + it('should inject sampled context', () => { + const spanContext: SpanContext = { + traceId: TRACE_ID, + spanId: SPAN_ID, + traceFlags: SAMPLED_TRACE_FLAG, + }; + xrayPropagator.inject( + setSpanContext(ROOT_CONTEXT, spanContext), + carrier, + defaultTextMapSetter + ); + + assert.deepStrictEqual( + carrier[AWSXRAY_TRACE_ID_HEADER], + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1' + ); + }); + + it('should inject not sampled context', () => { + const spanContext: SpanContext = { + traceId: TRACE_ID, + spanId: SPAN_ID, + traceFlags: NOT_SAMPLED_TRACE_FLAG, + }; + xrayPropagator.inject( + setSpanContext(ROOT_CONTEXT, spanContext), + carrier, + defaultTextMapSetter + ); + + assert.deepStrictEqual( + carrier[AWSXRAY_TRACE_ID_HEADER], + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=0' + ); + }); + + it('should inject with TraceState', () => { + const traceState = new TraceState(); + traceState.set('foo', 'bar'); + const spanContext: SpanContext = { + traceId: TRACE_ID, + spanId: SPAN_ID, + traceFlags: SAMPLED_TRACE_FLAG, + traceState: traceState, + }; + xrayPropagator.inject( + setSpanContext(ROOT_CONTEXT, spanContext), + carrier, + defaultTextMapSetter + ); + + // TODO: assert trace state when the propagator supports it + assert.deepStrictEqual( + carrier[AWSXRAY_TRACE_ID_HEADER], + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1' + ); + }); + + it('inject without spanContext - should inject nothing', () => { + xrayPropagator.inject(ROOT_CONTEXT, carrier, defaultTextMapSetter); + + assert.deepStrictEqual(carrier, {}); + }); + + it('inject default invalid spanContext - should inject nothing', () => { + xrayPropagator.inject( + setSpanContext(ROOT_CONTEXT, INVALID_SPAN_CONTEXT), + carrier, + defaultTextMapSetter + ); + + assert.deepStrictEqual(carrier, {}); + }); + }); + + describe('.extract()', () => { + it('extract nothing from context', () => { + // context remains untouched + assert.strictEqual( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter), + ROOT_CONTEXT + ); + }); + + it('should extract sampled context', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, { + traceId: TRACE_ID, + spanId: SPAN_ID, + isRemote: true, + traceFlags: TraceFlags.SAMPLED, + }); + }); + + it('should extract sampled context with arbitrary order', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Parent=53995c3f42cd8ad8;Sampled=1;Root=1-8a3c60f7-d188f8fa79d48a391a778fa6'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, { + traceId: TRACE_ID, + spanId: SPAN_ID, + isRemote: true, + traceFlags: TraceFlags.SAMPLED, + }); + }); + + it('should extract context with additional fields', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + // TODO: assert additional fields when the propagator supports it + assert.deepStrictEqual(extractedSpanContext, { + traceId: TRACE_ID, + spanId: SPAN_ID, + isRemote: true, + traceFlags: TraceFlags.SAMPLED, + }); + }); + + it('extract empty header value - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = ''; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract invalid traceId - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-abcdefgh-ijklmnopabcdefghijklmnop;Parent=53995c3f42cd8ad8;Sampled=0'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract invalid traceId size - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa600;Parent=53995c3f42cd8ad8;Sampled=0'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract invalid traceId delimiter - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1*8a3c60f7+d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract invalid spanId - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=abcdefghijklmnop;Sampled=0'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract invalid spanId size - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad800;Sampled=0'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract invalid traceFlags - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled='; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract invalid traceFlags length - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=10220'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract nonnumeric invalid traceFlags - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=a'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + + it('extract invalid aws xray version - should return undefined', () => { + carrier[AWSXRAY_TRACE_ID_HEADER] = + 'Root=2-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; + const extractedSpanContext = getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + )?.context(); + + assert.deepStrictEqual(extractedSpanContext, undefined); + }); + describe('.fields()', () => { + it('should return a field with AWS X-Ray Trace ID header', () => { + const expectedField = xrayPropagator.fields(); + + assert.deepStrictEqual([AWSXRAY_TRACE_ID_HEADER], expectedField); + }); + }); + }); +}); diff --git a/test/index-webpack.ts b/test/index-webpack.ts new file mode 100644 index 00000000000..061a48ccfa7 --- /dev/null +++ b/test/index-webpack.ts @@ -0,0 +1,20 @@ +/* + * 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 + * + * https://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 testsContext = require.context('.', true, /test$/); +testsContext.keys().forEach(testsContext); + +const srcContext = require.context('.', true, /src$/); +srcContext.keys().forEach(srcContext); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000000..4078877ce62 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.base", + "compilerOptions": { + "rootDir": ".", + "outDir": "build" + }, + "include": [ + "src/**/*.ts", + "test/**/*.ts" + ] +} From 664a0b8321b1a4a19a6cef44289c4da8f9443cd9 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Thu, 22 Apr 2021 14:05:36 -0400 Subject: [PATCH 02/84] chore: update core to 0.19, api to rc0 (#440) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 732ea153ce9..7a586858ebe 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/api": "^0.18.0", - "@opentelemetry/core": "^0.18.0" + "@opentelemetry/api": "^1.0.0-rc.0", + "@opentelemetry/core": "^0.19.0" } } From ddb1c478da0b8a5c1332e7acc97cc560d8c1394c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 24 Apr 2021 12:02:55 +0200 Subject: [PATCH 03/84] chore: 0.16.0 release proposal (#449) Co-authored-by: vmarchaud --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7a586858ebe..e78c9e02948 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "0.15.0", + "version": "0.16.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 1e4172026f1..eacb17da857 100644 --- a/src/version.ts +++ b/src/version.ts @@ -15,4 +15,4 @@ */ // this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.15.0'; +export const VERSION = '0.16.0'; From cdf5f835e46aadb308b1a581b79636c62cdf4486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= Date: Mon, 26 Apr 2021 17:24:53 +0200 Subject: [PATCH 04/84] Update gts, eslint, typescript and hapi dependencies (#455) Co-authored-by: Daniel Dyla --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e78c9e02948..fd044ffd144 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "rimraf": "3.0.2", "ts-loader": "8.0.12", "ts-mocha": "8.0.0", - "typescript": "4.1.3", + "typescript": "4.2.4", "webpack": "4.46.0" }, "dependencies": { From 6e090729a31813b26336f342d05c19a884c5585e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 26 Apr 2021 21:01:45 +0200 Subject: [PATCH 05/84] chore(deps): update all non-major dependencies (#143) long time coming --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fd044ffd144..1dd84af6cfa 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "access": "public" }, "devDependencies": { - "@types/mocha": "8.2.0", - "@types/node": "14.14.12", + "@types/mocha": "8.2.2", + "@types/node": "14.14.41", "@types/webpack-env": "1.16.0", "codecov": "3.8.1", "gts": "3.1.0", @@ -57,7 +57,7 @@ "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "3.0.2", - "ts-loader": "8.0.12", + "ts-loader": "8.2.0", "ts-mocha": "8.0.0", "typescript": "4.2.4", "webpack": "4.46.0" From 00d13eb5f071a76890cca554171164fd9316782e Mon Sep 17 00:00:00 2001 From: t2t2 Date: Fri, 30 Apr 2021 20:26:07 +0300 Subject: [PATCH 06/84] feat: add ESM builds for packages used in browser (#459) * feat: add ESM builds for packages used in browser * fix(id-generator-aws-xray): missed including esm files --- package.json | 10 +++++++--- tsconfig.esm.json | 11 +++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 tsconfig.esm.json diff --git a/package.json b/package.json index 1dd84af6cfa..9404b7a2481 100644 --- a/package.json +++ b/package.json @@ -3,19 +3,20 @@ "version": "0.16.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", + "module": "build/esm/index.js", "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { "precompile": "tsc --version", - "compile": "tsc --build", - "clean": "tsc --build --clean", + "compile": "tsc --build tsconfig.json tsconfig.esm.json", + "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "test:browser": "nyc karma start --single-run", "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", - "watch": "tsc --build --watch", + "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json", "prepare": "npm run compile" }, "keywords": [ @@ -31,6 +32,9 @@ "node": ">=8.0.0" }, "files": [ + "build/esm/**/*.js", + "build/esm/**/*.js.map", + "build/esm/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", "build/src/**/*.d.ts", diff --git a/tsconfig.esm.json b/tsconfig.esm.json new file mode 100644 index 00000000000..a94adff6aa8 --- /dev/null +++ b/tsconfig.esm.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.base.esm.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm", + "tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo" + }, + "include": [ + "src/**/*.ts" + ] +} From d36f07c4d79f3cb574308d48c10815e99a9807c8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 1 May 2021 09:30:43 +0200 Subject: [PATCH 07/84] chore(deps): update all non-major dependencies (#461) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9404b7a2481..f7ca661d267 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "@types/mocha": "8.2.2", - "@types/node": "14.14.41", + "@types/node": "14.14.43", "@types/webpack-env": "1.16.0", "codecov": "3.8.1", "gts": "3.1.0", From 933b40848c65afd66f1fd7c0e5ca54888f47a4cf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 8 May 2021 16:09:37 +0200 Subject: [PATCH 08/84] fix(deps): update all non-major dependencies (#475) Co-authored-by: Valentin Marchaud --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f7ca661d267..1c8d13a0557 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,9 @@ }, "devDependencies": { "@types/mocha": "8.2.2", - "@types/node": "14.14.43", + "@types/node": "14.14.44", "@types/webpack-env": "1.16.0", - "codecov": "3.8.1", + "codecov": "3.8.2", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", "karma": "5.2.3", From ba3f86aaf974832b67df6ec418ea50df1b0ccc47 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 May 2021 17:54:30 +0200 Subject: [PATCH 09/84] chore(deps): update all non-major dependencies (#483) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c8d13a0557..69849b2d8c3 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "@types/mocha": "8.2.2", - "@types/node": "14.14.44", + "@types/node": "14.14.45", "@types/webpack-env": "1.16.0", "codecov": "3.8.2", "gts": "3.1.0", From 73ab4eec7d97658850908131c6660a8289f92195 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 22 May 2021 20:53:50 +0200 Subject: [PATCH 10/84] chore(deps): update all non-major dependencies (#494) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 69849b2d8c3..f5f83b64174 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "@types/mocha": "8.2.2", - "@types/node": "14.14.45", + "@types/node": "14.17.0", "@types/webpack-env": "1.16.0", "codecov": "3.8.2", "gts": "3.1.0", @@ -61,7 +61,7 @@ "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "3.0.2", - "ts-loader": "8.2.0", + "ts-loader": "8.3.0", "ts-mocha": "8.0.0", "typescript": "4.2.4", "webpack": "4.46.0" From c1d116304a98abef604b972d02e67b24e331844c Mon Sep 17 00:00:00 2001 From: William Armiros <54150514+willarmiros@users.noreply.github.com> Date: Tue, 25 May 2021 10:45:46 -0600 Subject: [PATCH 11/84] Update documentation for new propagator API (#482) Co-authored-by: Valentin Marchaud --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a6d0ae54ba7..65249ccde3a 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,16 @@ npm install --save @opentelemetry/propagator-aws-xray In the [global tracer configuration file](https://github.com/open-telemetry/opentelemetry-js/blob/master/getting-started/README.md#initialize-a-global-tracer), configure the following: ```js -const { propagation } = require("@opentelemetry/api"); +const { NodeTracerProvider } = require('@opentelemetry/node'); const { AWSXRayPropagator } = require('@opentelemetry/propagator-aws-xray'); // ... -module.exports = ("service_name_here") => { - // set global propagator - propagation.setGlobalPropagator(new AWSXRayPropagator()); - // ...} +const provider = new NodeTracerProvider(); + +// Set the global trace context propagator to use X-Ray formatted trace header +provider.register({ + propagator: new AWSXRayPropagator() +}); ``` ### Propagator Details From 010ab95a1f73b58ccbe7f7368f32be14deaaf52b Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Fri, 4 Jun 2021 08:05:12 -0400 Subject: [PATCH 12/84] chore: update core to 0.20.0 (#513) * chore: update core to 0.20.0 * chore: fix test * chore: review comments and lint * chore: get example versions from previous update * chore: lint --- package.json | 4 +- src/AWSXRayPropagator.ts | 7 +- test/AWSXRayPropagator.test.ts | 118 ++++++++++++++++++++------------- 3 files changed, 78 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index f5f83b64174..af28159034b 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/api": "^1.0.0-rc.0", - "@opentelemetry/core": "^0.19.0" + "@opentelemetry/api": "^0.20.0", + "@opentelemetry/core": "^0.20.0" } } diff --git a/src/AWSXRayPropagator.ts b/src/AWSXRayPropagator.ts index 596d8d9c2c6..89215ef6f61 100644 --- a/src/AWSXRayPropagator.ts +++ b/src/AWSXRayPropagator.ts @@ -15,6 +15,7 @@ */ import { + trace, Context, TextMapPropagator, SpanContext, @@ -26,8 +27,6 @@ import { isValidTraceId, INVALID_TRACEID, INVALID_SPANID, - getSpanContext, - setSpanContext, INVALID_SPAN_CONTEXT, } from '@opentelemetry/api'; @@ -60,7 +59,7 @@ const NOT_SAMPLED = '0'; */ export class AWSXRayPropagator implements TextMapPropagator { inject(context: Context, carrier: unknown, setter: TextMapSetter) { - const spanContext = getSpanContext(context); + const spanContext = trace.getSpan(context)?.spanContext(); if (!spanContext || !isSpanContextValid(spanContext)) return; const otTraceId = spanContext.traceId; @@ -82,7 +81,7 @@ export class AWSXRayPropagator implements TextMapPropagator { const spanContext = this.getSpanContextFromHeader(carrier, getter); if (!isSpanContextValid(spanContext)) return context; - return setSpanContext(context, spanContext); + return trace.setSpan(context, trace.wrapSpanContext(spanContext)); } fields(): string[] { diff --git a/test/AWSXRayPropagator.test.ts b/test/AWSXRayPropagator.test.ts index b7ca77a9036..c110745c83c 100644 --- a/test/AWSXRayPropagator.test.ts +++ b/test/AWSXRayPropagator.test.ts @@ -18,12 +18,11 @@ import * as assert from 'assert'; import { defaultTextMapGetter, defaultTextMapSetter, - getSpan, INVALID_SPAN_CONTEXT, ROOT_CONTEXT, - setSpanContext, SpanContext, TraceFlags, + trace, } from '@opentelemetry/api'; import { TraceState } from '@opentelemetry/core'; @@ -50,7 +49,7 @@ describe('AWSXRayPropagator', () => { traceFlags: SAMPLED_TRACE_FLAG, }; xrayPropagator.inject( - setSpanContext(ROOT_CONTEXT, spanContext), + trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), carrier, defaultTextMapSetter ); @@ -68,7 +67,7 @@ describe('AWSXRayPropagator', () => { traceFlags: NOT_SAMPLED_TRACE_FLAG, }; xrayPropagator.inject( - setSpanContext(ROOT_CONTEXT, spanContext), + trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), carrier, defaultTextMapSetter ); @@ -89,7 +88,7 @@ describe('AWSXRayPropagator', () => { traceState: traceState, }; xrayPropagator.inject( - setSpanContext(ROOT_CONTEXT, spanContext), + trace.setSpan(ROOT_CONTEXT, trace.wrapSpanContext(spanContext)), carrier, defaultTextMapSetter ); @@ -109,7 +108,10 @@ describe('AWSXRayPropagator', () => { it('inject default invalid spanContext - should inject nothing', () => { xrayPropagator.inject( - setSpanContext(ROOT_CONTEXT, INVALID_SPAN_CONTEXT), + trace.setSpan( + ROOT_CONTEXT, + trace.wrapSpanContext(INVALID_SPAN_CONTEXT) + ), carrier, defaultTextMapSetter ); @@ -130,9 +132,11 @@ describe('AWSXRayPropagator', () => { it('should extract sampled context', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, { traceId: TRACE_ID, @@ -145,9 +149,11 @@ describe('AWSXRayPropagator', () => { it('should extract sampled context with arbitrary order', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Parent=53995c3f42cd8ad8;Sampled=1;Root=1-8a3c60f7-d188f8fa79d48a391a778fa6'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, { traceId: TRACE_ID, @@ -160,9 +166,11 @@ describe('AWSXRayPropagator', () => { it('should extract context with additional fields', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); // TODO: assert additional fields when the propagator supports it assert.deepStrictEqual(extractedSpanContext, { @@ -175,9 +183,11 @@ describe('AWSXRayPropagator', () => { it('extract empty header value - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = ''; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -185,9 +195,11 @@ describe('AWSXRayPropagator', () => { it('extract invalid traceId - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-abcdefgh-ijklmnopabcdefghijklmnop;Parent=53995c3f42cd8ad8;Sampled=0'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -195,9 +207,11 @@ describe('AWSXRayPropagator', () => { it('extract invalid traceId size - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa600;Parent=53995c3f42cd8ad8;Sampled=0'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -205,9 +219,11 @@ describe('AWSXRayPropagator', () => { it('extract invalid traceId delimiter - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1*8a3c60f7+d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -215,9 +231,11 @@ describe('AWSXRayPropagator', () => { it('extract invalid spanId - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=abcdefghijklmnop;Sampled=0'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -225,9 +243,11 @@ describe('AWSXRayPropagator', () => { it('extract invalid spanId size - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad800;Sampled=0'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -235,9 +255,11 @@ describe('AWSXRayPropagator', () => { it('extract invalid traceFlags - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled='; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -245,9 +267,11 @@ describe('AWSXRayPropagator', () => { it('extract invalid traceFlags length - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=10220'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -255,9 +279,11 @@ describe('AWSXRayPropagator', () => { it('extract nonnumeric invalid traceFlags - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=a'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); @@ -265,9 +291,11 @@ describe('AWSXRayPropagator', () => { it('extract invalid aws xray version - should return undefined', () => { carrier[AWSXRAY_TRACE_ID_HEADER] = 'Root=2-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1'; - const extractedSpanContext = getSpan( - xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) - )?.context(); + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); assert.deepStrictEqual(extractedSpanContext, undefined); }); From fc323e5abc6e67a535390e8cca0aa0e1b5408212 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 4 Jun 2021 17:51:40 +0200 Subject: [PATCH 13/84] fix(deps): update all non-major dependencies (#503) --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index af28159034b..ea7ddf27269 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "@types/mocha": "8.2.2", - "@types/node": "14.17.0", + "@types/node": "14.17.2", "@types/webpack-env": "1.16.0", "codecov": "3.8.2", "gts": "3.1.0", @@ -63,7 +63,7 @@ "rimraf": "3.0.2", "ts-loader": "8.3.0", "ts-mocha": "8.0.0", - "typescript": "4.2.4", + "typescript": "4.3.2", "webpack": "4.46.0" }, "dependencies": { From 09f074aaf652c1643c1ba44393d3d4fdad2449a0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Jun 2021 12:28:29 -0400 Subject: [PATCH 14/84] chore: 0.20.0 release proposal (#520) Co-authored-by: dyladan --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ea7ddf27269..35729c424f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "0.16.0", + "version": "0.20.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/src/version.ts b/src/version.ts index eacb17da857..a14ba6ef881 100644 --- a/src/version.ts +++ b/src/version.ts @@ -15,4 +15,4 @@ */ // this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.16.0'; +export const VERSION = '0.20.0'; From 6265dcc041369a9875a80992c0b542e22cce4e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= Date: Mon, 7 Jun 2021 10:04:55 +0200 Subject: [PATCH 15/84] chore: move api into peer dependency (#522) * chore: move api into peer dependency * fix peer-api-check script --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 35729c424f1..a4add3e33c2 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,11 @@ "publishConfig": { "access": "public" }, + "peerDependencies": { + "@opentelemetry/api": "^0.20.0" + }, "devDependencies": { + "@opentelemetry/api": "0.20.0", "@types/mocha": "8.2.2", "@types/node": "14.17.2", "@types/webpack-env": "1.16.0", @@ -67,7 +71,6 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/api": "^0.20.0", "@opentelemetry/core": "^0.20.0" } } From 56adeefc3c953e2385029bf42659c9ad8e8e1203 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Sat, 12 Jun 2021 04:27:34 -0400 Subject: [PATCH 16/84] chore: update core and api to 0.21.0 (#529) --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a4add3e33c2..7ba734265e8 100644 --- a/package.json +++ b/package.json @@ -46,10 +46,10 @@ "access": "public" }, "peerDependencies": { - "@opentelemetry/api": "^0.20.0" + "@opentelemetry/api": "^0.21.0" }, "devDependencies": { - "@opentelemetry/api": "0.20.0", + "@opentelemetry/api": "0.21.0", "@types/mocha": "8.2.2", "@types/node": "14.17.2", "@types/webpack-env": "1.16.0", @@ -71,6 +71,6 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/core": "^0.20.0" + "@opentelemetry/core": "^0.21.0" } } From 79e488586a6e0285750245eeaca1d506296fded8 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Sat, 12 Jun 2021 11:45:31 +0300 Subject: [PATCH 17/84] chore: add node:16 to the test matrix (#510) Co-authored-by: Valentin Marchaud --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ba734265e8..92194b57bfa 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "karma-coverage-istanbul-reporter": "3.0.3", "karma-mocha": "2.0.1", "karma-spec-reporter": "0.0.32", - "karma-webpack": "5.0.0", + "karma-webpack": "^4.0.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "3.0.2", From 3ed4aacce8a09c98a063355120535658e7187826 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 12 Jun 2021 11:17:51 +0200 Subject: [PATCH 18/84] chore(deps): update all non-major dependencies (#532) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92194b57bfa..861ed2def38 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "devDependencies": { "@opentelemetry/api": "0.21.0", "@types/mocha": "8.2.2", - "@types/node": "14.17.2", + "@types/node": "14.17.3", "@types/webpack-env": "1.16.0", "codecov": "3.8.2", "gts": "3.1.0", From 9ffe8c3011baca8a86c54b15438255a692ff383c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 16:25:57 +0200 Subject: [PATCH 19/84] chore: 0.21.0 release proposal (#536) Co-authored-by: vmarchaud Co-authored-by: vmarchaud --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 861ed2def38..876df9405df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "0.20.0", + "version": "0.21.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/src/version.ts b/src/version.ts index a14ba6ef881..fb47fc303bd 100644 --- a/src/version.ts +++ b/src/version.ts @@ -15,4 +15,4 @@ */ // this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.20.0'; +export const VERSION = '0.21.0'; From 46fa48507d34cc41627a9c28e100252da612d817 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 23 Jun 2021 09:28:30 -0400 Subject: [PATCH 20/84] chore: update core and API (#540) --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 876df9405df..62f573b3cc8 100644 --- a/package.json +++ b/package.json @@ -46,10 +46,10 @@ "access": "public" }, "peerDependencies": { - "@opentelemetry/api": "^0.21.0" + "@opentelemetry/api": "^1.0.0" }, "devDependencies": { - "@opentelemetry/api": "0.21.0", + "@opentelemetry/api": "1.0.0", "@types/mocha": "8.2.2", "@types/node": "14.17.3", "@types/webpack-env": "1.16.0", @@ -71,6 +71,6 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/core": "^0.21.0" + "@opentelemetry/core": "^0.22.0" } } From ab6c2d0f0ba8792c09a4c2c348a1561231857236 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 23 Jun 2021 16:06:07 +0200 Subject: [PATCH 21/84] fix(deps): pin dependencies (#541) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 62f573b3cc8..68b4ac41f31 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "karma-coverage-istanbul-reporter": "3.0.3", "karma-mocha": "2.0.1", "karma-spec-reporter": "0.0.32", - "karma-webpack": "^4.0.2", + "karma-webpack": "4.0.2", "mocha": "7.2.0", "nyc": "15.1.0", "rimraf": "3.0.2", From 79031bffd1e43c4a0ef82170c702a613e01720e9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Jun 2021 15:03:49 -0400 Subject: [PATCH 22/84] chore: 0.22.0 release proposal (#547) * chore: 0.22.0 release proposal * chore: changelog Co-authored-by: dyladan --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 68b4ac41f31..e8244c67f25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "0.21.0", + "version": "0.22.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/src/version.ts b/src/version.ts index fb47fc303bd..8b92491b988 100644 --- a/src/version.ts +++ b/src/version.ts @@ -15,4 +15,4 @@ */ // this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.21.0'; +export const VERSION = '0.22.0'; From d76bf114e0d95c97cce7b7a62fdbac61f0be8ab8 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Thu, 1 Jul 2021 14:54:11 -0400 Subject: [PATCH 23/84] chore: update core and API (#556) --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e8244c67f25..ca78542fb42 100644 --- a/package.json +++ b/package.json @@ -46,10 +46,10 @@ "access": "public" }, "peerDependencies": { - "@opentelemetry/api": "^1.0.0" + "@opentelemetry/api": "^1.0.1" }, "devDependencies": { - "@opentelemetry/api": "1.0.0", + "@opentelemetry/api": "1.0.1", "@types/mocha": "8.2.2", "@types/node": "14.17.3", "@types/webpack-env": "1.16.0", @@ -71,6 +71,6 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/core": "^0.22.0" + "@opentelemetry/core": "^0.23.0" } } From 7df8ec2fadcfc28eb802e293e617375f51e128bf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 1 Jul 2021 21:23:44 +0200 Subject: [PATCH 24/84] chore(deps): update all non-major dependencies (#542) --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ca78542fb42..3d19859da16 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "devDependencies": { "@opentelemetry/api": "1.0.1", "@types/mocha": "8.2.2", - "@types/node": "14.17.3", - "@types/webpack-env": "1.16.0", + "@types/node": "14.17.4", + "@types/webpack-env": "1.16.1", "codecov": "3.8.2", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", @@ -67,7 +67,7 @@ "rimraf": "3.0.2", "ts-loader": "8.3.0", "ts-mocha": "8.0.0", - "typescript": "4.3.2", + "typescript": "4.3.5", "webpack": "4.46.0" }, "dependencies": { From b820fa412090780c6171c77e00e21189ef42bc4c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Jul 2021 14:41:14 -0400 Subject: [PATCH 25/84] chore: 0.23.0 release proposal (#560) * chore: 0.23.0 release proposal * chore: changelog Co-authored-by: obecny Co-authored-by: Daniel Dyla --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3d19859da16..2326c5aeeaf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "0.22.0", + "version": "0.23.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/src/version.ts b/src/version.ts index 8b92491b988..113a67d8b1b 100644 --- a/src/version.ts +++ b/src/version.ts @@ -15,4 +15,4 @@ */ // this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.22.0'; +export const VERSION = '0.23.0'; From 178b581a1b20b98aa7cf5b56cb2c8be43a469475 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 18 Jul 2021 09:55:04 +0200 Subject: [PATCH 26/84] fix(deps): update all non-major dependencies (#567) --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2326c5aeeaf..49254500c68 100644 --- a/package.json +++ b/package.json @@ -50,9 +50,9 @@ }, "devDependencies": { "@opentelemetry/api": "1.0.1", - "@types/mocha": "8.2.2", - "@types/node": "14.17.4", - "@types/webpack-env": "1.16.1", + "@types/mocha": "8.2.3", + "@types/node": "14.17.5", + "@types/webpack-env": "1.16.2", "codecov": "3.8.2", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", From e8de78f0d6f27bfa7e893e4873de5d2d0e831394 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 23 Jul 2021 19:36:10 +0200 Subject: [PATCH 27/84] chore(deps): update all non-major dependencies (#586) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 49254500c68..15ba410d053 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@types/mocha": "8.2.3", "@types/node": "14.17.5", "@types/webpack-env": "1.16.2", - "codecov": "3.8.2", + "codecov": "3.8.3", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", "karma": "5.2.3", From 1c7040a9cc764d0d6536dba8374f0efadb453771 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 28 Jul 2021 14:40:48 -0400 Subject: [PATCH 28/84] chore: update core deps to 0.24.0 (#594) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 15ba410d053..de9e3f1a282 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,6 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/core": "^0.23.0" + "@opentelemetry/core": "^0.24.0" } } From e9b56b57cfe77e7eb730e76fb39322f6213d581f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 29 Jul 2021 15:32:12 -0400 Subject: [PATCH 29/84] chore: 0.24.0 release proposal (#598) Co-authored-by: dyladan --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index de9e3f1a282..9a1fc75aaeb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "0.23.0", + "version": "0.24.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/src/version.ts b/src/version.ts index 113a67d8b1b..2902e7d2623 100644 --- a/src/version.ts +++ b/src/version.ts @@ -15,4 +15,4 @@ */ // this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.23.0'; +export const VERSION = '0.24.0'; From 35c357e0d8fbc0783b56548d388566ea513808ad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 4 Aug 2021 20:42:09 +0200 Subject: [PATCH 30/84] fix(deps): update all non-major dependencies (#599) --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9a1fc75aaeb..0097322c495 100644 --- a/package.json +++ b/package.json @@ -46,12 +46,12 @@ "access": "public" }, "peerDependencies": { - "@opentelemetry/api": "^1.0.1" + "@opentelemetry/api": "^1.0.2" }, "devDependencies": { - "@opentelemetry/api": "1.0.1", + "@opentelemetry/api": "1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.5", + "@types/node": "14.17.9", "@types/webpack-env": "1.16.2", "codecov": "3.8.3", "gts": "3.1.0", From 96c539b10f6930674b5aa1d64cf449cf94109720 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 9 Aug 2021 10:03:25 -0400 Subject: [PATCH 31/84] chore: add component owners to readme (#607) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 65249ccde3a..6571b90a955 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ [![devDependencies][devDependencies-image]][devDependencies-url] [![Apache License][license-image]][license-image] +[component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @willarmiros @NathanielRN + The OpenTelemetry Propagator for AWS X-Ray provides HTTP header propagation for systems that are using AWS `X-Amzn-Trace-Id` format. This propagator translates the OpenTelemetry SpanContext into the equivalent AWS header format, for use with the OpenTelemetry JS SDK. `TraceState` is currently not propagated. From 856a655123bd4ce8c9b4fc7bcbf3b683a8712f4d Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Fri, 27 Aug 2021 08:21:07 -0400 Subject: [PATCH 32/84] chore: update core dependencies to 0.25 (#635) --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6571b90a955..063f12dc74d 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ npm install --save @opentelemetry/propagator-aws-xray In the [global tracer configuration file](https://github.com/open-telemetry/opentelemetry-js/blob/master/getting-started/README.md#initialize-a-global-tracer), configure the following: ```js -const { NodeTracerProvider } = require('@opentelemetry/node'); +const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { AWSXRayPropagator } = require('@opentelemetry/propagator-aws-xray'); // ... diff --git a/package.json b/package.json index 0097322c495..1cbe0a690da 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,6 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/core": "^0.24.0" + "@opentelemetry/core": "^0.25.0" } } From 8062919c069e060a47196a9af3311215f49d50f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 11:51:31 -0400 Subject: [PATCH 33/84] chore: 0.25.0 release proposal (#657) Co-authored-by: dyladan --- package.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1cbe0a690da..4751cfa1101 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "0.24.0", + "version": "0.25.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/src/version.ts b/src/version.ts index 2902e7d2623..2c1c3f80c63 100644 --- a/src/version.ts +++ b/src/version.ts @@ -15,4 +15,4 @@ */ // this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.24.0'; +export const VERSION = '0.25.0'; From ce2bb0f04c50a588d448d35e5dbc6900ee695ac5 Mon Sep 17 00:00:00 2001 From: William Armiros <54150514+willarmiros@users.noreply.github.com> Date: Tue, 21 Sep 2021 09:51:24 -0700 Subject: [PATCH 34/84] chore: add release-please automation (#659) --- package.json | 3 ++- src/version.ts | 18 ------------------ 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 src/version.ts diff --git a/package.json b/package.json index 4751cfa1101..2a2280b5f2e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "precompile": "tsc --version", + "precompile": "tsc --version && lerna run version --scope $(npm pkg get name) --include-filtered-dependencies", + "prewatch": "npm run precompile", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", diff --git a/src/version.ts b/src/version.ts deleted file mode 100644 index 2c1c3f80c63..00000000000 --- a/src/version.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 - * - * https://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. - */ - -// this is autogenerated file, see scripts/version-update.js -export const VERSION = '0.25.0'; From e17d04a061426c535d9a1f77848b71c25eb696c9 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 29 Sep 2021 15:12:37 -0400 Subject: [PATCH 35/84] chore: remove windows-incompatibility from script (#681) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a2280b5f2e..f0b7171e59e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "precompile": "tsc --version && lerna run version --scope $(npm pkg get name) --include-filtered-dependencies", + "precompile": "tsc --version && lerna run version --scope @opentelemetry/propagator-aws-xray --include-filtered-dependencies", "prewatch": "npm run precompile", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", From 40be841ff223db974efe88241b5226864b7400af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= Date: Tue, 12 Oct 2021 00:12:42 +0200 Subject: [PATCH 36/84] chore(deps): Update opentelementry dependencies to 1.0.0/0.26.0 (#695) Co-authored-by: Renovate Bot Co-authored-by: Daniel Dyla --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f0b7171e59e..189547a4446 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,6 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/core": "^0.25.0" + "@opentelemetry/core": "^1.0.0" } } From 27840ecdca8cfdcba8953677576e80bdc136ad6a Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Thu, 21 Oct 2021 10:31:30 -0400 Subject: [PATCH 37/84] feat: support API and SDK 1.0 (#706) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 063f12dc74d..7684ff63354 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ The OpenTelemetry Propagator for AWS X-Ray provides HTTP header propagation for This propagator translates the OpenTelemetry SpanContext into the equivalent AWS header format, for use with the OpenTelemetry JS SDK. `TraceState` is currently not propagated. +Compatible with OpenTelemetry JS API and SDK `1.0+`. + ### Installation ``` From 217553687f7843a22de107c05987147d24a20d8f Mon Sep 17 00:00:00 2001 From: William Armiros <54150514+willarmiros@users.noreply.github.com> Date: Fri, 22 Oct 2021 12:18:46 -0700 Subject: [PATCH 38/84] feat: bumped aws components to 1.0 (#658) * chore: bumped aws components to 1.0 * chore: fixed link in docs to be consistent Release-As: 1.0.0 * chore: cleaned up idgenerator readme Release-As: 1.0.0 * chore: cleaned up propagator readme Release-As: 1.0.0 * chore: updated sdk to 1.0.0 * updated readme for trace id generator Co-authored-by: Rauno Viskus Co-authored-by: Bartlomiej Obecny --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7684ff63354..077644a1853 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ For additional reading, see the [AWS X-Ray Trace ID](https://docs.aws.amazon.com * 64-bit random number in base16 format. Populated from the [OpenTelemetry Span ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). -#### Sampled - The sampling decision* +#### Sampled - The sampling decision * Defined in the AWS X-Ray specification as a tri-state field, with "0", "1" and "?" as valid values. Only "0" and "1" are used in this propagator. If "?", a new trace will be started. * Populated from the [OpenTelemetry trace flags](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). From 4cf8178715a117241c00e961344cc4251f11907f Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 25 Oct 2021 11:36:52 -0400 Subject: [PATCH 39/84] chore: release main (#696) --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000000..d100fb7fe0e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +## [1.0.0](https://www.github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v0.25.0...propagator-aws-xray-v1.0.0) (2021-10-22) + + +### Features + +* bumped aws components to 1.0 ([#658](https://www.github.com/open-telemetry/opentelemetry-js-contrib/issues/658)) ([44d21fe](https://www.github.com/open-telemetry/opentelemetry-js-contrib/commit/44d21fe5030d2f64bedde1efc50a1173e0c49f3d)) +* support API and SDK 1.0 ([#706](https://www.github.com/open-telemetry/opentelemetry-js-contrib/issues/706)) ([096b694](https://www.github.com/open-telemetry/opentelemetry-js-contrib/commit/096b694bbc3079f0ab4ee0462869b10eb8185202)) diff --git a/package.json b/package.json index 189547a4446..88f67ca040f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "0.25.0", + "version": "1.0.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", From 48e1cf73b710c6828ad2a4a63f2611e6b2762996 Mon Sep 17 00:00:00 2001 From: Yosef Arbiv Date: Sun, 21 Nov 2021 11:42:26 +0200 Subject: [PATCH 40/84] ci: add markdown lint and fixed markdown files (#716) Co-authored-by: Valentin Marchaud --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 077644a1853..a399246b09f 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ This propagator translates the OpenTelemetry SpanContext into the equivalent AWS Compatible with OpenTelemetry JS API and SDK `1.0+`. -### Installation +## Installation -``` +```sh npm install --save @opentelemetry/propagator-aws-xray ``` -### Usage +## Usage In the [global tracer configuration file](https://github.com/open-telemetry/opentelemetry-js/blob/master/getting-started/README.md#initialize-a-global-tracer), configure the following: @@ -36,38 +36,38 @@ provider.register({ }); ``` -### Propagator Details +## Propagator Details Example header:`X-Amzn-Trace-Id: Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1` The header consists of three parts: the root trace ID, the parent ID and the sampling decision. -#### Root - The AWS X-Ray format trace ID +### Root - The AWS X-Ray format trace ID * Format: (spec-version)-(timestamp)-(UUID) - * spec_version - The version of the AWS X-Ray header format. Currently, only "1" is valid. - * timestamp - 32-bit number in base16 format, corresponds to the first 8 characters of the OpenTelemetry trace ID. Note, while X-Ray calls this timestamp, for the purpose of propagation it is opaque and any value will work. - * UUID - 96-bit random number in base16 format, corresponds to the last 10 characters of the OpenTelemetry trace ID. + * spec_version - The version of the AWS X-Ray header format. Currently, only "1" is valid. + * timestamp - 32-bit number in base16 format, corresponds to the first 8 characters of the OpenTelemetry trace ID. Note, while X-Ray calls this timestamp, for the purpose of propagation it is opaque and any value will work. + * UUID - 96-bit random number in base16 format, corresponds to the last 10 characters of the OpenTelemetry trace ID. Root is analogous to the [OpenTelemetry Trace ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext), with some small format changes. For additional reading, see the [AWS X-Ray Trace ID](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-sendingdata.html#xray-api-traceids) public documentation. -#### Parent - The ID of the AWS X-Ray Segment +### Parent - The ID of the AWS X-Ray Segment * 64-bit random number in base16 format. Populated from the [OpenTelemetry Span ID](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). -#### Sampled - The sampling decision +### Sampled - The sampling decision * Defined in the AWS X-Ray specification as a tri-state field, with "0", "1" and "?" as valid values. Only "0" and "1" are used in this propagator. If "?", a new trace will be started. * Populated from the [OpenTelemetry trace flags](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/overview.md#spancontext). ## Useful links -- For more information on OpenTelemetry, visit: -- For more about OpenTelemetry JavaScript: -- For help or feedback on this project, join us in [GitHub Discussions][discussions-url] +* For more information on OpenTelemetry, visit: +* For more about OpenTelemetry JavaScript: +* For help or feedback on this project, join us in [GitHub Discussions][discussions-url] -### License +## License Apache 2.0 - See [LICENSE][license-url] for more information. From 627d0da12afa19a44c4bd7d22a0c31647428bff2 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Tue, 4 Jan 2022 17:01:04 +0200 Subject: [PATCH 41/84] fix: rename lerna's --include-filtered-dependencies option (#817) * fix: `--include-filtered-dependencies` -> `--include-dependencies` https://github.com/lerna/lerna/commit/f2c3a92fe41b6fdc5d11269f0f2c3e27761b4c85 * fix: remove deprecated lerna field from lerna.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88f67ca040f..fe66f90a29d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "precompile": "tsc --version && lerna run version --scope @opentelemetry/propagator-aws-xray --include-filtered-dependencies", + "precompile": "tsc --version && lerna run version --scope @opentelemetry/propagator-aws-xray --include-dependencies", "prewatch": "npm run precompile", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", From 6271757fcf5f09f6a6b6cbc285207a0578d556e8 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Mon, 10 Jan 2022 19:01:32 +0200 Subject: [PATCH 42/84] fix: fix CI by forcing colors@1.4.0 (#825) * fix: force colors@1.4.0 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index fe66f90a29d..6ff0fd08d0e 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@types/node": "14.17.9", "@types/webpack-env": "1.16.2", "codecov": "3.8.3", + "colors": "1.4.0", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", "karma": "5.2.3", From 014749019f299066bfdd15173607cb383ede77aa Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 24 Jan 2022 13:36:08 -0500 Subject: [PATCH 43/84] chore: release main (#815) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d100fb7fe0e..42b70d5bf83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.0.1](https://www.github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.0.0...propagator-aws-xray-v1.0.1) (2022-01-24) + + +### Bug Fixes + +* fix CI by forcing colors@1.4.0 ([#825](https://www.github.com/open-telemetry/opentelemetry-js-contrib/issues/825)) ([0ec9f08](https://www.github.com/open-telemetry/opentelemetry-js-contrib/commit/0ec9f080520fe0f146a915a656300ef53a151ace)) +* rename lerna's --include-filtered-dependencies option ([#817](https://www.github.com/open-telemetry/opentelemetry-js-contrib/issues/817)) ([cf268e7](https://www.github.com/open-telemetry/opentelemetry-js-contrib/commit/cf268e7a92b7800ad6dbec9ca77466f9ee03ee1a)) + ## [1.0.0](https://www.github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v0.25.0...propagator-aws-xray-v1.0.0) (2021-10-22) diff --git a/package.json b/package.json index 6ff0fd08d0e..4c9107229d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "1.0.0", + "version": "1.0.1", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", From 0a7b2053ab0e85b5f3e2a5e45fe5f36ec64aab56 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Sun, 30 Jan 2022 14:48:27 +0200 Subject: [PATCH 44/84] chore(deps): update dependency @types/node to v16 (#852) * chore(deps): update dependency @types/node to v16 * fix: typescript issues --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4c9107229d8..840b1038f4c 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "devDependencies": { "@opentelemetry/api": "1.0.2", "@types/mocha": "8.2.3", - "@types/node": "14.17.9", + "@types/node": "16.11.21", "@types/webpack-env": "1.16.2", "codecov": "3.8.3", "colors": "1.4.0", From 03a39728d05bdb5f280b89bd56f75bc60ba61094 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 12 Feb 2022 12:38:13 +0100 Subject: [PATCH 45/84] chore(deps): update dependency karma to v6 [security] (#884) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 840b1038f4c..3db608617f6 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "colors": "1.4.0", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", - "karma": "5.2.3", + "karma": "6.3.14", "karma-chrome-launcher": "3.1.0", "karma-coverage-istanbul-reporter": "3.0.3", "karma-mocha": "2.0.1", From c63dbc10fb82a1c6b4fe5b6029b66ea360359fb2 Mon Sep 17 00:00:00 2001 From: Yaniv Davidi Date: Tue, 15 Feb 2022 12:51:33 +0200 Subject: [PATCH 46/84] chore: update licenses year & authors (#895) Co-authored-by: Rauno Viskus --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 261eeb9e9f8..e50e8c80f96 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright [2022] OpenTelemetry Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 1e0ae68baa5ce3ddc7021d1aa554aac1fda68e5f Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Wed, 16 Feb 2022 22:26:25 +0200 Subject: [PATCH 47/84] chore: remove deprecated dependency of codecov (#906) --- package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/package.json b/package.json index 3db608617f6..2fddeadb381 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", "test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts", "test:browser": "nyc karma start --single-run", - "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", @@ -54,7 +53,6 @@ "@types/mocha": "8.2.3", "@types/node": "16.11.21", "@types/webpack-env": "1.16.2", - "codecov": "3.8.3", "colors": "1.4.0", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", From bdf26a6f79d74534b9152c6d4c2e3ed83064976d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Mar 2022 17:39:46 +0100 Subject: [PATCH 48/84] chore(deps): update dependency karma to v6.3.16 [security] (#928) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2fddeadb381..e51b2e75b51 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "colors": "1.4.0", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", - "karma": "6.3.14", + "karma": "6.3.16", "karma-chrome-launcher": "3.1.0", "karma-coverage-istanbul-reporter": "3.0.3", "karma-mocha": "2.0.1", From 644cc9ffc9572a02f6bff2d6f3e59976ab1aa430 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 7 Mar 2022 08:51:48 -0500 Subject: [PATCH 49/84] chore: remove unnecessary version:update scripts and don't check in fastify version.ts (#930) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Gerhard Stöbich --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index e51b2e75b51..5075b1911ed 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "precompile": "tsc --version && lerna run version --scope @opentelemetry/propagator-aws-xray --include-dependencies", + "precompile": "tsc --version && lerna run version:update --scope @opentelemetry/propagator-aws-xray --include-dependencies", "prewatch": "npm run precompile", "compile": "tsc --build tsconfig.json tsconfig.esm.json", "clean": "tsc --build --clean tsconfig.json tsconfig.esm.json", @@ -15,7 +15,6 @@ "test:browser": "nyc karma start --single-run", "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", "prepare": "npm run compile" }, From 846bda584c496f5e0b7a4113007096fbaee7cdcd Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Wed, 16 Mar 2022 12:46:58 +0200 Subject: [PATCH 50/84] feat: remove colors dependency (#943) fixes #826 --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 5075b1911ed..7df61a9a03c 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "@types/mocha": "8.2.3", "@types/node": "16.11.21", "@types/webpack-env": "1.16.2", - "colors": "1.4.0", "gts": "3.1.0", "istanbul-instrumenter-loader": "3.0.1", "karma": "6.3.16", From f32ee410151a49f41471db969ff9fda6b749b6d4 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Thu, 17 Mar 2022 10:55:08 +0200 Subject: [PATCH 51/84] docs: fix broken links (#945) * docs: remove all broken david-dm links * docs: fix links to node tracing sdk * docs: fix more links --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index a399246b09f..d009c170e12 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # OpenTelemetry Propagator AWS X-Ray [![NPM Published Version][npm-img]][npm-url] -[![dependencies][dependencies-image]][dependencies-url] -[![devDependencies][devDependencies-image]][devDependencies-url] [![Apache License][license-image]][license-image] [component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @willarmiros @NathanielRN @@ -21,7 +19,7 @@ npm install --save @opentelemetry/propagator-aws-xray ## Usage -In the [global tracer configuration file](https://github.com/open-telemetry/opentelemetry-js/blob/master/getting-started/README.md#initialize-a-global-tracer), configure the following: +In the [global tracer configuration file](https://opentelemetry.io/docs/instrumentation/js/getting-started/nodejs/#setup), configure the following: ```js const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); @@ -74,9 +72,5 @@ Apache 2.0 - See [LICENSE][license-url] for more information. [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions [license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat -[dependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-contrib.svg?path=propagators%2Fopentelemetry-propagator-aws-xray -[dependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=propagators%2Fopentelemetry-propagator-aws-xray -[devDependencies-image]: https://status.david-dm.org/gh/open-telemetry/opentelemetry-js-contrib.svg?path=propagators%2Fopentelemetry-propagator-aws-xray&type=dev -[devDependencies-url]: https://david-dm.org/open-telemetry/opentelemetry-js-contrib?path=propagators%2Fopentelemetry-propagator-aws-xray&type=dev [npm-url]: https://www.npmjs.com/package/@opentelemetry/propagator-aws-xray [npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fpropagator-aws-xray.svg From 18e8efaa7a6528c173e048b33dbadd26b7f82118 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Tue, 12 Apr 2022 12:47:12 +0300 Subject: [PATCH 52/84] feat: update webpack outside of examples (#963) * feat: update webpack outside of examples * chore: replace istanbul-instrumenter-loader with @jsdevtools/coverage-istanbul-loader Co-authored-by: Valentin Marchaud --- karma.conf.js | 21 ++++++++++++++++++++- package.json | 15 +++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index edcd9f055fd..133e22df63b 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,5 +1,5 @@ /*! - * Copyright 2020, OpenTelemetry Authors + * 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. @@ -14,10 +14,29 @@ * limitations under the License. */ +const webpack = require('webpack'); + const karmaWebpackConfig = require('../../karma.webpack'); const karmaBaseConfig = require('../../karma.base'); module.exports = (config) => { + { + const plugins = karmaWebpackConfig.plugins = []; + plugins.push(new webpack.ProvidePlugin({ + process: 'process/browser', + })); + } + + { + const plugins = karmaBaseConfig.plugins = []; + const toAdd = Object.keys(require('./package.json').devDependencies) + .filter((packageName) => packageName.startsWith('karma-')) + .map((packageName) => require(packageName)); + plugins.push( + ...toAdd + ); + } + config.set(Object.assign({}, karmaBaseConfig, { webpack: karmaWebpackConfig })) diff --git a/package.json b/package.json index 7df61a9a03c..06a8e66e623 100644 --- a/package.json +++ b/package.json @@ -48,25 +48,28 @@ "@opentelemetry/api": "^1.0.2" }, "devDependencies": { + "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "1.0.2", "@types/mocha": "8.2.3", "@types/node": "16.11.21", "@types/webpack-env": "1.16.2", + "assert": "2.0.0", "gts": "3.1.0", - "istanbul-instrumenter-loader": "3.0.1", - "karma": "6.3.16", - "karma-chrome-launcher": "3.1.0", + "karma": "6.3.17", + "karma-chrome-launcher": "3.1.1", "karma-coverage-istanbul-reporter": "3.0.3", "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.32", - "karma-webpack": "4.0.2", + "karma-spec-reporter": "0.0.33", + "karma-webpack": "5.0.0", "mocha": "7.2.0", "nyc": "15.1.0", + "process": "0.11.10", "rimraf": "3.0.2", "ts-loader": "8.3.0", "ts-mocha": "8.0.0", "typescript": "4.3.5", - "webpack": "4.46.0" + "webpack": "5.72.0", + "webpack-cli": "4.9.2" }, "dependencies": { "@opentelemetry/core": "^1.0.0" From 08c6c423dc9ae75bd3a374663b2ec56cdf10a89a Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Thu, 14 Apr 2022 12:04:23 +0300 Subject: [PATCH 53/84] feat: add supported node versions for all packages (#973) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 06a8e66e623..4bfec9262df 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "author": "OpenTelemetry Authors", "license": "Apache-2.0", "engines": { - "node": ">=8.0.0" + "node": ">=8.12.0" }, "files": [ "build/esm/**/*.js", From d25daf7d7e592cd5d2ed10046154ad25be93a14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= Date: Mon, 2 May 2022 16:06:13 +0200 Subject: [PATCH 54/84] feat: use Otel SDK 1.2/0.28 (#984) * feat: use Otel SDK 1.2/0.28 * fixup! chore(deps): update dependency @types/react-dom to v18 (#974) * host-metrics back to 0.27 * fix: correctly depen on contrib-test-utils * fixup! fix: correctly depen on contrib-test-utils * fixup! feat: use Otel SDK 1.2/0.28 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4bfec9262df..e01f03f409e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "access": "public" }, "peerDependencies": { - "@opentelemetry/api": "^1.0.2" + "@opentelemetry/api": "^1.0.0" }, "devDependencies": { "@jsdevtools/coverage-istanbul-loader": "3.0.5", From e2fc5de3e497961a329731abc869eeba20a8c411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= Date: Sat, 14 May 2022 18:00:49 +0200 Subject: [PATCH 55/84] chore: harmonize dependencies (#1020) * chore: harmonize dependencies Harmonize dependencies by using following rules: * peer and dev depend on API ^1.0.0 (like in core repo) * depend on SDK ^1.0.0 (don't limit user) * dev-depend on latest SDK pinned (like other deps) * pin dependencies within the lerna project (like in core repo) * chore: re-add shimmer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e01f03f409e..0aeb7dced23 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "@jsdevtools/coverage-istanbul-loader": "3.0.5", - "@opentelemetry/api": "1.0.2", + "@opentelemetry/api": "^1.0.0", "@types/mocha": "8.2.3", "@types/node": "16.11.21", "@types/webpack-env": "1.16.2", From f6079fa0d583385003cec695a9dc3800349b95b2 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 16 May 2022 06:14:17 -0400 Subject: [PATCH 56/84] chore: release main (#947) --- CHANGELOG.md | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42b70d5bf83..7f40e80c419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [1.1.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.0.1...propagator-aws-xray-v1.1.0) (2022-05-14) + + +### Features + +* add supported node versions for all packages ([#973](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/973)) ([baaacbd](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/baaacbdd35ca4baab0afae64647aa8c0380ee4b7)) +* remove colors dependency ([#943](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/943)) ([b21b96c](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/b21b96c1a3a4f871370f970d6b2825f00e1fe595)), closes [#826](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/826) +* update webpack outside of examples ([#963](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/963)) ([9a58648](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/9a586480ed6a7677fb1283a61d05540345c52617)) +* use Otel SDK 1.2/0.28 ([#984](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/984)) ([098c2ed](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/098c2ed6f9c5ab7bd865685018c0777245aab3b7)) + ### [1.0.1](https://www.github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.0.0...propagator-aws-xray-v1.0.1) (2022-01-24) diff --git a/package.json b/package.json index 0aeb7dced23..291389c285e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "1.0.1", + "version": "1.1.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", From 11e190ec166ce42fe61d8024002b0b72f14e6d33 Mon Sep 17 00:00:00 2001 From: Vlad Goldman Date: Thu, 26 May 2022 17:26:40 +0300 Subject: [PATCH 57/84] docs: fix homepage links (#1032) * fix: homepage links * fix: add homepage for redis-4 Co-authored-by: Amir Blum --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 291389c285e..d4bfe29c0b0 100644 --- a/package.json +++ b/package.json @@ -73,5 +73,6 @@ }, "dependencies": { "@opentelemetry/core": "^1.0.0" - } + }, + "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/propagators/opentelemetry-propagator-aws-xray#readme" } From d0b0a241bb52f3b797b0655bce53827468c2bf8a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jun 2022 23:12:17 +0200 Subject: [PATCH 58/84] chore(deps): update dependency ts-mocha to v10 (#1008) Co-authored-by: Amir Blum --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d4bfe29c0b0..cef8e11b4d8 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "process": "0.11.10", "rimraf": "3.0.2", "ts-loader": "8.3.0", - "ts-mocha": "8.0.0", + "ts-mocha": "10.0.0", "typescript": "4.3.5", "webpack": "5.72.0", "webpack-cli": "4.9.2" From 56ddade1f08cc79a4fef7b03876e2aafae447ea6 Mon Sep 17 00:00:00 2001 From: Nev <54870357+MSNev@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:35:56 -0700 Subject: [PATCH 59/84] ci: [Bug] Web based karma tests are no longer running #1135 (#1137) Co-authored-by: Daniel Dyla Co-authored-by: Valentin Marchaud --- karma.conf.js | 21 +-------------------- package.json | 15 ++++++--------- 2 files changed, 7 insertions(+), 29 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 133e22df63b..edcd9f055fd 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,5 +1,5 @@ /*! - * Copyright The OpenTelemetry Authors + * Copyright 2020, OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,29 +14,10 @@ * limitations under the License. */ -const webpack = require('webpack'); - const karmaWebpackConfig = require('../../karma.webpack'); const karmaBaseConfig = require('../../karma.base'); module.exports = (config) => { - { - const plugins = karmaWebpackConfig.plugins = []; - plugins.push(new webpack.ProvidePlugin({ - process: 'process/browser', - })); - } - - { - const plugins = karmaBaseConfig.plugins = []; - const toAdd = Object.keys(require('./package.json').devDependencies) - .filter((packageName) => packageName.startsWith('karma-')) - .map((packageName) => require(packageName)); - plugins.push( - ...toAdd - ); - } - config.set(Object.assign({}, karmaBaseConfig, { webpack: karmaWebpackConfig })) diff --git a/package.json b/package.json index cef8e11b4d8..a2b25c8d37b 100644 --- a/package.json +++ b/package.json @@ -48,28 +48,25 @@ "@opentelemetry/api": "^1.0.0" }, "devDependencies": { - "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.0.0", "@types/mocha": "8.2.3", "@types/node": "16.11.21", "@types/webpack-env": "1.16.2", - "assert": "2.0.0", "gts": "3.1.0", - "karma": "6.3.17", - "karma-chrome-launcher": "3.1.1", + "@jsdevtools/coverage-istanbul-loader": "3.0.5", + "karma": "6.3.16", + "karma-chrome-launcher": "3.1.0", "karma-coverage-istanbul-reporter": "3.0.3", "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.33", - "karma-webpack": "5.0.0", + "karma-spec-reporter": "0.0.32", + "karma-webpack": "4.0.2", "mocha": "7.2.0", "nyc": "15.1.0", - "process": "0.11.10", "rimraf": "3.0.2", "ts-loader": "8.3.0", "ts-mocha": "10.0.0", "typescript": "4.3.5", - "webpack": "5.72.0", - "webpack-cli": "4.9.2" + "webpack": "4.46.0" }, "dependencies": { "@opentelemetry/core": "^1.0.0" From 9bea31eb365f6d4d65b8ed268238cc0eb8b70e0b Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Thu, 15 Sep 2022 20:00:37 +0300 Subject: [PATCH 60/84] chore: remove support for node 8-12, add 18 (#1065) * chore: remove node 8 and 10 from CI * chore: update engines * chore: add node 18 to CI * fix(resource-detector-alibaba-cloud): call .destroy() directly on the socket * test: reference the actual error message * test(instrumentation-fastify): check for similarity with ROOT_CONTEXT, not reference equality In the CI there will be 3 instances of the API installed(relative to the repo root): - `./plugins/node/opentelemetry-instrumentation-fastify/node_modules/@opentelemetry/api`, - `./node_modules/@opentelemetry/api`, - `./plugins/node/opentelemetry-instrumentation-fastify/node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/api`. * chore: remove support for node@12 updating the engines * chore: remove test runs on node@12 * test(resource-detector-alibaba-cloud): revert change, disable tests for node@18 * fix: turn fastify tests off for node@18 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a2b25c8d37b..c3c6e3d9f02 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "author": "OpenTelemetry Authors", "license": "Apache-2.0", "engines": { - "node": ">=8.12.0" + "node": ">=14" }, "files": [ "build/esm/**/*.js", From a8bc124767932ef1c3dce9df671264fdd0e78b35 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Thu, 20 Oct 2022 10:42:28 +0300 Subject: [PATCH 61/84] chore: remove NathanielRN from component owner (#1234) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d009c170e12..dcd871de991 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![NPM Published Version][npm-img]][npm-url] [![Apache License][license-image]][license-image] -[component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @willarmiros @NathanielRN +[component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @willarmiros The OpenTelemetry Propagator for AWS X-Ray provides HTTP header propagation for systems that are using AWS `X-Amzn-Trace-Id` format. This propagator translates the OpenTelemetry SpanContext into the equivalent AWS header format, for use with the OpenTelemetry JS SDK. From 776be376767a22ee1f0c292be12bf75bf6ce59d0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 29 Oct 2022 11:16:01 +0200 Subject: [PATCH 62/84] chore(deps): update dependency @types/node to v18 (#1259) Co-authored-by: Amir Blum --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c3c6e3d9f02..36609b71b68 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@types/mocha": "8.2.3", - "@types/node": "16.11.21", + "@types/node": "18.11.7", "@types/webpack-env": "1.16.2", "gts": "3.1.0", "@jsdevtools/coverage-istanbul-loader": "3.0.5", From 05922e50ec86ad02b8014f768d0a8dffcfd409f7 Mon Sep 17 00:00:00 2001 From: Nev <54870357+MSNev@users.noreply.github.com> Date: Tue, 1 Nov 2022 13:10:37 -0700 Subject: [PATCH 63/84] fix: address webpack memory issue for browser tests (#1264) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 36609b71b68..2cabb35a52e 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "gts": "3.1.0", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "karma": "6.3.16", - "karma-chrome-launcher": "3.1.0", + "karma-chrome-launcher": "^3.1.1", "karma-coverage-istanbul-reporter": "3.0.3", "karma-mocha": "2.0.1", "karma-spec-reporter": "0.0.32", From 5eb182468bf7080bc3834f721710ca937cf1c2ca Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 2 Nov 2022 08:58:52 -0400 Subject: [PATCH 64/84] chore: release main (#1214) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f40e80c419..6d93f709a7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.1.0...propagator-aws-xray-v1.1.1) (2022-11-02) + + +### Bug Fixes + +* address webpack memory issue for browser tests ([#1264](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1264)) ([c7f08fe](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/c7f08fed51bca68b0c522769c3c589102b98ec93)) + ## [1.1.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.0.1...propagator-aws-xray-v1.1.0) (2022-05-14) diff --git a/package.json b/package.json index 2cabb35a52e..e1a01e502f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "1.1.0", + "version": "1.1.1", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", From ad2984de1c00894e23163b75c15a5d8ca74a7e87 Mon Sep 17 00:00:00 2001 From: kobi-co <112798986+kobi-co@users.noreply.github.com> Date: Tue, 7 Feb 2023 16:35:11 +0200 Subject: [PATCH 65/84] chore: fix contrib build (#1374) * chore(mongodb): fix build after v5 release * chore: pin @types/bson version in monorepo root for lerna hoisting * chore: pin @types/bson version in monorepo root for lerna hoisting * chore: pin @types/bson version in mongodb * chore: patch winston module (logform breaking), ts 4.5.5 fixes * chore: change typescript to 4.4.4 * chore: change typescript to 4.4.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1a01e502f8..2766dfb00c1 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "rimraf": "3.0.2", "ts-loader": "8.3.0", "ts-mocha": "10.0.0", - "typescript": "4.3.5", + "typescript": "4.4.4", "webpack": "4.46.0" }, "dependencies": { From fbbdcd7ca6124423e96f0a44d24c7a4daa3b84e3 Mon Sep 17 00:00:00 2001 From: Norman Pellet Date: Tue, 7 Feb 2023 21:56:58 +0100 Subject: [PATCH 66/84] feat(propagator/aws-xray): Extract X-Ray header in a case-insensitive fashion (#1328) * Extract X-Ray header in a case-insensitive fashion * Back to apostrophes * Switch to 1 tab = 2 spaces * Add semis * Apply prettier to tests as well * chore: fix lint --------- Co-authored-by: Amir Blum Co-authored-by: Daniel Dyla --- src/AWSXRayPropagator.ts | 13 +++++++++++-- test/AWSXRayPropagator.test.ts | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/AWSXRayPropagator.ts b/src/AWSXRayPropagator.ts index 89215ef6f61..e06568d9ee0 100644 --- a/src/AWSXRayPropagator.ts +++ b/src/AWSXRayPropagator.ts @@ -92,9 +92,18 @@ export class AWSXRayPropagator implements TextMapPropagator { carrier: unknown, getter: TextMapGetter ): SpanContext { - const traceHeader = getter.get(carrier, AWSXRAY_TRACE_ID_HEADER); - if (!traceHeader || typeof traceHeader !== 'string') + const headerKeys = getter.keys(carrier); + const relevantHeaderKey = headerKeys.find(e => { + return e.toLowerCase() === AWSXRAY_TRACE_ID_HEADER; + }); + if (!relevantHeaderKey) { return INVALID_SPAN_CONTEXT; + } + const traceHeader = getter.get(carrier, relevantHeaderKey); + + if (!traceHeader || typeof traceHeader !== 'string') { + return INVALID_SPAN_CONTEXT; + } let pos = 0; let trimmedPart: string; diff --git a/test/AWSXRayPropagator.test.ts b/test/AWSXRayPropagator.test.ts index c110745c83c..5cf47916d58 100644 --- a/test/AWSXRayPropagator.test.ts +++ b/test/AWSXRayPropagator.test.ts @@ -299,6 +299,24 @@ describe('AWSXRayPropagator', () => { assert.deepStrictEqual(extractedSpanContext, undefined); }); + + it('extracts context in a case-insensitive fashion', () => { + carrier[AWSXRAY_TRACE_ID_HEADER.toUpperCase()] = + 'Root=1-8a3c60f7-d188f8fa79d48a391a778fa6;Parent=53995c3f42cd8ad8;Sampled=1;Foo=Bar'; + const extractedSpanContext = trace + .getSpan( + xrayPropagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter) + ) + ?.spanContext(); + + assert.deepStrictEqual(extractedSpanContext, { + traceId: TRACE_ID, + spanId: SPAN_ID, + isRemote: true, + traceFlags: TraceFlags.SAMPLED, + }); + }); + describe('.fields()', () => { it('should return a field with AWS X-Ray Trace ID header', () => { const expectedField = xrayPropagator.fields(); From 85229ba12c50a76ca00ced5c358c70884448109a Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Tue, 7 Feb 2023 17:23:37 -0500 Subject: [PATCH 67/84] chore: release main (#1340) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d93f709a7c..3104c626b76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.1.1...propagator-aws-xray-v1.2.0) (2023-02-07) + + +### Features + +* **propagator/aws-xray:** Extract X-Ray header in a case-insensitive fashion ([#1328](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1328)) ([4227d8a](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/4227d8a3df7b0782d76844e89d452e0432a704f4)) + ## [1.1.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.1.0...propagator-aws-xray-v1.1.1) (2022-11-02) diff --git a/package.json b/package.json index 2766dfb00c1..84f110f6b6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "1.1.1", + "version": "1.2.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", From 6fd99f35ae7be8d2a36dfeb3dedebd5a7048f2cf Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 3 Mar 2023 08:59:52 +0000 Subject: [PATCH 68/84] chore(deps): update dependency rimraf to v4 (#1402) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84f110f6b6a..3cd1a8f7201 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "karma-webpack": "4.0.2", "mocha": "7.2.0", "nyc": "15.1.0", - "rimraf": "3.0.2", + "rimraf": "4.2.0", "ts-loader": "8.3.0", "ts-mocha": "10.0.0", "typescript": "4.4.4", From 16660525ac80ed2de593a2b913003db0cf8164f7 Mon Sep 17 00:00:00 2001 From: William Armiros <54150514+willarmiros@users.noreply.github.com> Date: Tue, 11 Apr 2023 22:45:00 -0700 Subject: [PATCH 69/84] chore: update component owner for AWS to carolabadeer (#1464) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dcd871de991..a1c3ad536e6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![NPM Published Version][npm-img]][npm-url] [![Apache License][license-image]][license-image] -[component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @willarmiros +[component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @carolabadeer The OpenTelemetry Propagator for AWS X-Ray provides HTTP header propagation for systems that are using AWS `X-Amzn-Trace-Id` format. This propagator translates the OpenTelemetry SpanContext into the equivalent AWS header format, for use with the OpenTelemetry JS SDK. From 440388f5396b5d6807074023139c161846cc8f20 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Thu, 27 Apr 2023 08:58:38 +0200 Subject: [PATCH 70/84] docs: document component maturity levels (#1474) * docs: document component maturity levels * docs: link maturity levels from README * Typo Co-authored-by: Marc Pichler * Link header instead of owner --------- Co-authored-by: Marc Pichler --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a1c3ad536e6..9f2cb4e307c 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,15 @@ [![NPM Published Version][npm-img]][npm-url] [![Apache License][license-image]][license-image] -[component owners](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/.github/component_owners.yml): @carolabadeer - The OpenTelemetry Propagator for AWS X-Ray provides HTTP header propagation for systems that are using AWS `X-Amzn-Trace-Id` format. This propagator translates the OpenTelemetry SpanContext into the equivalent AWS header format, for use with the OpenTelemetry JS SDK. `TraceState` is currently not propagated. -Compatible with OpenTelemetry JS API and SDK `1.0+`. +## Status + +| Maturity | [Component Owner](../../.github/component_owners.yml) | Compatibility | +| ----------------------------------------- | ----------------------------------------------------- | --------------------- | +| [Stable](../../../CONTRIBUTING.md#stable) | @carolabadeer | API 1.0+
SDK 1.0+ | ## Installation From 9225678bddb40ec3b9d76f7b93ad9e66a9df0fdf Mon Sep 17 00:00:00 2001 From: Sami Musallam Date: Mon, 1 May 2023 20:47:56 +0300 Subject: [PATCH 71/84] fix(eslint-config): replace gts with prettier and eslint (#1439) * fix(eslint-config): replace gts with prettier and eslint recommended config * fix(eslint-config): using the core repo's configuration --------- Co-authored-by: Haddas Bronfman <85441461+haddasbronfman@users.noreply.github.com> --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 3cd1a8f7201..0e70815c6b8 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "@types/mocha": "8.2.3", "@types/node": "18.11.7", "@types/webpack-env": "1.16.2", - "gts": "3.1.0", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "karma": "6.3.16", "karma-chrome-launcher": "^3.1.1", From d4eb82347057ba97537c5b6960fe11e5b9a5db15 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 15 May 2023 18:00:10 +0200 Subject: [PATCH 72/84] chore(deps): update dependency rimraf to v5 (#1494) Co-authored-by: Amir Blum --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e70815c6b8..352549feaaa 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "karma-webpack": "4.0.2", "mocha": "7.2.0", "nyc": "15.1.0", - "rimraf": "4.2.0", + "rimraf": "5.0.0", "ts-loader": "8.3.0", "ts-mocha": "10.0.0", "typescript": "4.4.4", From 9af37b32a8d4adc090e76b652541f2b790f33ad9 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Tue, 16 May 2023 08:47:00 -0400 Subject: [PATCH 73/84] chore: release main (#1484) * chore: release main * chore: release main --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3104c626b76..bcba2c5f827 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.2.0...propagator-aws-xray-v1.2.1) (2023-05-16) + + +### Bug Fixes + +* **eslint-config:** replace gts with prettier and eslint ([#1439](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1439)) ([2571c37](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/2571c371be1b5738442200cab2415b6a04c32aab)) + ## [1.2.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.1.1...propagator-aws-xray-v1.2.0) (2023-02-07) diff --git a/package.json b/package.json index 352549feaaa..d08745075b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "1.2.0", + "version": "1.2.1", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", From cce1b8d8f1244e90d3c4832e07059281ebba879b Mon Sep 17 00:00:00 2001 From: Nev <54870357+MSNev@users.noreply.github.com> Date: Mon, 26 Jun 2023 22:38:49 -0700 Subject: [PATCH 74/84] feat(minification): Add importHelpers and tslib as a dependency (#1545) Co-authored-by: Marc Pichler --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d08745075b0..237589324ca 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,8 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/core": "^1.0.0" + "@opentelemetry/core": "^1.0.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/propagators/opentelemetry-propagator-aws-xray#readme" } From 09ddabaa4999f73e3769afd6c94df4eef11c18d4 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 12 Jul 2023 11:23:46 -0400 Subject: [PATCH 75/84] chore: release main (#1539) * chore: release main * chore: release main --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcba2c5f827..b40d7bb2ea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.2.1...propagator-aws-xray-v1.3.0) (2023-07-12) + + +### Features + +* **minification:** Add importHelpers and tslib as a dependency ([#1545](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1545)) ([65f612e](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/65f612e35c4d67b9935dc3a9155588b35d915482)) + ## [1.2.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.2.0...propagator-aws-xray-v1.2.1) (2023-05-16) diff --git a/package.json b/package.json index 237589324ca..427ebe670f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "1.2.1", + "version": "1.3.0", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", From d433b0c0d30f064373cf0e062c44d33c6ecbd9a6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 17 Jul 2023 11:08:42 +0200 Subject: [PATCH 76/84] chore(deps): update dependency @types/node to v18.16.19 (#1585) Co-authored-by: Haddas Bronfman <85441461+haddasbronfman@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 427ebe670f6..f2fc438a145 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@types/mocha": "8.2.3", - "@types/node": "18.11.7", + "@types/node": "18.16.19", "@types/webpack-env": "1.16.2", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "karma": "6.3.16", From 6f37e27bcb4ddc2ab7e3bf83d0bfcf0fbe31505d Mon Sep 17 00:00:00 2001 From: Haddas Bronfman <85441461+haddasbronfman@users.noreply.github.com> Date: Wed, 2 Aug 2023 09:29:58 +0300 Subject: [PATCH 77/84] chore: update patch dependencies (#1595) * fix(deps): update all patch versions * fix(hapi): fix hapi test with new @types * fix(hapi): lint --------- Co-authored-by: Mend Renovate --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f2fc438a145..d6945e6d3c1 100644 --- a/package.json +++ b/package.json @@ -57,11 +57,11 @@ "karma-chrome-launcher": "^3.1.1", "karma-coverage-istanbul-reporter": "3.0.3", "karma-mocha": "2.0.1", - "karma-spec-reporter": "0.0.32", + "karma-spec-reporter": "0.0.36", "karma-webpack": "4.0.2", "mocha": "7.2.0", "nyc": "15.1.0", - "rimraf": "5.0.0", + "rimraf": "5.0.1", "ts-loader": "8.3.0", "ts-mocha": "10.0.0", "typescript": "4.4.4", From 633de2e8d7c211ffff0880781db7462092497e57 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 2 Aug 2023 10:18:20 -0400 Subject: [PATCH 78/84] fix: Revert "feat(minification): Add importHelpers and tslib as a dependency (#1545)" (#1611) Co-authored-by: Marc Pichler --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index d6945e6d3c1..7d4fe027cbd 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,7 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/core": "^1.0.0", - "tslib": "^2.3.1" + "@opentelemetry/core": "^1.0.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/propagators/opentelemetry-propagator-aws-xray#readme" } From 96dd722300509b1a667e64108c9a9edf9eea0e9e Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 14 Aug 2023 15:32:07 -0400 Subject: [PATCH 79/84] chore: release main (#1590) * chore: release main * chore: release main --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b40d7bb2ea8..3a072e7e095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.1](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.3.0...propagator-aws-xray-v1.3.1) (2023-08-14) + + +### Bug Fixes + +* Revert "feat(minification): Add importHelpers and tslib as a dependency ([#1545](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1545))" ([#1611](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1611)) ([e5bca5f](https://github.com/open-telemetry/opentelemetry-js-contrib/commit/e5bca5fe5b27adc59c8de8fe4087d38b69d93bd4)) + ## [1.3.0](https://github.com/open-telemetry/opentelemetry-js-contrib/compare/propagator-aws-xray-v1.2.1...propagator-aws-xray-v1.3.0) (2023-07-12) diff --git a/package.json b/package.json index 7d4fe027cbd..8584b457559 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-aws-xray", - "version": "1.3.0", + "version": "1.3.1", "description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.", "main": "build/src/index.js", "module": "build/esm/index.js", From c748ffb3115e0d39aa56f3338a44e14a40e3d572 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Wed, 30 Aug 2023 11:08:00 +0300 Subject: [PATCH 80/84] chore: align @types/node to core repo and disable renovate (#1653) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8584b457559..1e1e78eef8e 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@types/mocha": "8.2.3", - "@types/node": "18.16.19", + "@types/node": "18.6.5", "@types/webpack-env": "1.16.2", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "karma": "6.3.16", From b1677f94600b46114d9427ff041b731013ba0159 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 3 Oct 2023 10:41:23 +0200 Subject: [PATCH 81/84] chore(deps): update all patch versions (#1707) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e1e78eef8e..9478aaf75bb 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "karma-webpack": "4.0.2", "mocha": "7.2.0", "nyc": "15.1.0", - "rimraf": "5.0.1", + "rimraf": "5.0.5", "ts-loader": "8.3.0", "ts-mocha": "10.0.0", "typescript": "4.4.4", From afd5f16e63364909aa4440c20d381a7a854eed81 Mon Sep 17 00:00:00 2001 From: Michele Azzolari Date: Mon, 13 Nov 2023 03:40:38 -0600 Subject: [PATCH 82/84] chore: cleanup files in package json (#1786) * chore: typo in CONTRIBUTING.md * chore: cleanup files entries in package.json (#820) * chore: add missing files entries to package.json (#820) * chore: remove useless .npmignore (#820) --------- Co-authored-by: Amir Blum --- package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index 9478aaf75bb..b208bbb9586 100644 --- a/package.json +++ b/package.json @@ -36,10 +36,7 @@ "build/esm/**/*.d.ts", "build/src/**/*.js", "build/src/**/*.js.map", - "build/src/**/*.d.ts", - "doc", - "LICENSE", - "README.md" + "build/src/**/*.d.ts" ], "publishConfig": { "access": "public" From 6d4da3398d9a6c024d92fad19605b2c3a646144f Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Thu, 16 Nov 2023 00:54:35 -0800 Subject: [PATCH 83/84] chore: use npm workspaces and a package-lock.json (#1771) Co-authored-by: Marc Pichler --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b208bbb9586..f96cceba011 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "watch": "tsc --build --watch tsconfig.json tsconfig.esm.json", - "prepare": "npm run compile" + "prepublishOnly": "npm run compile" }, "keywords": [ "opentelemetry", From 253edc3cc2abbc15a0f5183aa0836ca1ab1d2902 Mon Sep 17 00:00:00 2001 From: Martin Kuba Date: Wed, 13 Mar 2024 16:42:57 -0700 Subject: [PATCH 84/84] moved to packages folder --- .../opentelemetry-propagator-aws-xray/CHANGELOG.md | 0 LICENSE => packages/opentelemetry-propagator-aws-xray/LICENSE | 0 README.md => packages/opentelemetry-propagator-aws-xray/README.md | 0 .../opentelemetry-propagator-aws-xray/karma.conf.js | 0 .../opentelemetry-propagator-aws-xray/package.json | 0 .../opentelemetry-propagator-aws-xray/src}/AWSXRayPropagator.ts | 0 {src => packages/opentelemetry-propagator-aws-xray/src}/index.ts | 0 .../test}/AWSXRayPropagator.test.ts | 0 .../opentelemetry-propagator-aws-xray/test}/index-webpack.ts | 0 .../opentelemetry-propagator-aws-xray/tsconfig.esm.json | 0 .../opentelemetry-propagator-aws-xray/tsconfig.json | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename CHANGELOG.md => packages/opentelemetry-propagator-aws-xray/CHANGELOG.md (100%) rename LICENSE => packages/opentelemetry-propagator-aws-xray/LICENSE (100%) rename README.md => packages/opentelemetry-propagator-aws-xray/README.md (100%) rename karma.conf.js => packages/opentelemetry-propagator-aws-xray/karma.conf.js (100%) rename package.json => packages/opentelemetry-propagator-aws-xray/package.json (100%) rename {src => packages/opentelemetry-propagator-aws-xray/src}/AWSXRayPropagator.ts (100%) rename {src => packages/opentelemetry-propagator-aws-xray/src}/index.ts (100%) rename {test => packages/opentelemetry-propagator-aws-xray/test}/AWSXRayPropagator.test.ts (100%) rename {test => packages/opentelemetry-propagator-aws-xray/test}/index-webpack.ts (100%) rename tsconfig.esm.json => packages/opentelemetry-propagator-aws-xray/tsconfig.esm.json (100%) rename tsconfig.json => packages/opentelemetry-propagator-aws-xray/tsconfig.json (100%) diff --git a/CHANGELOG.md b/packages/opentelemetry-propagator-aws-xray/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to packages/opentelemetry-propagator-aws-xray/CHANGELOG.md diff --git a/LICENSE b/packages/opentelemetry-propagator-aws-xray/LICENSE similarity index 100% rename from LICENSE rename to packages/opentelemetry-propagator-aws-xray/LICENSE diff --git a/README.md b/packages/opentelemetry-propagator-aws-xray/README.md similarity index 100% rename from README.md rename to packages/opentelemetry-propagator-aws-xray/README.md diff --git a/karma.conf.js b/packages/opentelemetry-propagator-aws-xray/karma.conf.js similarity index 100% rename from karma.conf.js rename to packages/opentelemetry-propagator-aws-xray/karma.conf.js diff --git a/package.json b/packages/opentelemetry-propagator-aws-xray/package.json similarity index 100% rename from package.json rename to packages/opentelemetry-propagator-aws-xray/package.json diff --git a/src/AWSXRayPropagator.ts b/packages/opentelemetry-propagator-aws-xray/src/AWSXRayPropagator.ts similarity index 100% rename from src/AWSXRayPropagator.ts rename to packages/opentelemetry-propagator-aws-xray/src/AWSXRayPropagator.ts diff --git a/src/index.ts b/packages/opentelemetry-propagator-aws-xray/src/index.ts similarity index 100% rename from src/index.ts rename to packages/opentelemetry-propagator-aws-xray/src/index.ts diff --git a/test/AWSXRayPropagator.test.ts b/packages/opentelemetry-propagator-aws-xray/test/AWSXRayPropagator.test.ts similarity index 100% rename from test/AWSXRayPropagator.test.ts rename to packages/opentelemetry-propagator-aws-xray/test/AWSXRayPropagator.test.ts diff --git a/test/index-webpack.ts b/packages/opentelemetry-propagator-aws-xray/test/index-webpack.ts similarity index 100% rename from test/index-webpack.ts rename to packages/opentelemetry-propagator-aws-xray/test/index-webpack.ts diff --git a/tsconfig.esm.json b/packages/opentelemetry-propagator-aws-xray/tsconfig.esm.json similarity index 100% rename from tsconfig.esm.json rename to packages/opentelemetry-propagator-aws-xray/tsconfig.esm.json diff --git a/tsconfig.json b/packages/opentelemetry-propagator-aws-xray/tsconfig.json similarity index 100% rename from tsconfig.json rename to packages/opentelemetry-propagator-aws-xray/tsconfig.json