@azure/core-rest-pipeline 1.4.0 → 1.4.1-alpha.20220120.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/core-rest-pipeline.shims-3_1.d.ts +2 -0
- package/core-rest-pipeline.shims.d.ts +2 -0
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/fetchHttpClient.js +236 -0
- package/dist-esm/src/fetchHttpClient.js.map +1 -0
- package/dist-esm/src/interfaces.js.map +1 -1
- package/dist-esm/src/pipelineRequest.js +2 -1
- package/dist-esm/src/pipelineRequest.js.map +1 -1
- package/dist-esm/src/policies/tracingPolicy.js +2 -4
- package/dist-esm/src/policies/tracingPolicy.js.map +1 -1
- package/dist-esm/src/xhrHttpClient.js +0 -1
- package/dist-esm/src/xhrHttpClient.js.map +1 -1
- package/package.json +8 -8
- package/types/3.1/core-rest-pipeline.d.ts +33 -4
- package/types/latest/core-rest-pipeline.d.ts +29 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
## 1.4.1 (Unreleased)
|
|
4
|
+
|
|
5
|
+
### Features Added
|
|
6
|
+
|
|
7
|
+
### Breaking Changes
|
|
8
|
+
|
|
9
|
+
### Bugs Fixed
|
|
10
|
+
|
|
11
|
+
- Updated the HTTP tracing span names to conform to the [OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#name). [#19838](https://github.com/Azure/azure-sdk-for-js/pull/19838)
|
|
12
|
+
- New HTTP spans will use the `HTTP <VERB>` convention instead of using the URL path.
|
|
13
|
+
|
|
14
|
+
### Other Changes
|
|
15
|
+
|
|
3
16
|
## 1.4.0 (2022-01-06)
|
|
4
17
|
|
|
5
18
|
### Features Added
|
package/dist/index.js
CHANGED
|
@@ -847,7 +847,7 @@ function setPlatformSpecificData(map) {
|
|
|
847
847
|
|
|
848
848
|
// Copyright (c) Microsoft Corporation.
|
|
849
849
|
// Licensed under the MIT license.
|
|
850
|
-
const SDK_VERSION = "1.
|
|
850
|
+
const SDK_VERSION = "1.4.1";
|
|
851
851
|
|
|
852
852
|
// Copyright (c) Microsoft Corporation.
|
|
853
853
|
function getUserAgentString(telemetryInfo) {
|
|
@@ -920,11 +920,10 @@ function tryCreateSpan(request, userAgent) {
|
|
|
920
920
|
var _a, _b, _c;
|
|
921
921
|
try {
|
|
922
922
|
const createSpanOptions = Object.assign(Object.assign({}, (_a = request.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions), { kind: coreTracing.SpanKind.CLIENT });
|
|
923
|
-
const url$1 = new url.URL(request.url);
|
|
924
|
-
const path = url$1.pathname || "/";
|
|
925
923
|
// Passing spanOptions as part of tracingOptions to maintain compatibility @azure/core-tracing@preview.13 and earlier.
|
|
926
924
|
// We can pass this as a separate parameter once we upgrade to the latest core-tracing.
|
|
927
|
-
|
|
925
|
+
// As per spec, we do not need to differentiate between HTTP and HTTPS in span name.
|
|
926
|
+
const { span } = createSpan(`HTTP ${request.method}`, {
|
|
928
927
|
tracingOptions: Object.assign(Object.assign({}, request.tracingOptions), { spanOptions: createSpanOptions }),
|
|
929
928
|
});
|
|
930
929
|
// If the span is not recording, don't do any more work.
|
|
@@ -1720,7 +1719,7 @@ function generateUuid() {
|
|
|
1720
1719
|
// Copyright (c) Microsoft Corporation.
|
|
1721
1720
|
class PipelineRequestImpl {
|
|
1722
1721
|
constructor(options) {
|
|
1723
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1722
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1724
1723
|
this.url = options.url;
|
|
1725
1724
|
this.body = options.body;
|
|
1726
1725
|
this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : createHttpHeaders();
|
|
@@ -1737,6 +1736,7 @@ class PipelineRequestImpl {
|
|
|
1737
1736
|
this.onDownloadProgress = options.onDownloadProgress;
|
|
1738
1737
|
this.requestId = options.requestId || generateUuid();
|
|
1739
1738
|
this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false;
|
|
1739
|
+
this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false;
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
1742
|
/**
|