New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws/otel-aws-xray-propagator

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws/otel-aws-xray-propagator - npm Package Compare versions

Comparing version 0.12.0 to 0.12.1

32

build/src/AWSXRayPropagator.js
"use strict";
/*
* Copyright The OpenTelemetry Authors
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* 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
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* https://www.apache.org/licenses/LICENSE-2.0
* 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.
* or in the "license" file accompanying this file. This file 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.
*
*/

@@ -48,9 +48,6 @@ Object.defineProperty(exports, "__esModule", { value: true });

inject(context, carrier, setter) {
console.log('context(inject): ' + JSON.stringify(context));
const spanContext = core_1.getParentSpanContext(context);
console.log('spanContext(inject): ' + JSON.stringify(spanContext));
if (!spanContext || !core_1.isValid(spanContext))
return;
const otTraceId = spanContext.traceId;
console.log('inject traceId: ' + otTraceId);
const xrayTraceId = TRACE_ID_VERSION +

@@ -75,10 +72,6 @@ TRACE_ID_DELIMITER +

samplingFlag;
console.log('inject traceHeader: ' + traceHeader);
setter(carrier, exports.AWSXRAY_TRACE_ID_HEADER, traceHeader);
console.log('carrier(inject): ' + JSON.stringify(carrier));
}
extract(context, carrier, getter) {
console.log('context(extract): ' + JSON.stringify(context));
const spanContext = this.getSpanContextFromHeader(carrier, getter);
console.log('spanContext(extract): ' + JSON.stringify(spanContext));
if (!core_1.isValid(spanContext))

@@ -92,4 +85,2 @@ return context;

: getter(carrier, exports.AWSXRAY_TRACE_ID_HEADER.toLowerCase());
console.log('carrier(extract): ' + JSON.stringify(carrier));
console.log('traceHeader(extract): ' + traceHeader);
// Only if the returned traceHeader is no empty string can be extracted

@@ -126,5 +117,2 @@ if (!traceHeader || typeof traceHeader !== 'string')

}
console.log('parsedTraceId(extract): ' + parsedTraceId);
console.log('parsedSpanId(extract): ' + parsedSpanId);
console.log('parsedTraceFlags(extract): ' + parsedTraceFlags);
if (parsedTraceFlags === null) {

@@ -131,0 +119,0 @@ return core_1.INVALID_SPAN_CONTEXT;

"use strict";
/*
* Copyright The OpenTelemetry Authors
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* 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
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* https://www.apache.org/licenses/LICENSE-2.0
* 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.
* or in the "license" file accompanying this file. This file 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.
*
*/

@@ -17,0 +17,0 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

@@ -1,2 +0,2 @@

export declare const VERSION = "0.12.0";
export declare const VERSION = "0.12.1";
//# sourceMappingURL=version.d.ts.map
"use strict";
/*
* Copyright The OpenTelemetry Authors
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* 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
* Licensed under the Apache License, Version 2.0 (the "License'").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* https://www.apache.org/licenses/LICENSE-2.0
* 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.
* or in the "license" file accompanying this file. This file 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.
*/

@@ -20,3 +20,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.12.0';
exports.VERSION = '0.12.1';
//# sourceMappingURL=version.js.map
{
"name": "@aws/otel-aws-xray-propagator",
"version": "0.12.0",
"version": "0.12.1",
"description": "OpenTelemetry AWS Xray propagator provides HTTP header propagation for systems that are using AWS Xray HTTP header format.",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"repository": "aws-opentelemetry/aws-otel-js",
"repository": "aws-observability/aws-otel-js",
"scripts": {

@@ -9,0 +9,0 @@ "test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/index-webpack.ts'",

@@ -19,3 +19,3 @@ # OpenTelemetry Propagator AWS X-Ray

const { propagation } = require("@opentelemetry/api");
const { AwsXRayPropagator } = require('@aws-observability/propagator-aws-xray');
const { AWSXRayPropagator } = require('@aws/otel-aws-xray-propagator');
// ...

@@ -25,7 +25,7 @@

// set global propagator
propagation.setGlobalPropagator(new AwsXRayPropagator());
propagation.setGlobalPropagator(new AWSXRayPropagator());
// ...}
```
For more details, see the Getting Started guide.
For more details, see the [Getting Started guide](https://aws-otel.github.io/docs/getting-started/javascript-sdk).

@@ -32,0 +32,0 @@ ### Propagator Details

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc