diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 2da5cabd56ee..e1dd75424075 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -6,7 +6,7 @@ lockfileVersion: 5.2 packages: /@azure/abort-controller/1.0.2: dependencies: - tslib: 2.1.0 + tslib: 2.3.0 dev: false engines: node: '>=8.0.0' @@ -19,18 +19,18 @@ packages: /@azure/core-auth/1.3.0: dependencies: '@azure/abort-controller': 1.0.2 - tslib: 2.1.0 + tslib: 2.3.0 dev: false engines: node: '>=8.0.0' resolution: integrity: sha512-kSDSZBL6c0CYdhb+7KuutnKGf2geeT+bCJAgccB0DD7wmNJSsQPcF7TcuoZX83B7VK4tLz/u+8sOO/CnCsYp8A== - /@azure/core-http/1.2.4: + /@azure/core-http/2.0.0: dependencies: '@azure/abort-controller': 1.0.2 '@azure/core-asynciterator-polyfill': 1.0.0 '@azure/core-auth': 1.3.0 - '@azure/core-tracing': 1.0.0-preview.11 + '@azure/core-tracing': 1.0.0-preview.12 '@azure/logger': 1.0.1 '@types/node-fetch': 2.5.8 '@types/tunnel': 0.0.1 @@ -38,28 +38,27 @@ packages: node-fetch: 2.6.1 process: 0.11.10 tough-cookie: 4.0.0 - tslib: 2.1.0 + tslib: 2.3.0 tunnel: 0.0.6 uuid: 8.3.2 xml2js: 0.4.23 dev: false engines: - node: '>=8.0.0' + node: '>=12.0.0' resolution: - integrity: sha512-cNumz3ckyFZY5zWOgcTHSO7AKRVwxbodG8WfcEGcdH+ZJL3KvJEI/vN58H6xk5v3ijulU2x/WPGJqrMVvcI79A== - /@azure/core-tracing/1.0.0-preview.11: + integrity: sha512-VBOfUh0z9ZF1WVqrLCtiGWMjkKic171p6mLXRkJKu+p5wuQTb4cU3bPq7nB6UuGAK17LI7hnU0SzydlCQrBuOw== + /@azure/core-tracing/1.0.0-preview.12: dependencies: - '@opencensus/web-types': 0.0.7 - '@opentelemetry/api': 1.0.0-rc.0 - tslib: 2.1.0 + '@opentelemetry/api': 1.0.1 + tslib: 2.3.0 dev: false engines: - node: '>=8.0.0' + node: '>=12.0.0' resolution: - integrity: sha512-frF0pJc9HTmKncVokhBxCqipjbql02DThQ1ZJ9wLi7SDMLdPAFyDI5xZNzX5guLz+/DtPkY+SGK2li9FIXqshQ== + integrity: sha512-nvo2Wc4EKZGN6eFu9n3U7OXmASmL8VxoPIH7xaD6OlQqi44bouF0YIi9ID5rEsKLiAU59IYx6M297nqWVMWPDg== /@azure/logger/1.0.1: dependencies: - tslib: 2.1.0 + tslib: 2.3.0 dev: false engines: node: '>=8.0.0' @@ -328,12 +327,6 @@ packages: node: '>= 8' resolution: integrity: sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== - /@opencensus/web-types/0.0.7: - dev: false - engines: - node: '>=6.0' - resolution: - integrity: sha512-xB+w7ZDAu3YBzqH44rCmG9/RlrOmFuDPt/bpf17eJr8eZSrLt7nc7LnWdxM9Mmoj/YKMHpxRg28txu3TcpiL+g== /@opentelemetry/api/0.10.2: dependencies: '@opentelemetry/context-base': 0.10.2 @@ -342,12 +335,12 @@ packages: node: '>=8.0.0' resolution: integrity: sha512-GtpMGd6vkzDMYcpu2t9LlhEgMy/SzBwRnz48EejlRArYqZzqSzAsKmegUK7zHgl+EOIaK9mKHhnRaQu3qw20cA== - /@opentelemetry/api/1.0.0-rc.0: + /@opentelemetry/api/1.0.1: dev: false engines: node: '>=8.0.0' resolution: - integrity: sha512-iXKByCMfrlO5S6Oh97BuM56tM2cIBB0XsL/vWF/AtJrJEKx4MC/Xdu0xDsGXMGcNWpqF7ujMsjjnp0+UHBwnDQ== + integrity: sha512-H5Djcc2txGAINgf3TNaq4yFofYSIK3722PM89S/3R8FuI/eqi1UscajlXk7EBkG9s2pxss/q6SHlpturaavXaw== /@opentelemetry/context-base/0.10.2: dev: false engines: @@ -4471,10 +4464,10 @@ packages: dev: false resolution: integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - /tslib/2.1.0: + /tslib/2.3.0: dev: false resolution: - integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== /tsutils/3.20.0_typescript@4.1.2: dependencies: tslib: 1.14.1 @@ -4989,7 +4982,7 @@ packages: prettier: 1.19.1 rimraf: 3.0.2 source-map-support: 0.5.19 - tslib: 2.1.0 + tslib: 2.3.0 typedoc: 0.15.2 typescript: 4.1.2 dev: false @@ -5001,8 +4994,8 @@ packages: file:projects/identity.tgz: dependencies: '@azure/abort-controller': 1.0.2 - '@azure/core-http': 1.2.4 - '@azure/core-tracing': 1.0.0-preview.11 + '@azure/core-http': 2.0.0 + '@azure/core-tracing': 1.0.0-preview.12 '@azure/logger': 1.0.1 '@azure/msal-node': 1.0.0-beta.6 '@microsoft/api-extractor': 7.7.11 @@ -5056,7 +5049,7 @@ packages: rollup-plugin-visualizer: 4.2.0_rollup@1.32.1 sinon: 9.2.4 stoppable: 1.1.0 - tslib: 2.1.0 + tslib: 2.3.0 typedoc: 0.15.2 typescript: 4.1.2 util: 0.12.3 @@ -5066,7 +5059,7 @@ packages: optionalDependencies: keytar: 7.3.0 resolution: - integrity: sha512-6wWxGl4021kG/bTAL33B/ojPLnJHylQc6yiQkVF8NMPkCFk/9Qm92Afm+ovifB04u8bfiJz9InfQDO8MLFVDnA== + integrity: sha512-T+8AeUtmtH1AG6a0IygS0sUh8FlDuYF3qzo3Y1b/0ca25N7pfjZxkDCqEZt5t1clJEnyarQjhN3MM2LBMpglMA== tarball: file:projects/identity.tgz version: 0.0.0 registry: '' diff --git a/sdk/identity/identity/CHANGELOG.md b/sdk/identity/identity/CHANGELOG.md index 743ebbfd9b1d..25626ce5a02d 100644 --- a/sdk/identity/identity/CHANGELOG.md +++ b/sdk/identity/identity/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.4.0 (2021-07-09) + +- With this release, we drop support for Node.js versions that have reached the end of life, like Node.js 8. Read our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. +- Updated the default timeout of the first request of the IMDS MSI from half a second to three seconds to compensate for the slowness caused by `node-fetch` for initial requests in specific environments, like Kubernetes pods. +- Upgraded `@azure/core-http` to version `^2.0.0`, and `@azure/core-tracing` to version `1.0.0-preview.12`. + ## 1.3.0 (2021-04-05) ### Breaking Changes diff --git a/sdk/identity/identity/README.md b/sdk/identity/identity/README.md index b4ab400f69f1..2f9292b039e2 100644 --- a/sdk/identity/identity/README.md +++ b/sdk/identity/identity/README.md @@ -8,6 +8,12 @@ You can find examples for these various credentials in [Azure Identity Examples ## Getting started +### Currently supported environments + +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge, and Firefox. + - Note: Among the different credentials exported in this library, `InteractiveBrowserCredential` is the only one that is supported in the browser. + ### Install the package Install Azure Identity with `npm`: diff --git a/sdk/identity/identity/package.json b/sdk/identity/identity/package.json index 9e096c6a437c..755d463cd713 100644 --- a/sdk/identity/identity/package.json +++ b/sdk/identity/identity/package.json @@ -1,7 +1,7 @@ { "name": "@azure/identity", "sdk-type": "client", - "version": "1.3.0", + "version": "1.4.0", "description": "Provides credential implementations for Azure SDK libraries that can authenticate with Azure Active Directory", "main": "dist/index.js", "module": "dist-esm/src/index.js", @@ -55,7 +55,7 @@ "LICENSE" ], "engines": { - "node": ">=8.0.0" + "node": ">=12.0.0" }, "repository": "github:Azure/azure-sdk-for-js", "keywords": [ @@ -74,14 +74,11 @@ "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, - "engine": { - "node": ">=8.0.0" - }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity/README.md", "sideEffects": false, "dependencies": { - "@azure/core-http": "^1.2.4", - "@azure/core-tracing": "1.0.0-preview.11", + "@azure/core-http": "^2.0.0", + "@azure/core-tracing": "1.0.0-preview.12", "@azure/logger": "^1.0.0", "@azure/msal-node": "1.0.0-beta.6", "@types/stoppable": "^1.1.0", diff --git a/sdk/identity/identity/src/client/identityClient.ts b/sdk/identity/identity/src/client/identityClient.ts index 7c80048c9b43..2ff9cbba5f35 100644 --- a/sdk/identity/identity/src/client/identityClient.ts +++ b/sdk/identity/identity/src/client/identityClient.ts @@ -126,7 +126,10 @@ export class IdentityClient extends ServiceClient implements INetworkModule { `IdentityClient: refreshing access token with client ID: ${clientId}, scopes: ${scopes} started` ); - const { span, updatedOptions: newOptions } = createSpan("IdentityClient-refreshAccessToken", options); + const { span, updatedOptions: newOptions } = createSpan( + "IdentityClient-refreshAccessToken", + options + ); const refreshParams = { grant_type: "refresh_token", diff --git a/sdk/identity/identity/src/credentials/authorizationCodeCredential.ts b/sdk/identity/identity/src/credentials/authorizationCodeCredential.ts index e854f20f1303..fdd81571eae6 100644 --- a/sdk/identity/identity/src/credentials/authorizationCodeCredential.ts +++ b/sdk/identity/identity/src/credentials/authorizationCodeCredential.ts @@ -179,7 +179,7 @@ export class AuthorizationCodeCredential implements TokenCredential { }, abortSignal: options && options.abortSignal, spanOptions: newOptions.tracingOptions && newOptions.tracingOptions.spanOptions, - tracingContext: newOptions.tracingOptions && newOptions.tracingOptions.tracingContext, + tracingContext: newOptions.tracingOptions && newOptions.tracingOptions.tracingContext }); tokenResponse = await this.identityClient.sendTokenRequest(webResource); diff --git a/sdk/identity/identity/src/credentials/chainedTokenCredential.ts b/sdk/identity/identity/src/credentials/chainedTokenCredential.ts index 9c166d115bfb..246aa22da3b9 100644 --- a/sdk/identity/identity/src/credentials/chainedTokenCredential.ts +++ b/sdk/identity/identity/src/credentials/chainedTokenCredential.ts @@ -58,7 +58,10 @@ export class ChainedTokenCredential implements TokenCredential { let token = null; const errors = []; - const { span, updatedOptions: newOptions } = createSpan("ChainedTokenCredential-getToken", options); + const { span, updatedOptions: newOptions } = createSpan( + "ChainedTokenCredential-getToken", + options + ); for (let i = 0; i < this._sources.length && token === null; i++) { try { diff --git a/sdk/identity/identity/src/credentials/clientCertificateCredential.ts b/sdk/identity/identity/src/credentials/clientCertificateCredential.ts index 5ab068dffb30..5cee51854dfe 100644 --- a/sdk/identity/identity/src/credentials/clientCertificateCredential.ts +++ b/sdk/identity/identity/src/credentials/clientCertificateCredential.ts @@ -172,7 +172,7 @@ export class ClientCertificateCredential implements TokenCredential { }, abortSignal: options && options.abortSignal, spanOptions: newOptions.tracingOptions && newOptions.tracingOptions.spanOptions, - tracingContext: newOptions.tracingOptions && newOptions.tracingOptions.tracingContext, + tracingContext: newOptions.tracingOptions && newOptions.tracingOptions.tracingContext }); const tokenResponse = await this.identityClient.sendTokenRequest(webResource); diff --git a/sdk/identity/identity/src/credentials/clientSecretCredential.ts b/sdk/identity/identity/src/credentials/clientSecretCredential.ts index d98cb5841011..dd721879b6de 100644 --- a/sdk/identity/identity/src/credentials/clientSecretCredential.ts +++ b/sdk/identity/identity/src/credentials/clientSecretCredential.ts @@ -61,7 +61,10 @@ export class ClientSecretCredential implements TokenCredential { scopes: string | string[], options?: GetTokenOptions ): Promise { - const { span, updatedOptions: newOptions } = createSpan("ClientSecretCredential-getToken", options); + const { span, updatedOptions: newOptions } = createSpan( + "ClientSecretCredential-getToken", + options + ); try { const urlSuffix = getIdentityTokenEndpointSuffix(this.tenantId); const webResource = this.identityClient.createWebResource({ @@ -82,7 +85,7 @@ export class ClientSecretCredential implements TokenCredential { }, abortSignal: options && options.abortSignal, spanOptions: newOptions.tracingOptions && newOptions.tracingOptions.spanOptions, - tracingContext: newOptions.tracingOptions && newOptions.tracingOptions.tracingContext, + tracingContext: newOptions.tracingOptions && newOptions.tracingOptions.tracingContext }); const tokenResponse = await this.identityClient.sendTokenRequest(webResource); diff --git a/sdk/identity/identity/src/credentials/environmentCredential.ts b/sdk/identity/identity/src/credentials/environmentCredential.ts index dbac2e423041..bb80bed8be25 100644 --- a/sdk/identity/identity/src/credentials/environmentCredential.ts +++ b/sdk/identity/identity/src/credentials/environmentCredential.ts @@ -5,10 +5,7 @@ import { AccessToken, TokenCredential, GetTokenOptions } from "@azure/core-http" import { TokenCredentialOptions } from "../client/identityClient"; import { ClientSecretCredential } from "./clientSecretCredential"; import { createSpan } from "../util/tracing"; -import { - AuthenticationError, - CredentialUnavailable -} from "../client/errors"; +import { AuthenticationError, CredentialUnavailable } from "../client/errors"; import { SpanStatusCode } from "@azure/core-tracing"; import { ClientCertificateCredential } from "./clientCertificateCredential"; import { UsernamePasswordCredential } from "./usernamePasswordCredential"; @@ -121,7 +118,10 @@ export class EnvironmentCredential implements TokenCredential { scopes: string | string[], options?: GetTokenOptions ): Promise { - const { span, updatedOptions: newOptions } = createSpan("EnvironmentCredential-getToken", options); + const { span, updatedOptions: newOptions } = createSpan( + "EnvironmentCredential-getToken", + options + ); if (this._credential) { try { const result = await this._credential.getToken(scopes, newOptions); diff --git a/sdk/identity/identity/src/credentials/managedIdentityCredential/arcMsi.ts b/sdk/identity/identity/src/credentials/managedIdentityCredential/arcMsi.ts index da0039ca6ebf..5cc596bb6ee7 100644 --- a/sdk/identity/identity/src/credentials/managedIdentityCredential/arcMsi.ts +++ b/sdk/identity/identity/src/credentials/managedIdentityCredential/arcMsi.ts @@ -91,7 +91,8 @@ export const arcMsi: MSI = { deserializationMapper: undefined, abortSignal: getTokenOptions.abortSignal, spanOptions: getTokenOptions.tracingOptions && getTokenOptions.tracingOptions.spanOptions, - tracingContext: getTokenOptions.tracingOptions && getTokenOptions.tracingOptions.tracingContext, + tracingContext: + getTokenOptions.tracingOptions && getTokenOptions.tracingOptions.tracingContext, ...prepareRequestOptions(resource) }; diff --git a/sdk/identity/identity/src/credentials/managedIdentityCredential/imdsMsi.ts b/sdk/identity/identity/src/credentials/managedIdentityCredential/imdsMsi.ts index 919c482caa79..b6f24ad3001f 100644 --- a/sdk/identity/identity/src/credentials/managedIdentityCredential/imdsMsi.ts +++ b/sdk/identity/identity/src/credentials/managedIdentityCredential/imdsMsi.ts @@ -76,7 +76,11 @@ export const imdsMsi: MSI = { // not having a "Metadata" header should cause an error to be // returned quickly from the endpoint, proving its availability. const webResource = identityClient.createWebResource(request); - webResource.timeout = (options.requestOptions && options.requestOptions.timeout) || 500; + + // In Kubernetes pods, node-fetch (used by core-http) takes longer than 2 seconds to begin sending the network request, + // So smaller timeouts will cause this credential to be immediately aborted. + // This won't be a problem once we move Identity to core-rest-pipeline. + webResource.timeout = (options.requestOptions && options.requestOptions.timeout) || 3000; try { logger.info(`Pinging IMDS endpoint`); diff --git a/sdk/identity/identity/src/credentials/managedIdentityCredential/index.ts b/sdk/identity/identity/src/credentials/managedIdentityCredential/index.ts index 6ce8b36fd6fe..275229b687da 100644 --- a/sdk/identity/identity/src/credentials/managedIdentityCredential/index.ts +++ b/sdk/identity/identity/src/credentials/managedIdentityCredential/index.ts @@ -4,10 +4,7 @@ import { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-http"; import { IdentityClient, TokenCredentialOptions } from "../../client/identityClient"; import { createSpan } from "../../util/tracing"; -import { - AuthenticationError, - CredentialUnavailable -} from "../../client/errors"; +import { AuthenticationError, CredentialUnavailable } from "../../client/errors"; import { SpanStatusCode } from "@azure/core-tracing"; import { credentialLogger, formatSuccess, formatError } from "../../util/logging"; import { mapScopesToResource } from "./utils"; @@ -133,7 +130,10 @@ export class ManagedIdentityCredential implements TokenCredential { ): Promise { let result: AccessToken | null = null; - const { span, updatedOptions: newOptions } = createSpan("ManagedIdentityCredential-getToken", options); + const { span, updatedOptions: newOptions } = createSpan( + "ManagedIdentityCredential-getToken", + options + ); try { // isEndpointAvailable can be true, false, or null, diff --git a/sdk/identity/identity/src/credentials/usernamePasswordCredential.ts b/sdk/identity/identity/src/credentials/usernamePasswordCredential.ts index 1b94c3b794f1..e76b83b68863 100644 --- a/sdk/identity/identity/src/credentials/usernamePasswordCredential.ts +++ b/sdk/identity/identity/src/credentials/usernamePasswordCredential.ts @@ -91,7 +91,7 @@ export class UsernamePasswordCredential implements TokenCredential { }, abortSignal: options && options.abortSignal, spanOptions: newOptions.tracingOptions && newOptions.tracingOptions.spanOptions, - tracingContext: newOptions.tracingOptions && newOptions.tracingOptions.tracingContext, + tracingContext: newOptions.tracingOptions && newOptions.tracingOptions.tracingContext }); const tokenResponse = await this.identityClient.sendTokenRequest(webResource); diff --git a/sdk/identity/identity/test/internal/node/managedIdentityCredential.spec.ts b/sdk/identity/identity/test/internal/node/managedIdentityCredential.spec.ts index 01dd445f35de..0a1819183bfd 100644 --- a/sdk/identity/identity/test/internal/node/managedIdentityCredential.spec.ts +++ b/sdk/identity/identity/test/internal/node/managedIdentityCredential.spec.ts @@ -17,7 +17,7 @@ interface AuthRequestDetails { token: AccessToken | null; } -describe("ManagedIdentityCredential", function () { +describe("ManagedIdentityCredential", function() { afterEach(() => { delete process.env.IDENTITY_ENDPOINT; delete process.env.IDENTITY_HEADER; @@ -26,7 +26,7 @@ describe("ManagedIdentityCredential", function () { delete process.env.IDENTITY_SERVER_THUMBPRINT; }); - it("sends an authorization request with a modified resource name", async function () { + it("sends an authorization request with a modified resource name", async function() { const authDetails = await getMsiTokenAuthRequest(["https://service/.default"], "client", { authResponse: [ { status: 200 }, // Respond to IMDS isAvailable @@ -83,7 +83,7 @@ describe("ManagedIdentityCredential", function () { } }); - it("returns error when no MSI is available", async function () { + it("returns error when no MSI is available", async function() { process.env.AZURE_CLIENT_ID = "errclient"; const imdsError: RestError = new RestError("Request Timeout", "REQUEST_SEND_ERROR", 408); @@ -100,7 +100,7 @@ describe("ManagedIdentityCredential", function () { ); }); - it("an unexpected error bubbles all the way up", async function () { + it("an unexpected error bubbles all the way up", async function() { process.env.AZURE_CLIENT_ID = "errclient"; const errResponse: OAuthErrorResponse = { @@ -121,7 +121,7 @@ describe("ManagedIdentityCredential", function () { ); }); - it("returns expected error when the network was unreachable", async function () { + it("returns expected error when the network was unreachable", async function() { process.env.AZURE_CLIENT_ID = "errclient"; const netError: RestError = new RestError("Request Timeout", "ENETUNREACH", 408); @@ -138,7 +138,7 @@ describe("ManagedIdentityCredential", function () { ); }); - it("returns expected error when the host was unreachable", async function () { + it("returns expected error when the host was unreachable", async function() { process.env.AZURE_CLIENT_ID = "errclient"; const hostError: RestError = new RestError("Request Timeout", "EHOSTUNREACH", 408); diff --git a/sdk/identity/identity/test/public/node/authorizationCodeCredential.spec.ts b/sdk/identity/identity/test/public/node/authorizationCodeCredential.spec.ts index e75a00150489..3ba5bebf0006 100644 --- a/sdk/identity/identity/test/public/node/authorizationCodeCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/authorizationCodeCredential.spec.ts @@ -129,7 +129,7 @@ describe("AuthorizationCodeCredential", function() { ] }; - assert.deepStrictEqual(tracer.getSpanGraph(rootSpan.context().traceId), expectedGraph); + assert.deepStrictEqual(tracer.getSpanGraph(rootSpan.spanContext().traceId), expectedGraph); assert.strictEqual(tracer.getActiveSpans().length, 0, "All spans should have had end called"); }); }); diff --git a/sdk/identity/identity/test/public/node/clientCertificateCredential.spec.ts b/sdk/identity/identity/test/public/node/clientCertificateCredential.spec.ts index edd6a8bd6d79..c268fc2aaaf5 100644 --- a/sdk/identity/identity/test/public/node/clientCertificateCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/clientCertificateCredential.spec.ts @@ -218,7 +218,7 @@ describe("ClientCertificateCredential", function() { ] }; - assert.deepStrictEqual(tracer.getSpanGraph(rootSpan.context().traceId), expectedGraph); + assert.deepStrictEqual(tracer.getSpanGraph(rootSpan.spanContext().traceId), expectedGraph); assert.strictEqual(tracer.getActiveSpans().length, 0, "All spans should have had end called"); }); }); diff --git a/sdk/identity/identity/test/public/node/environmentCredential.spec.ts b/sdk/identity/identity/test/public/node/environmentCredential.spec.ts index 8d6554989078..397dfe4d88ba 100644 --- a/sdk/identity/identity/test/public/node/environmentCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/environmentCredential.spec.ts @@ -138,7 +138,7 @@ describe("EnvironmentCredential", function() { ] }; - assert.deepStrictEqual(tracer.getSpanGraph(rootSpan.context().traceId), expectedGraph); + assert.deepStrictEqual(tracer.getSpanGraph(rootSpan.spanContext().traceId), expectedGraph); assert.strictEqual(tracer.getActiveSpans().length, 0, "All spans should have had end called"); });