@azure/core-rest-pipeline
Advanced tools
Comparing version 1.2.1-alpha.20210819.2 to 1.2.1-alpha.20210830.2
@@ -48,9 +48,21 @@ // Copyright (c) Microsoft Corporation. | ||
function tryCreateSpan(request, userAgent) { | ||
var _a; | ||
var _a, _b, _c; | ||
try { | ||
// create a new span | ||
const tracingOptions = Object.assign(Object.assign({}, request.tracingOptions), { spanOptions: Object.assign(Object.assign({}, (_a = request.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions), { kind: SpanKind.CLIENT }) }); | ||
const createSpanOptions = Object.assign(Object.assign({}, (_a = request.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions), { kind: SpanKind.CLIENT }); | ||
const url = new URL(request.url); | ||
const path = url.pathname || "/"; | ||
const { span } = createSpan(path, { tracingOptions }); | ||
// Passing spanOptions as part of tracingOptions to maintain compatibility @azure/core-tracing@preview.13 and earlier. | ||
// We can pass this as a separate parameter once we upgrade to the latest core-tracing. | ||
const { span } = createSpan(path, { | ||
tracingOptions: Object.assign(Object.assign({}, request.tracingOptions), { spanOptions: createSpanOptions }) | ||
}); | ||
// If the span is not recording, don't do any more work. | ||
if (!span.isRecording()) { | ||
span.end(); | ||
return undefined; | ||
} | ||
const namespaceFromContext = (_c = (_b = request.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext) === null || _c === void 0 ? void 0 : _c.getValue(Symbol.for("az.namespace")); | ||
if (typeof namespaceFromContext === "string") { | ||
span.setAttribute("az.namespace", namespaceFromContext); | ||
} | ||
span.setAttributes({ | ||
@@ -57,0 +69,0 @@ "http.method": request.method, |
{ | ||
"name": "@azure/core-rest-pipeline", | ||
"version": "1.2.1-alpha.20210819.2", | ||
"version": "1.2.1-alpha.20210830.2", | ||
"description": "Isomorphic client library for making HTTP requests in node.js and browser.", | ||
@@ -30,3 +30,3 @@ "sdk-type": "client", | ||
"build:types": "downlevel-dts types/latest/ types/3.1/", | ||
"build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local && npm run build:types", | ||
"build": "npm run clean && tsc -p . && rollup -c 2>&1 && api-extractor run --local && npm run build:types", | ||
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", | ||
@@ -44,3 +44,2 @@ "clean": "rimraf dist dist-* temp types *.tgz *.log", | ||
"pack": "npm pack 2>&1", | ||
"prebuild": "npm run clean", | ||
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", | ||
@@ -92,3 +91,3 @@ "test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node", | ||
"@azure/logger": "^1.0.0", | ||
"form-data": "^3.0.0", | ||
"form-data": "^4.0.0", | ||
"tslib": "^2.2.0", | ||
@@ -95,0 +94,0 @@ "http-proxy-agent": "^4.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
572726
6074
+ Addedform-data@4.0.1(transitive)
- Removedform-data@3.0.2(transitive)
Updatedform-data@^4.0.0