From 4beb49e041e52f3e9450e52a8e3b2dc998246ed8 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Tue, 3 Aug 2021 13:50:51 -0700 Subject: [PATCH 01/14] export createSpanFunction from core-http --- sdk/core/core-http/review/core-http.api.md | 15 ++------ sdk/core/core-http/src/coreHttp.ts | 3 +- sdk/core/core-http/src/createSpanLegacy.ts | 44 ---------------------- 3 files changed, 5 insertions(+), 57 deletions(-) delete mode 100644 sdk/core/core-http/src/createSpanLegacy.ts diff --git a/sdk/core/core-http/review/core-http.api.md b/sdk/core/core-http/review/core-http.api.md index 252b55527f93..63f3bcb03c74 100644 --- a/sdk/core/core-http/review/core-http.api.md +++ b/sdk/core/core-http/review/core-http.api.md @@ -7,11 +7,12 @@ import { AbortSignalLike } from '@azure/abort-controller'; import { AccessToken } from '@azure/core-auth'; import { Context } from '@azure/core-tracing'; +import { createSpanFunction } from '@azure/core-tracing'; import { Debugger } from '@azure/logger'; import { GetTokenOptions } from '@azure/core-auth'; import { isTokenCredential } from '@azure/core-auth'; import { OperationTracingOptions } from '@azure/core-tracing'; -import { Span } from '@azure/core-tracing'; +import { CreateSpanFunctionArgs as SpanConfig } from '@azure/core-tracing'; import { SpanOptions } from '@azure/core-tracing'; import { TokenCredential } from '@azure/core-auth'; @@ -159,11 +160,7 @@ export const Constants: { // @public (undocumented) export function createPipelineFromOptions(pipelineOptions: InternalPipelineOptions, authPolicyFactory?: RequestPolicyFactory): ServiceClientOptions; -// @public @deprecated -export function createSpanFunction(args: SpanConfig): (operationName: string, operationOptions: T) => { - span: Span; - updatedOptions: T; -}; +export { createSpanFunction } // Warning: (ae-forgotten-export) The symbol "FetchHttpClient" needs to be exported by the entry point coreHttp.d.ts // @@ -806,11 +803,7 @@ export interface SimpleMapperType { name: "Base64Url" | "Boolean" | "ByteArray" | "Date" | "DateTime" | "DateTimeRfc1123" | "Object" | "Stream" | "String" | "TimeSpan" | "UnixTime" | "Uuid" | "Number" | "any"; } -// @public @deprecated -export interface SpanConfig { - namespace: string; - packagePrefix: string; -} +export { SpanConfig } // @public export function stringifyXML(obj: unknown, opts?: SerializerOptions): string; diff --git a/sdk/core/core-http/src/coreHttp.ts b/sdk/core/core-http/src/coreHttp.ts index 6e726f0cffb6..fd618c56c417 100644 --- a/sdk/core/core-http/src/coreHttp.ts +++ b/sdk/core/core-http/src/coreHttp.ts @@ -113,8 +113,7 @@ export { export { URLBuilder, URLQuery } from "./url"; export { AbortSignalLike } from "@azure/abort-controller"; export { delay } from "./util/delay"; -// legacy exports. Use core-tracing instead (and remove on next major version update of core-http). -export { createSpanFunction, SpanConfig } from "./createSpanLegacy"; +export { createSpanFunction, CreateSpanFunctionArgs as SpanConfig } from "@azure/core-tracing"; // Credentials export { TokenCredential, GetTokenOptions, AccessToken, isTokenCredential } from "@azure/core-auth"; diff --git a/sdk/core/core-http/src/createSpanLegacy.ts b/sdk/core/core-http/src/createSpanLegacy.ts deleted file mode 100644 index e1a3fef1d625..000000000000 --- a/sdk/core/core-http/src/createSpanLegacy.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -// NOTE: we've moved this code into core-tracing but these functions -// were a part of the GA'd library and can't be removed until the next major -// release. They currently get called always, even if tracing is not enabled. - -import { createSpanFunction as coreTracingCreateSpanFunction, Span } from "@azure/core-tracing"; -import { OperationOptions } from "./operationOptions"; - -/** - * This function is only here for compatibility. Use createSpanFunction in core-tracing. - * - * @deprecated This function is only here for compatibility. Use core-tracing instead. - * @hidden - */ -export interface SpanConfig { - /** - * Package name prefix - */ - packagePrefix: string; - /** - * Service namespace - */ - namespace: string; -} - -/** - * This function is only here for compatibility. Use createSpanFunction in core-tracing. - * - * @deprecated This function is only here for compatibility. Use createSpanFunction in core-tracing. - * @hidden - - * @param spanConfig - The name of the operation being performed. - * @param tracingOptions - The options for the underlying http request. - */ -export function createSpanFunction( - args: SpanConfig -): ( - operationName: string, - operationOptions: T -) => { span: Span; updatedOptions: T } { - return coreTracingCreateSpanFunction(args); -} From 14656a25645407048c12458220cecdd38f44cb2f Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Fri, 6 Aug 2021 13:00:37 -0700 Subject: [PATCH 02/14] wip --- sdk/core/core-http/review/core-http.api.md | 10 +++++ sdk/core/core-http/src/coreHttp.ts | 2 +- sdk/core/core-http/src/util/tracing.ts | 39 +++++++++++++++++++ .../review/core-rest-pipeline.api.md | 6 +++ sdk/core/core-rest-pipeline/src/index.ts | 1 + sdk/keyvault/keyvault-common/package.json | 2 +- .../keyvault-common/src/tracingHelpers.ts | 3 +- 7 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 sdk/core/core-http/src/util/tracing.ts diff --git a/sdk/core/core-http/review/core-http.api.md b/sdk/core/core-http/review/core-http.api.md index 63f3bcb03c74..6c9074eff1b8 100644 --- a/sdk/core/core-http/review/core-http.api.md +++ b/sdk/core/core-http/review/core-http.api.md @@ -12,6 +12,7 @@ import { Debugger } from '@azure/logger'; import { GetTokenOptions } from '@azure/core-auth'; import { isTokenCredential } from '@azure/core-auth'; import { OperationTracingOptions } from '@azure/core-tracing'; +import { Span } from '@azure/core-tracing'; import { CreateSpanFunctionArgs as SpanConfig } from '@azure/core-tracing'; import { SpanOptions } from '@azure/core-tracing'; import { TokenCredential } from '@azure/core-auth'; @@ -803,8 +804,17 @@ export interface SimpleMapperType { name: "Base64Url" | "Boolean" | "ByteArray" | "Date" | "DateTime" | "DateTimeRfc1123" | "Object" | "Stream" | "String" | "TimeSpan" | "UnixTime" | "Uuid" | "Number" | "any"; } +export { Span } + export { SpanConfig } +// @public (undocumented) +export const SpanStatusCode: { + UNSET: number; + OK: number; + ERROR: number; +}; + // @public export function stringifyXML(obj: unknown, opts?: SerializerOptions): string; diff --git a/sdk/core/core-http/src/coreHttp.ts b/sdk/core/core-http/src/coreHttp.ts index fd618c56c417..1515b946dc62 100644 --- a/sdk/core/core-http/src/coreHttp.ts +++ b/sdk/core/core-http/src/coreHttp.ts @@ -113,7 +113,7 @@ export { export { URLBuilder, URLQuery } from "./url"; export { AbortSignalLike } from "@azure/abort-controller"; export { delay } from "./util/delay"; -export { createSpanFunction, CreateSpanFunctionArgs as SpanConfig } from "@azure/core-tracing"; +export { Span, SpanConfig, SpanStatusCode, createSpanFunction } from "./util/tracing"; // Credentials export { TokenCredential, GetTokenOptions, AccessToken, isTokenCredential } from "@azure/core-auth"; diff --git a/sdk/core/core-http/src/util/tracing.ts b/sdk/core/core-http/src/util/tracing.ts new file mode 100644 index 000000000000..0aca9c395a7d --- /dev/null +++ b/sdk/core/core-http/src/util/tracing.ts @@ -0,0 +1,39 @@ +export { + createSpanFunction, + CreateSpanFunctionArgs, + CreateSpanFunctionArgs as SpanConfig, + Span +} from "@azure/core-tracing"; + +export const SpanStatusCode = { + UNSET: 0, + OK: 1, + ERROR: 2 +} as const; + +export const SpanKind = { + /** Default value. Indicates that the span is used internally. */ + INTERNAL: 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER: 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT: 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER: 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER: 4 +} as const; diff --git a/sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md b/sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md index a8b6b112aecc..20b10c85b22b 100644 --- a/sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md +++ b/sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md @@ -6,6 +6,8 @@ import { AbortSignalLike } from '@azure/abort-controller'; import { AccessToken } from '@azure/core-auth'; +import { createSpanFunction } from '@azure/core-tracing'; +import { CreateSpanFunctionArgs } from '@azure/core-tracing'; import { Debugger } from '@azure/logger'; import { GetTokenOptions } from '@azure/core-auth'; import { OperationTracingOptions } from '@azure/core-tracing'; @@ -77,6 +79,10 @@ export function createPipelineFromOptions(options: InternalPipelineOptions): Pip // @public export function createPipelineRequest(options: PipelineRequestOptions): PipelineRequest; +export { createSpanFunction } + +export { CreateSpanFunctionArgs } + // @public export function decompressResponsePolicy(): PipelinePolicy; diff --git a/sdk/core/core-rest-pipeline/src/index.ts b/sdk/core/core-rest-pipeline/src/index.ts index e09acca87f9e..f767ae47d49a 100644 --- a/sdk/core/core-rest-pipeline/src/index.ts +++ b/sdk/core/core-rest-pipeline/src/index.ts @@ -72,3 +72,4 @@ export { AuthorizeRequestOnChallengeOptions } from "./policies/bearerTokenAuthenticationPolicy"; export { ndJsonPolicy, ndJsonPolicyName } from "./policies/ndJsonPolicy"; +export { createSpanFunction, CreateSpanFunctionArgs } from "@azure/core-tracing"; diff --git a/sdk/keyvault/keyvault-common/package.json b/sdk/keyvault/keyvault-common/package.json index 5b33284ab088..deca2424ae24 100644 --- a/sdk/keyvault/keyvault-common/package.json +++ b/sdk/keyvault/keyvault-common/package.json @@ -58,11 +58,11 @@ }, "dependencies": { "@azure/core-http": "^2.0.0", - "@azure/core-tracing": "1.0.0-preview.13", "tslib": "^2.2.0" }, "devDependencies": { "@azure/test-utils": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.13", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "eslint": "^7.15.0", "prettier": "^1.16.4", diff --git a/sdk/keyvault/keyvault-common/src/tracingHelpers.ts b/sdk/keyvault/keyvault-common/src/tracingHelpers.ts index 564942a77a9e..8335ebf69ded 100644 --- a/sdk/keyvault/keyvault-common/src/tracingHelpers.ts +++ b/sdk/keyvault/keyvault-common/src/tracingHelpers.ts @@ -1,8 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { OperationOptions } from "@azure/core-http"; -import { createSpanFunction, Span, SpanStatusCode } from "@azure/core-tracing"; +import { OperationOptions, createSpanFunction, Span, SpanStatusCode } from "@azure/core-http"; /** * An interface representing a function that is traced. From a29f9922d3004f84a9c4ca107cf80e6658a952b8 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Wed, 11 Aug 2021 14:59:58 -0700 Subject: [PATCH 03/14] migrated one core-http and one core-rest-pipeline packages --- common/config/rush/common-versions.json | 1 + .../core-client/review/core-client.api.md | 25 ++++++++++ sdk/core/core-client/src/index.ts | 7 ++- sdk/core/core-client/src/interfaces.ts | 48 +++++++++++++++++++ sdk/core/core-http/review/core-http.api.md | 17 +++++-- sdk/core/core-http/src/coreHttp.ts | 2 +- sdk/core/core-http/src/util/tracing.ts | 14 +++++- .../review/core-rest-pipeline.api.md | 6 --- sdk/core/core-rest-pipeline/src/index.ts | 1 - sdk/keyvault/keyvault-admin/package.json | 4 +- .../keyvault-admin/src/tracingHelpers.ts | 2 +- .../keyvault-certificates/package.json | 1 - .../perf-tests/keyvault-keys/package.json | 2 +- 13 files changed, 111 insertions(+), 19 deletions(-) diff --git a/common/config/rush/common-versions.json b/common/config/rush/common-versions.json index fe08c421e687..de6d2b67add9 100644 --- a/common/config/rush/common-versions.json +++ b/common/config/rush/common-versions.json @@ -89,5 +89,6 @@ "prettier": [ "2.2.1" ] + } } diff --git a/sdk/core/core-client/review/core-client.api.md b/sdk/core/core-client/review/core-client.api.md index 93e52f8c0ebe..2f9a2d230c32 100644 --- a/sdk/core/core-client/review/core-client.api.md +++ b/sdk/core/core-client/review/core-client.api.md @@ -5,6 +5,8 @@ ```ts import { AbortSignalLike } from '@azure/abort-controller'; +import { createSpanFunction } from '@azure/core-tracing'; +import { CreateSpanFunctionArgs } from '@azure/core-tracing'; import { HttpClient } from '@azure/core-rest-pipeline'; import { HttpMethods } from '@azure/core-rest-pipeline'; import { InternalPipelineOptions } from '@azure/core-rest-pipeline'; @@ -14,6 +16,7 @@ import { PipelineOptions } from '@azure/core-rest-pipeline'; import { PipelinePolicy } from '@azure/core-rest-pipeline'; import { PipelineRequest } from '@azure/core-rest-pipeline'; import { PipelineResponse } from '@azure/core-rest-pipeline'; +import { Span } from '@azure/core-tracing'; import { TokenCredential } from '@azure/core-auth'; import { TransferProgressEvent } from '@azure/core-rest-pipeline'; @@ -73,6 +76,10 @@ export function createSerializer(modelMappers?: { [key: string]: any; }, isXML?: boolean): Serializer; +export { createSpanFunction } + +export { CreateSpanFunctionArgs } + // @public export interface DeserializationContentTypes { json?: string[]; @@ -365,12 +372,30 @@ export interface SimpleMapperType { name: "Base64Url" | "Boolean" | "ByteArray" | "Date" | "DateTime" | "DateTimeRfc1123" | "Object" | "Stream" | "String" | "TimeSpan" | "UnixTime" | "Uuid" | "Number" | "any"; } +export { Span } + // @public export interface SpanConfig { namespace: string; packagePrefix: string; } +// @public +export const SpanKind: { + readonly INTERNAL: 0; + readonly SERVER: 1; + readonly CLIENT: 2; + readonly PRODUCER: 3; + readonly CONSUMER: 4; +}; + +// @public +export const SpanStatusCode: { + readonly UNSET: 0; + readonly OK: 1; + readonly ERROR: 2; +}; + // @public export const XML_ATTRKEY = "$"; diff --git a/sdk/core/core-client/src/index.ts b/sdk/core/core-client/src/index.ts index de6d200d993b..71946d8549a9 100644 --- a/sdk/core/core-client/src/index.ts +++ b/sdk/core/core-client/src/index.ts @@ -39,7 +39,12 @@ export { XmlOptions, SerializerOptions, RawResponseCallback, - CommonClientOptions + CommonClientOptions, + CreateSpanFunctionArgs, + Span, + SpanKind, + SpanStatusCode, + createSpanFunction } from "./interfaces"; export { deserializationPolicy, diff --git a/sdk/core/core-client/src/interfaces.ts b/sdk/core/core-client/src/interfaces.ts index b8dc9dab2d93..e7c8ea902b84 100644 --- a/sdk/core/core-client/src/interfaces.ts +++ b/sdk/core/core-client/src/interfaces.ts @@ -3,6 +3,7 @@ import { AbortSignalLike } from "@azure/abort-controller"; import { OperationTracingOptions } from "@azure/core-tracing"; +import { createSpanFunction, CreateSpanFunctionArgs, Span } from "@azure/core-tracing"; import { HttpMethods, PipelineResponse, @@ -559,3 +560,50 @@ export interface CommonClientOptions extends PipelineOptions { */ allowInsecureConnection?: boolean; } + +export { createSpanFunction, CreateSpanFunctionArgs, Span }; + +/** The values supported by {@link Span.setStatus} */ +export const SpanStatusCode = { + /** + * The default status. + */ + UNSET: 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ + OK: 1, + /** + * The operation contains an error. + */ + ERROR: 2 +} as const; + +/** The values supported by {@link Span.setTag} */ +export const SpanKind = { + /** Default value. Indicates that the span is used internally. */ + INTERNAL: 0, + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER: 1, + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT: 2, + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER: 3, + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER: 4 +} as const; diff --git a/sdk/core/core-http/review/core-http.api.md b/sdk/core/core-http/review/core-http.api.md index 6c9074eff1b8..e88a9acf8240 100644 --- a/sdk/core/core-http/review/core-http.api.md +++ b/sdk/core/core-http/review/core-http.api.md @@ -808,11 +808,20 @@ export { Span } export { SpanConfig } -// @public (undocumented) +// @public +export const SpanKind: { + readonly INTERNAL: 0; + readonly SERVER: 1; + readonly CLIENT: 2; + readonly PRODUCER: 3; + readonly CONSUMER: 4; +}; + +// @public export const SpanStatusCode: { - UNSET: number; - OK: number; - ERROR: number; + readonly UNSET: 0; + readonly OK: 1; + readonly ERROR: 2; }; // @public diff --git a/sdk/core/core-http/src/coreHttp.ts b/sdk/core/core-http/src/coreHttp.ts index 1515b946dc62..0777ce38b1e4 100644 --- a/sdk/core/core-http/src/coreHttp.ts +++ b/sdk/core/core-http/src/coreHttp.ts @@ -113,7 +113,7 @@ export { export { URLBuilder, URLQuery } from "./url"; export { AbortSignalLike } from "@azure/abort-controller"; export { delay } from "./util/delay"; -export { Span, SpanConfig, SpanStatusCode, createSpanFunction } from "./util/tracing"; +export { Span, SpanConfig, SpanStatusCode, createSpanFunction, SpanKind } from "./util/tracing"; // Credentials export { TokenCredential, GetTokenOptions, AccessToken, isTokenCredential } from "@azure/core-auth"; diff --git a/sdk/core/core-http/src/util/tracing.ts b/sdk/core/core-http/src/util/tracing.ts index 0aca9c395a7d..9ade5b2451b6 100644 --- a/sdk/core/core-http/src/util/tracing.ts +++ b/sdk/core/core-http/src/util/tracing.ts @@ -1,16 +1,28 @@ export { createSpanFunction, CreateSpanFunctionArgs, - CreateSpanFunctionArgs as SpanConfig, + CreateSpanFunctionArgs as SpanConfig, // for backwards compatibility Span } from "@azure/core-tracing"; +/** The values supported by {@link Span.setStatus} */ export const SpanStatusCode = { + /** + * The default status. + */ UNSET: 0, + /** + * The operation has been validated by an Application developer or + * Operator to have completed successfully. + */ OK: 1, + /** + * The operation contains an error. + */ ERROR: 2 } as const; +/** The values supported by {@link Span.setTag} */ export const SpanKind = { /** Default value. Indicates that the span is used internally. */ INTERNAL: 0, diff --git a/sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md b/sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md index 20b10c85b22b..a8b6b112aecc 100644 --- a/sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md +++ b/sdk/core/core-rest-pipeline/review/core-rest-pipeline.api.md @@ -6,8 +6,6 @@ import { AbortSignalLike } from '@azure/abort-controller'; import { AccessToken } from '@azure/core-auth'; -import { createSpanFunction } from '@azure/core-tracing'; -import { CreateSpanFunctionArgs } from '@azure/core-tracing'; import { Debugger } from '@azure/logger'; import { GetTokenOptions } from '@azure/core-auth'; import { OperationTracingOptions } from '@azure/core-tracing'; @@ -79,10 +77,6 @@ export function createPipelineFromOptions(options: InternalPipelineOptions): Pip // @public export function createPipelineRequest(options: PipelineRequestOptions): PipelineRequest; -export { createSpanFunction } - -export { CreateSpanFunctionArgs } - // @public export function decompressResponsePolicy(): PipelinePolicy; diff --git a/sdk/core/core-rest-pipeline/src/index.ts b/sdk/core/core-rest-pipeline/src/index.ts index f767ae47d49a..e09acca87f9e 100644 --- a/sdk/core/core-rest-pipeline/src/index.ts +++ b/sdk/core/core-rest-pipeline/src/index.ts @@ -72,4 +72,3 @@ export { AuthorizeRequestOnChallengeOptions } from "./policies/bearerTokenAuthenticationPolicy"; export { ndJsonPolicy, ndJsonPolicyName } from "./policies/ndJsonPolicy"; -export { createSpanFunction, CreateSpanFunctionArgs } from "@azure/core-tracing"; diff --git a/sdk/keyvault/keyvault-admin/package.json b/sdk/keyvault/keyvault-admin/package.json index dffdc9982f0a..c61688e814d0 100644 --- a/sdk/keyvault/keyvault-admin/package.json +++ b/sdk/keyvault/keyvault-admin/package.json @@ -110,7 +110,6 @@ "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", "@azure/core-rest-pipeline": "^1.1.0", - "@azure/core-tracing": "1.0.0-preview.13", "@azure/logger": "^1.0.0", "@types/uuid": "^8.0.0", "tslib": "^2.2.0", @@ -118,11 +117,12 @@ }, "devDependencies": { "@azure/abort-controller": "^1.0.0", + "@azure/core-tracing": "1.0.0-preview.13", "@azure/core-util": "^1.0.0-beta.1", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "2.0.0-beta.4", - "@azure/keyvault-keys": "^4.2.1", + "@azure/keyvault-keys": "^4.3.0", "@azure/test-utils": "^1.0.0", "@azure/test-utils-recorder": "^1.0.0", "@microsoft/api-extractor": "7.7.11", diff --git a/sdk/keyvault/keyvault-admin/src/tracingHelpers.ts b/sdk/keyvault/keyvault-admin/src/tracingHelpers.ts index a20a3f97ce31..bf141b2c49bf 100644 --- a/sdk/keyvault/keyvault-admin/src/tracingHelpers.ts +++ b/sdk/keyvault/keyvault-admin/src/tracingHelpers.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { OperationOptions } from "@azure/core-client"; -import { createSpanFunction, Span, SpanStatusCode } from "@azure/core-tracing"; +import { createSpanFunction, Span, SpanStatusCode } from "@azure/core-client"; /** * An interface representing a function that is traced. diff --git a/sdk/keyvault/keyvault-certificates/package.json b/sdk/keyvault/keyvault-certificates/package.json index 9e9307ded09d..27f07d793e58 100644 --- a/sdk/keyvault/keyvault-certificates/package.json +++ b/sdk/keyvault/keyvault-certificates/package.json @@ -111,7 +111,6 @@ "@azure/core-http": "^2.0.0", "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", - "@azure/core-tracing": "1.0.0-preview.13", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" }, diff --git a/sdk/keyvault/perf-tests/keyvault-keys/package.json b/sdk/keyvault/perf-tests/keyvault-keys/package.json index 07a2cfb9fe1c..6314644dc822 100644 --- a/sdk/keyvault/perf-tests/keyvault-keys/package.json +++ b/sdk/keyvault/perf-tests/keyvault-keys/package.json @@ -8,7 +8,7 @@ "license": "ISC", "dependencies": { "@azure/test-utils-perfstress": "^1.0.0", - "@azure/keyvault-keys": "^4.2.1", + "@azure/keyvault-keys": "^4.3.0", "dotenv": "^8.2.0", "@azure/identity": "2.0.0-beta.5", "uuid": "^8.3.0" From b45473f330515b18d2531fbcc4287a412fdd6f05 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Wed, 11 Aug 2021 15:10:11 -0700 Subject: [PATCH 04/14] move secrets over --- sdk/core/core-lro/package.json | 1 - sdk/keyvault/keyvault-secrets/package.json | 1 - 2 files changed, 2 deletions(-) diff --git a/sdk/core/core-lro/package.json b/sdk/core/core-lro/package.json index 512ea39b29b8..db45f0cce4f8 100644 --- a/sdk/core/core-lro/package.json +++ b/sdk/core/core-lro/package.json @@ -91,7 +91,6 @@ "sideEffects": false, "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-tracing": "1.0.0-preview.13", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" }, diff --git a/sdk/keyvault/keyvault-secrets/package.json b/sdk/keyvault/keyvault-secrets/package.json index c47cf6267685..f6f32f2c4e0e 100644 --- a/sdk/keyvault/keyvault-secrets/package.json +++ b/sdk/keyvault/keyvault-secrets/package.json @@ -107,7 +107,6 @@ "@azure/core-http": "^2.0.0", "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", - "@azure/core-tracing": "1.0.0-preview.13", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" }, From 087ad5ceddb2293b1c427f6f148b429b972f2be1 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Wed, 11 Aug 2021 16:02:03 -0700 Subject: [PATCH 05/14] remove unnecessary tracing reference --- sdk/keyvault/keyvault-keys/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/keyvault/keyvault-keys/package.json b/sdk/keyvault/keyvault-keys/package.json index a9dfce00a399..f1a83631fc2c 100644 --- a/sdk/keyvault/keyvault-keys/package.json +++ b/sdk/keyvault/keyvault-keys/package.json @@ -107,7 +107,6 @@ "@azure/core-http": "^2.0.0", "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", - "@azure/core-tracing": "1.0.0-preview.13", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" }, From edd3354301fe73def461be639c9da57da3fcc2c6 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Wed, 11 Aug 2021 16:03:21 -0700 Subject: [PATCH 06/14] lint --- sdk/core/core-http/src/util/tracing.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/core/core-http/src/util/tracing.ts b/sdk/core/core-http/src/util/tracing.ts index 9ade5b2451b6..6f0b83fd046a 100644 --- a/sdk/core/core-http/src/util/tracing.ts +++ b/sdk/core/core-http/src/util/tracing.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + export { createSpanFunction, CreateSpanFunctionArgs, From 42bca320aad13a0c69cf6514079afed1356d4548 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Thu, 12 Aug 2021 08:06:46 -0700 Subject: [PATCH 07/14] re-export SpanKind and SpanStatusCode from core-tracing --- sdk/core/core-client/src/interfaces.ts | 55 ++++------------------ sdk/core/core-http/review/core-http.api.md | 18 ++----- sdk/core/core-http/src/util/tracing.ts | 49 ++----------------- sdk/keyvault/keyvault-keys/package.json | 1 + 4 files changed, 16 insertions(+), 107 deletions(-) diff --git a/sdk/core/core-client/src/interfaces.ts b/sdk/core/core-client/src/interfaces.ts index e7c8ea902b84..c57e5dd0d2b9 100644 --- a/sdk/core/core-client/src/interfaces.ts +++ b/sdk/core/core-client/src/interfaces.ts @@ -3,7 +3,13 @@ import { AbortSignalLike } from "@azure/abort-controller"; import { OperationTracingOptions } from "@azure/core-tracing"; -import { createSpanFunction, CreateSpanFunctionArgs, Span } from "@azure/core-tracing"; +import { + createSpanFunction, + CreateSpanFunctionArgs, + Span, + SpanKind, + SpanStatusCode +} from "@azure/core-tracing"; import { HttpMethods, PipelineResponse, @@ -561,49 +567,4 @@ export interface CommonClientOptions extends PipelineOptions { allowInsecureConnection?: boolean; } -export { createSpanFunction, CreateSpanFunctionArgs, Span }; - -/** The values supported by {@link Span.setStatus} */ -export const SpanStatusCode = { - /** - * The default status. - */ - UNSET: 0, - /** - * The operation has been validated by an Application developer or - * Operator to have completed successfully. - */ - OK: 1, - /** - * The operation contains an error. - */ - ERROR: 2 -} as const; - -/** The values supported by {@link Span.setTag} */ -export const SpanKind = { - /** Default value. Indicates that the span is used internally. */ - INTERNAL: 0, - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote request. - */ - SERVER: 1, - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - */ - CLIENT: 2, - /** - * Indicates that the span describes producer sending a message to a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - PRODUCER: 3, - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - CONSUMER: 4 -} as const; +export { createSpanFunction, CreateSpanFunctionArgs, Span, SpanKind, SpanStatusCode }; diff --git a/sdk/core/core-http/review/core-http.api.md b/sdk/core/core-http/review/core-http.api.md index e88a9acf8240..91140ce144de 100644 --- a/sdk/core/core-http/review/core-http.api.md +++ b/sdk/core/core-http/review/core-http.api.md @@ -14,7 +14,9 @@ import { isTokenCredential } from '@azure/core-auth'; import { OperationTracingOptions } from '@azure/core-tracing'; import { Span } from '@azure/core-tracing'; import { CreateSpanFunctionArgs as SpanConfig } from '@azure/core-tracing'; +import { SpanKind } from '@azure/core-tracing'; import { SpanOptions } from '@azure/core-tracing'; +import { SpanStatusCode } from '@azure/core-tracing'; import { TokenCredential } from '@azure/core-auth'; export { AbortSignalLike } @@ -808,21 +810,9 @@ export { Span } export { SpanConfig } -// @public -export const SpanKind: { - readonly INTERNAL: 0; - readonly SERVER: 1; - readonly CLIENT: 2; - readonly PRODUCER: 3; - readonly CONSUMER: 4; -}; +export { SpanKind } -// @public -export const SpanStatusCode: { - readonly UNSET: 0; - readonly OK: 1; - readonly ERROR: 2; -}; +export { SpanStatusCode } // @public export function stringifyXML(obj: unknown, opts?: SerializerOptions): string; diff --git a/sdk/core/core-http/src/util/tracing.ts b/sdk/core/core-http/src/util/tracing.ts index 6f0b83fd046a..f12205493d4d 100644 --- a/sdk/core/core-http/src/util/tracing.ts +++ b/sdk/core/core-http/src/util/tracing.ts @@ -5,50 +5,7 @@ export { createSpanFunction, CreateSpanFunctionArgs, CreateSpanFunctionArgs as SpanConfig, // for backwards compatibility - Span + Span, + SpanStatusCode, + SpanKind } from "@azure/core-tracing"; - -/** The values supported by {@link Span.setStatus} */ -export const SpanStatusCode = { - /** - * The default status. - */ - UNSET: 0, - /** - * The operation has been validated by an Application developer or - * Operator to have completed successfully. - */ - OK: 1, - /** - * The operation contains an error. - */ - ERROR: 2 -} as const; - -/** The values supported by {@link Span.setTag} */ -export const SpanKind = { - /** Default value. Indicates that the span is used internally. */ - INTERNAL: 0, - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote request. - */ - SERVER: 1, - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - */ - CLIENT: 2, - /** - * Indicates that the span describes producer sending a message to a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - PRODUCER: 3, - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - CONSUMER: 4 -} as const; diff --git a/sdk/keyvault/keyvault-keys/package.json b/sdk/keyvault/keyvault-keys/package.json index f1a83631fc2c..ce32d8b4d651 100644 --- a/sdk/keyvault/keyvault-keys/package.json +++ b/sdk/keyvault/keyvault-keys/package.json @@ -111,6 +111,7 @@ "tslib": "^2.2.0" }, "devDependencies": { + "@azure/core-tracing": "1.0.0-preview.13", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "2.0.0-beta.4", From 3cf5a1aa99af55d5b455cbcb24e007f6d21512f4 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Thu, 12 Aug 2021 08:08:18 -0700 Subject: [PATCH 08/14] one lonely line... --- common/config/rush/common-versions.json | 1 - 1 file changed, 1 deletion(-) diff --git a/common/config/rush/common-versions.json b/common/config/rush/common-versions.json index de6d2b67add9..fe08c421e687 100644 --- a/common/config/rush/common-versions.json +++ b/common/config/rush/common-versions.json @@ -89,6 +89,5 @@ "prettier": [ "2.2.1" ] - } } From edc19e19da3b3e486c9bc189017cb38fbb951a22 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Thu, 12 Aug 2021 08:11:51 -0700 Subject: [PATCH 09/14] remove CreateSpanFunctionArgs --- sdk/core/core-client/src/interfaces.ts | 10 ++-------- sdk/core/core-http/src/util/tracing.ts | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/sdk/core/core-client/src/interfaces.ts b/sdk/core/core-client/src/interfaces.ts index c57e5dd0d2b9..05e2e3d75b41 100644 --- a/sdk/core/core-client/src/interfaces.ts +++ b/sdk/core/core-client/src/interfaces.ts @@ -3,13 +3,7 @@ import { AbortSignalLike } from "@azure/abort-controller"; import { OperationTracingOptions } from "@azure/core-tracing"; -import { - createSpanFunction, - CreateSpanFunctionArgs, - Span, - SpanKind, - SpanStatusCode -} from "@azure/core-tracing"; +import { createSpanFunction, Span, SpanKind, SpanStatusCode } from "@azure/core-tracing"; import { HttpMethods, PipelineResponse, @@ -567,4 +561,4 @@ export interface CommonClientOptions extends PipelineOptions { allowInsecureConnection?: boolean; } -export { createSpanFunction, CreateSpanFunctionArgs, Span, SpanKind, SpanStatusCode }; +export { createSpanFunction, Span, SpanKind, SpanStatusCode }; diff --git a/sdk/core/core-http/src/util/tracing.ts b/sdk/core/core-http/src/util/tracing.ts index f12205493d4d..26ee60229c59 100644 --- a/sdk/core/core-http/src/util/tracing.ts +++ b/sdk/core/core-http/src/util/tracing.ts @@ -3,7 +3,6 @@ export { createSpanFunction, - CreateSpanFunctionArgs, CreateSpanFunctionArgs as SpanConfig, // for backwards compatibility Span, SpanStatusCode, From b31c06c622f9ba045724be7bedebab00a8607341 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Thu, 12 Aug 2021 09:42:49 -0700 Subject: [PATCH 10/14] core-client updates --- .../core-client/review/core-client.api.md | 21 ++++--------------- sdk/core/core-client/src/index.ts | 1 - 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/sdk/core/core-client/review/core-client.api.md b/sdk/core/core-client/review/core-client.api.md index 2f9a2d230c32..2b83fb037e90 100644 --- a/sdk/core/core-client/review/core-client.api.md +++ b/sdk/core/core-client/review/core-client.api.md @@ -6,7 +6,6 @@ import { AbortSignalLike } from '@azure/abort-controller'; import { createSpanFunction } from '@azure/core-tracing'; -import { CreateSpanFunctionArgs } from '@azure/core-tracing'; import { HttpClient } from '@azure/core-rest-pipeline'; import { HttpMethods } from '@azure/core-rest-pipeline'; import { InternalPipelineOptions } from '@azure/core-rest-pipeline'; @@ -17,6 +16,8 @@ import { PipelinePolicy } from '@azure/core-rest-pipeline'; import { PipelineRequest } from '@azure/core-rest-pipeline'; import { PipelineResponse } from '@azure/core-rest-pipeline'; import { Span } from '@azure/core-tracing'; +import { SpanKind } from '@azure/core-tracing'; +import { SpanStatusCode } from '@azure/core-tracing'; import { TokenCredential } from '@azure/core-auth'; import { TransferProgressEvent } from '@azure/core-rest-pipeline'; @@ -78,8 +79,6 @@ export function createSerializer(modelMappers?: { export { createSpanFunction } -export { CreateSpanFunctionArgs } - // @public export interface DeserializationContentTypes { json?: string[]; @@ -380,21 +379,9 @@ export interface SpanConfig { packagePrefix: string; } -// @public -export const SpanKind: { - readonly INTERNAL: 0; - readonly SERVER: 1; - readonly CLIENT: 2; - readonly PRODUCER: 3; - readonly CONSUMER: 4; -}; +export { SpanKind } -// @public -export const SpanStatusCode: { - readonly UNSET: 0; - readonly OK: 1; - readonly ERROR: 2; -}; +export { SpanStatusCode } // @public export const XML_ATTRKEY = "$"; diff --git a/sdk/core/core-client/src/index.ts b/sdk/core/core-client/src/index.ts index 71946d8549a9..d15ad0c03f39 100644 --- a/sdk/core/core-client/src/index.ts +++ b/sdk/core/core-client/src/index.ts @@ -40,7 +40,6 @@ export { SerializerOptions, RawResponseCallback, CommonClientOptions, - CreateSpanFunctionArgs, Span, SpanKind, SpanStatusCode, From aee03823d9b879e6ffa17a1efde59033e66aaea0 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Fri, 13 Aug 2021 08:43:21 -0700 Subject: [PATCH 11/14] wip --- sdk/core/core-client/review/core-client.api.md | 2 ++ sdk/core/core-client/src/index.ts | 1 + sdk/core/core-client/src/interfaces.ts | 2 +- sdk/core/core-http/review/core-http.api.md | 10 +++++++--- sdk/core/core-http/src/coreHttp.ts | 10 +++++++++- sdk/core/core-http/src/util/tracing.ts | 4 +++- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/sdk/core/core-client/review/core-client.api.md b/sdk/core/core-client/review/core-client.api.md index 2b83fb037e90..acae323c050f 100644 --- a/sdk/core/core-client/review/core-client.api.md +++ b/sdk/core/core-client/review/core-client.api.md @@ -275,6 +275,8 @@ export interface OperationSpec { readonly urlParameters?: ReadonlyArray; } +export { OperationTracingOptions } + // @public export interface OperationURLParameter extends OperationParameter { skipEncoding?: boolean; diff --git a/sdk/core/core-client/src/index.ts b/sdk/core/core-client/src/index.ts index d15ad0c03f39..17172b686735 100644 --- a/sdk/core/core-client/src/index.ts +++ b/sdk/core/core-client/src/index.ts @@ -42,6 +42,7 @@ export { CommonClientOptions, Span, SpanKind, + OperationTracingOptions, SpanStatusCode, createSpanFunction } from "./interfaces"; diff --git a/sdk/core/core-client/src/interfaces.ts b/sdk/core/core-client/src/interfaces.ts index 05e2e3d75b41..2cab2383dd38 100644 --- a/sdk/core/core-client/src/interfaces.ts +++ b/sdk/core/core-client/src/interfaces.ts @@ -561,4 +561,4 @@ export interface CommonClientOptions extends PipelineOptions { allowInsecureConnection?: boolean; } -export { createSpanFunction, Span, SpanKind, SpanStatusCode }; +export { createSpanFunction, Span, SpanKind, SpanStatusCode, OperationTracingOptions }; diff --git a/sdk/core/core-http/review/core-http.api.md b/sdk/core/core-http/review/core-http.api.md index 91140ce144de..5d8f91512cbd 100644 --- a/sdk/core/core-http/review/core-http.api.md +++ b/sdk/core/core-http/review/core-http.api.md @@ -8,12 +8,12 @@ import { AbortSignalLike } from '@azure/abort-controller'; import { AccessToken } from '@azure/core-auth'; import { Context } from '@azure/core-tracing'; import { createSpanFunction } from '@azure/core-tracing'; +import { CreateSpanFunctionArgs } from '@azure/core-tracing'; import { Debugger } from '@azure/logger'; import { GetTokenOptions } from '@azure/core-auth'; import { isTokenCredential } from '@azure/core-auth'; import { OperationTracingOptions } from '@azure/core-tracing'; import { Span } from '@azure/core-tracing'; -import { CreateSpanFunctionArgs as SpanConfig } from '@azure/core-tracing'; import { SpanKind } from '@azure/core-tracing'; import { SpanOptions } from '@azure/core-tracing'; import { SpanStatusCode } from '@azure/core-tracing'; @@ -165,6 +165,10 @@ export function createPipelineFromOptions(pipelineOptions: InternalPipelineOptio export { createSpanFunction } +export { CreateSpanFunctionArgs } + +export { CreateSpanFunctionArgs as SpanConfig } + // Warning: (ae-forgotten-export) The symbol "FetchHttpClient" needs to be exported by the entry point coreHttp.d.ts // // @public (undocumented) @@ -505,6 +509,8 @@ export interface OperationSpec { readonly urlParameters?: ReadonlyArray; } +export { OperationTracingOptions } + // @public export interface OperationURLParameter extends OperationParameter { skipEncoding?: boolean; @@ -808,8 +814,6 @@ export interface SimpleMapperType { export { Span } -export { SpanConfig } - export { SpanKind } export { SpanStatusCode } diff --git a/sdk/core/core-http/src/coreHttp.ts b/sdk/core/core-http/src/coreHttp.ts index 0777ce38b1e4..af06f16a8c76 100644 --- a/sdk/core/core-http/src/coreHttp.ts +++ b/sdk/core/core-http/src/coreHttp.ts @@ -113,7 +113,15 @@ export { export { URLBuilder, URLQuery } from "./url"; export { AbortSignalLike } from "@azure/abort-controller"; export { delay } from "./util/delay"; -export { Span, SpanConfig, SpanStatusCode, createSpanFunction, SpanKind } from "./util/tracing"; +export { + Span, + SpanConfig, + SpanStatusCode, + createSpanFunction, + SpanKind, + CreateSpanFunctionArgs, + OperationTracingOptions +} from "./util/tracing"; // Credentials export { TokenCredential, GetTokenOptions, AccessToken, isTokenCredential } from "@azure/core-auth"; diff --git a/sdk/core/core-http/src/util/tracing.ts b/sdk/core/core-http/src/util/tracing.ts index 26ee60229c59..07c29927b961 100644 --- a/sdk/core/core-http/src/util/tracing.ts +++ b/sdk/core/core-http/src/util/tracing.ts @@ -3,8 +3,10 @@ export { createSpanFunction, + CreateSpanFunctionArgs, CreateSpanFunctionArgs as SpanConfig, // for backwards compatibility Span, SpanStatusCode, - SpanKind + SpanKind, + OperationTracingOptions } from "@azure/core-tracing"; From a5e1e2055f25ff82defdee72c73e190301d000b0 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Fri, 13 Aug 2021 08:52:38 -0700 Subject: [PATCH 12/14] wip --- common/config/rush/pnpm-lock.yaml | 24 +++---- .../src/operations/deployments.ts | 23 +++---- .../src/operations/updates.ts | 66 +++++-------------- 3 files changed, 37 insertions(+), 76 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 3e7db2cdca2c..0e4dd792966b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -603,20 +603,20 @@ packages: node: '>=8.0.0' resolution: integrity: sha512-5Y8WgETz0lnAoksk8qpEOJ6PBnPV8edscusKiwbfm7rfadsfm1rl+kZPJP8YrjkY+bfnMNeixVZHe8QB5Mpa8Q== - /@azure/keyvault-keys/4.2.2: + /@azure/keyvault-keys/4.3.0: dependencies: '@azure/abort-controller': 1.0.4 - '@azure/core-http': 1.2.6 - '@azure/core-lro': 1.0.5 + '@azure/core-http': 2.0.0 + '@azure/core-lro': 2.1.0 '@azure/core-paging': 1.1.3 - '@azure/core-tracing': 1.0.0-preview.11 + '@azure/core-tracing': 1.0.0-preview.13 '@azure/logger': 1.0.2 tslib: 2.3.0 dev: false engines: node: '>=8.0.0' resolution: - integrity: sha512-SWRx0Z8ShLYnuqCitIOi3DqLSLBTI6G1F+Wv5/hy1w6ZXRnOwc74deQ8kfO0Tbm3n09SpaN4ytp6dmg6C2cRmQ== + integrity: sha512-OEosl0/rE/mKD5Ji9KaQN7UH+yQnV5MS0MRhGqQIiJrG+qAvAla0MYudJzv3XvBlplpGk0+MVgyL9H3KX/UAwQ== /@azure/keyvault-secrets/4.2.0: dependencies: '@azure/abort-controller': 1.0.4 @@ -9754,7 +9754,7 @@ packages: dev: false name: '@rush-temp/core-lro' resolution: - integrity: sha512-NKGKcVkQq77E2dNBLMGvX3XKfoUspXmK7ozUe81I/hNJ1mX7kHTQ3/SV59NyKCjPoo+VTouUCWxoIgIvbIeHdg== + integrity: sha512-Y2f1/wq45+YJ5+b/fGG4iq5/71zNaMWWG0BA5R8Twwl+JnuEOnRmyumNlNsE4Hk+CI4ae9j+9q5gSqXpCI9AQA== tarball: file:projects/core-lro.tgz version: 0.0.0 file:projects/core-paging.tgz: @@ -10694,7 +10694,7 @@ packages: dependencies: '@azure/core-tracing': 1.0.0-preview.13 '@azure/identity': 2.0.0-beta.4 - '@azure/keyvault-keys': 4.2.2 + '@azure/keyvault-keys': 4.3.0 '@microsoft/api-extractor': 7.7.11 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 '@rollup/plugin-json': 4.1.0_rollup@1.32.1 @@ -10733,7 +10733,7 @@ packages: dev: false name: '@rush-temp/keyvault-admin' resolution: - integrity: sha512-4Sad+EJvcdIpngD18lwX00p0mmCXdXDW2ORKKHEmoibtPifUEGjeLj6rAmjp7ASENfVUZOKrUL0TDlEnZsnWnA== + integrity: sha512-2z1j71wQm+CA1yCpv6ynbeRx1O81rSn5c2Iq9ixJPUtcWzlUlqlPoD0lZe8pUG4AZgllp/TkHzFKXMnI6w8Sbw== tarball: file:projects/keyvault-admin.tgz version: 0.0.0 file:projects/keyvault-certificates.tgz: @@ -10791,7 +10791,7 @@ packages: dev: false name: '@rush-temp/keyvault-certificates' resolution: - integrity: sha512-it16rS6uGe4Z5tFyX4yxkuBpApC+ZbRtE3pokXvcoSl2IIFRamKQBjJYDXTmdYC0ThdjaMLrNkml7T5F2TclOw== + integrity: sha512-zoNQZQ4IZd/RByVuCzAPguoOGTyRSjFcUq3A2UGZ2+gqVBxzqDO/D+hcBm2HTj6k4GQ9F/kOqUTjq0sG5akQqQ== tarball: file:projects/keyvault-certificates.tgz version: 0.0.0 file:projects/keyvault-common.tgz: @@ -10922,7 +10922,7 @@ packages: dev: false name: '@rush-temp/keyvault-secrets' resolution: - integrity: sha512-sB13JiMVhsiOxR/k1TRi8+WlJ1qNem5+7bFyrm4tbQepgLOfVgQ5GGJkkPJ+AqbZUYkLsHguIfvxrtQDdHlAVA== + integrity: sha512-b5NL934qZfLpp6MKDL9M8uR5x0b2VCsWXqKUKSjshAc8Z9A3YQoNAT/ue/Vr/sTppAMn+2ViypgU1CBRlAiEsQ== tarball: file:projects/keyvault-secrets.tgz version: 0.0.0 file:projects/logger.tgz: @@ -11310,7 +11310,7 @@ packages: version: 0.0.0 file:projects/perf-keyvault-keys.tgz: dependencies: - '@azure/keyvault-keys': 4.2.2 + '@azure/keyvault-keys': 4.3.0 '@types/uuid': 8.3.1 dotenv: 8.6.0 eslint: 7.31.0 @@ -11323,7 +11323,7 @@ packages: dev: false name: '@rush-temp/perf-keyvault-keys' resolution: - integrity: sha512-9fQgixzmC5EXGxuFD9cFsUOewEzvxv6bGIrc0RI+B4wsbvH5T+kYhn3gl5WhHz387mEL4/UsmrXZ7sIn0brQUQ== + integrity: sha512-91/Tx4OHQGYIZj11JvQSbw2MIOZ56eBLPlpoIGSgij03GN0WUccmDGUdLRVxrn3dgZ3MLIIg7ESSZLINuHCbyA== tarball: file:projects/perf-keyvault-keys.tgz version: 0.0.0 file:projects/perf-keyvault-secrets.tgz: diff --git a/sdk/deviceupdate/iot-device-update/src/operations/deployments.ts b/sdk/deviceupdate/iot-device-update/src/operations/deployments.ts index bc6dd19af942..bc636b65f5dd 100644 --- a/sdk/deviceupdate/iot-device-update/src/operations/deployments.ts +++ b/sdk/deviceupdate/iot-device-update/src/operations/deployments.ts @@ -141,7 +141,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getAllDeployments", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { options: updatedOptions @@ -172,10 +172,7 @@ export class Deployments { deploymentId: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getDeployment", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getDeployment", options || {}); const operationArguments: coreHttp.OperationArguments = { deploymentId, options: updatedOptions @@ -210,7 +207,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-createOrUpdateDeployment", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { deploymentId, @@ -245,7 +242,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-deleteDeployment", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { deploymentId, @@ -280,7 +277,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-getDeploymentStatus", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { deploymentId, @@ -315,7 +312,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getDeploymentDevices", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { deploymentId, @@ -349,7 +346,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-cancelDeployment", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { deploymentId, @@ -383,7 +380,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-retryDeployment", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { deploymentId, @@ -417,7 +414,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getAllDeploymentsNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { nextLink, @@ -453,7 +450,7 @@ export class Deployments { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getDeploymentDevicesNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { deploymentId, diff --git a/sdk/deviceupdate/iot-device-update/src/operations/updates.ts b/sdk/deviceupdate/iot-device-update/src/operations/updates.ts index 73a074be1dcf..cdb987ca8bec 100644 --- a/sdk/deviceupdate/iot-device-update/src/operations/updates.ts +++ b/sdk/deviceupdate/iot-device-update/src/operations/updates.ts @@ -292,10 +292,7 @@ export class Updates { updateToImport: ImportUpdateInput, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-importUpdate", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-importUpdate", options || {}); const operationArguments: coreHttp.OperationArguments = { updateToImport, options: updatedOptions @@ -330,10 +327,7 @@ export class Updates { version: string, options?: UpdatesGetUpdateOptionalParams ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getUpdate", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getUpdate", options || {}); const operationArguments: coreHttp.OperationArguments = { provider, name, @@ -370,10 +364,7 @@ export class Updates { version: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-deleteUpdate", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-deleteUpdate", options || {}); const operationArguments: coreHttp.OperationArguments = { provider, name, @@ -404,10 +395,7 @@ export class Updates { private async _getProviders( options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getProviders", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getProviders", options || {}); const operationArguments: coreHttp.OperationArguments = { options: updatedOptions }; @@ -437,10 +425,7 @@ export class Updates { provider: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getNames", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getNames", options || {}); const operationArguments: coreHttp.OperationArguments = { provider, options: updatedOptions @@ -473,10 +458,7 @@ export class Updates { name: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getVersions", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getVersions", options || {}); const operationArguments: coreHttp.OperationArguments = { provider, name, @@ -512,10 +494,7 @@ export class Updates { version: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getFiles", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getFiles", options || {}); const operationArguments: coreHttp.OperationArguments = { provider, name, @@ -554,10 +533,7 @@ export class Updates { fileId: string, options?: UpdatesGetFileOptionalParams ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getFile", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getFile", options || {}); const operationArguments: coreHttp.OperationArguments = { provider, name, @@ -590,10 +566,7 @@ export class Updates { private async _getOperations( options?: UpdatesGetOperationsOptionalParams ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getOperations", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getOperations", options || {}); const operationArguments: coreHttp.OperationArguments = { options: updatedOptions }; @@ -623,10 +596,7 @@ export class Updates { operationId: string, options?: UpdatesGetOperationOptionalParams ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getOperation", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getOperation", options || {}); const operationArguments: coreHttp.OperationArguments = { operationId, options: updatedOptions @@ -659,7 +629,7 @@ export class Updates { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getProvidersNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { nextLink, @@ -693,10 +663,7 @@ export class Updates { nextLink: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getNamesNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getNamesNext", options || {}); const operationArguments: coreHttp.OperationArguments = { provider, nextLink, @@ -734,7 +701,7 @@ export class Updates { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getVersionsNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { provider, @@ -774,10 +741,7 @@ export class Updates { nextLink: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getFilesNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getFilesNext", options || {}); const operationArguments: coreHttp.OperationArguments = { provider, name, @@ -813,7 +777,7 @@ export class Updates { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getOperationsNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options || {} ); const operationArguments: coreHttp.OperationArguments = { nextLink, From 003395c862681eb1622e54b00baffd6b9347d43a Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Fri, 13 Aug 2021 09:42:11 -0700 Subject: [PATCH 13/14] fix iot-device-update --- .../src/operations/devices.ts | 130 ++++++------------ 1 file changed, 44 insertions(+), 86 deletions(-) diff --git a/sdk/deviceupdate/iot-device-update/src/operations/devices.ts b/sdk/deviceupdate/iot-device-update/src/operations/devices.ts index 22967b6141bb..ebd582346dab 100644 --- a/sdk/deviceupdate/iot-device-update/src/operations/devices.ts +++ b/sdk/deviceupdate/iot-device-update/src/operations/devices.ts @@ -379,12 +379,9 @@ export class Devices { private async _getAllDeviceClasses( options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getAllDeviceClasses", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getAllDeviceClasses", options); const operationArguments: coreHttp.OperationArguments = { - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -412,13 +409,10 @@ export class Devices { deviceClassId: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getDeviceClass", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getDeviceClass", options); const operationArguments: coreHttp.OperationArguments = { deviceClassId, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -448,11 +442,11 @@ export class Devices { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getDeviceClassDeviceIds", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options ); const operationArguments: coreHttp.OperationArguments = { deviceClassId, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -482,11 +476,11 @@ export class Devices { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getDeviceClassInstallableUpdates", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options ); const operationArguments: coreHttp.OperationArguments = { deviceClassId, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -512,12 +506,9 @@ export class Devices { private async _getAllDevices( options?: DevicesGetAllDevicesOptionalParams ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getAllDevices", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getAllDevices", options); const operationArguments: coreHttp.OperationArguments = { - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -546,13 +537,10 @@ export class Devices { deviceId: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getDevice", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getDevice", options); const operationArguments: coreHttp.OperationArguments = { deviceId, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -579,12 +567,9 @@ export class Devices { async getUpdateCompliance( options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getUpdateCompliance", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getUpdateCompliance", options); const operationArguments: coreHttp.OperationArguments = { - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -610,12 +595,9 @@ export class Devices { private async _getAllDeviceTags( options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getAllDeviceTags", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getAllDeviceTags", options); const operationArguments: coreHttp.OperationArguments = { - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -643,13 +625,10 @@ export class Devices { tagName: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getDeviceTag", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getDeviceTag", options); const operationArguments: coreHttp.OperationArguments = { tagName, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -675,12 +654,9 @@ export class Devices { private async _getAllGroups( options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getAllGroups", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getAllGroups", options); const operationArguments: coreHttp.OperationArguments = { - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -708,13 +684,10 @@ export class Devices { groupId: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-getGroup", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-getGroup", options); const operationArguments: coreHttp.OperationArguments = { groupId, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -744,14 +717,11 @@ export class Devices { group: Group, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-createOrUpdateGroup", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-createOrUpdateGroup", options); const operationArguments: coreHttp.OperationArguments = { groupId, group, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -779,13 +749,10 @@ export class Devices { groupId: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-deleteGroup", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-deleteGroup", options); const operationArguments: coreHttp.OperationArguments = { groupId, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -816,11 +783,11 @@ export class Devices { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-getGroupUpdateCompliance", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options ); const operationArguments: coreHttp.OperationArguments = { groupId, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -848,13 +815,10 @@ export class Devices { groupId: string, options?: DevicesGetGroupBestUpdatesOptionalParams ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getGroupBestUpdates", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getGroupBestUpdates", options); const operationArguments: coreHttp.OperationArguments = { groupId, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -884,11 +848,11 @@ export class Devices { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getAllDeviceClassesNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options ); const operationArguments: coreHttp.OperationArguments = { nextLink, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -921,12 +885,12 @@ export class Devices { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getDeviceClassDeviceIdsNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options ); const operationArguments: coreHttp.OperationArguments = { deviceClassId, nextLink, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -959,12 +923,12 @@ export class Devices { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getDeviceClassInstallableUpdatesNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options ); const operationArguments: coreHttp.OperationArguments = { deviceClassId, nextLink, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -992,13 +956,10 @@ export class Devices { nextLink: string, options?: DevicesGetAllDevicesNextOptionalParams ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getAllDevicesNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getAllDevicesNext", options); const operationArguments: coreHttp.OperationArguments = { nextLink, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -1028,11 +989,11 @@ export class Devices { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getAllDeviceTagsNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options ); const operationArguments: coreHttp.OperationArguments = { nextLink, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -1060,13 +1021,10 @@ export class Devices { nextLink: string, options?: coreHttp.OperationOptions ): Promise { - const { span, updatedOptions } = createSpan( - "DeviceUpdateClient-_getAllGroupsNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) - ); + const { span, updatedOptions } = createSpan("DeviceUpdateClient-_getAllGroupsNext", options); const operationArguments: coreHttp.OperationArguments = { nextLink, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( @@ -1098,12 +1056,12 @@ export class Devices { ): Promise { const { span, updatedOptions } = createSpan( "DeviceUpdateClient-_getGroupBestUpdatesNext", - coreHttp.operationOptionsToRequestOptionsBase(options || {}) + options ); const operationArguments: coreHttp.OperationArguments = { groupId, nextLink, - options: updatedOptions + options: coreHttp.operationOptionsToRequestOptionsBase(updatedOptions) }; try { const result = await this.client.sendOperationRequest( From 0cc3f94a76ba91db599b6a9c0a01a78b998f0ef6 Mon Sep 17 00:00:00 2001 From: Maor Leger Date: Fri, 13 Aug 2021 10:16:43 -0700 Subject: [PATCH 14/14] update keyvault-secrets --- sdk/keyvault/keyvault-certificates/package.json | 1 + sdk/keyvault/keyvault-secrets/package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/sdk/keyvault/keyvault-certificates/package.json b/sdk/keyvault/keyvault-certificates/package.json index 27f07d793e58..677979dada08 100644 --- a/sdk/keyvault/keyvault-certificates/package.json +++ b/sdk/keyvault/keyvault-certificates/package.json @@ -115,6 +115,7 @@ "tslib": "^2.2.0" }, "devDependencies": { + "@azure/core-tracing": "1.0.0-preview.13", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "2.0.0-beta.5", diff --git a/sdk/keyvault/keyvault-secrets/package.json b/sdk/keyvault/keyvault-secrets/package.json index f6f32f2c4e0e..81111e2a110a 100644 --- a/sdk/keyvault/keyvault-secrets/package.json +++ b/sdk/keyvault/keyvault-secrets/package.json @@ -111,6 +111,7 @@ "tslib": "^2.2.0" }, "devDependencies": { + "@azure/core-tracing": "1.0.0-preview.13", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/identity": "2.0.0-beta.5",