From 85f6df7c0c7b45ec5d5ed2ffbe315c2931d4eeb6 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Tue, 1 Feb 2022 11:17:43 -0500 Subject: [PATCH 1/3] ref(tracing): Export SpanStatus enum This enum is deprecated, but we should still export it. It should be treeshaken out, so there should be no bundle impact. --- packages/tracing/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/tracing/src/index.ts b/packages/tracing/src/index.ts index 5bb593e01109..543989a065b7 100644 --- a/packages/tracing/src/index.ts +++ b/packages/tracing/src/index.ts @@ -22,6 +22,7 @@ export { Integrations }; export { BrowserTracing } from './browser'; export { Span, SpanStatusType, spanStatusfromHttpCode } from './span'; +export { SpanStatus } from './spanstatus'; export { Transaction } from './transaction'; export { // TODO deprecate old name in v7 From f2c3416b48087754c291caf4f0133996be785664 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Tue, 1 Feb 2022 11:29:17 -0500 Subject: [PATCH 2/3] Add deprecation note --- packages/tracing/src/index.ts | 1 + packages/tracing/src/spanstatus.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/tracing/src/index.ts b/packages/tracing/src/index.ts index 543989a065b7..89e3b3ba92d5 100644 --- a/packages/tracing/src/index.ts +++ b/packages/tracing/src/index.ts @@ -22,6 +22,7 @@ export { Integrations }; export { BrowserTracing } from './browser'; export { Span, SpanStatusType, spanStatusfromHttpCode } from './span'; +// eslint-disable-next-line deprecation/deprecation export { SpanStatus } from './spanstatus'; export { Transaction } from './transaction'; export { diff --git a/packages/tracing/src/spanstatus.ts b/packages/tracing/src/spanstatus.ts index 6191b27f148c..20ab8b65defb 100644 --- a/packages/tracing/src/spanstatus.ts +++ b/packages/tracing/src/spanstatus.ts @@ -1,4 +1,7 @@ -/** The status of an Span. */ +/** The status of an Span. + * + * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type +*/ // eslint-disable-next-line import/export export enum SpanStatus { /** The operation completed successfully. */ From 472eb9c426d474cbd05f55acca3ea63c18825122 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Tue, 1 Feb 2022 12:58:49 -0500 Subject: [PATCH 3/3] lint fix --- packages/tracing/src/spanstatus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tracing/src/spanstatus.ts b/packages/tracing/src/spanstatus.ts index 20ab8b65defb..fdf322fdeaa1 100644 --- a/packages/tracing/src/spanstatus.ts +++ b/packages/tracing/src/spanstatus.ts @@ -1,7 +1,7 @@ /** The status of an Span. * * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type -*/ + */ // eslint-disable-next-line import/export export enum SpanStatus { /** The operation completed successfully. */