From fa99923d757878a41a17f28d97fbe3a5c3e0da9b Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Wed, 5 May 2021 13:22:05 -0400 Subject: [PATCH] chore: use spancontext for link (#58) --- api/src/index.ts | 1 - api/src/trace/link.ts | 6 +++--- api/src/trace/link_context.ts | 22 ---------------------- 3 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 api/src/trace/link_context.ts diff --git a/api/src/index.ts b/api/src/index.ts index b36eaccd783..b19b1bb766d 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -22,7 +22,6 @@ export * from './propagation/NoopTextMapPropagator'; export * from './propagation/TextMapPropagator'; export * from './trace/attributes'; export * from './trace/Event'; -export * from './trace/link_context'; export * from './trace/link'; export * from './trace/NoopTracer'; export * from './trace/NoopTracerProvider'; diff --git a/api/src/trace/link.ts b/api/src/trace/link.ts index 8bd37478b28..1d81d38d696 100644 --- a/api/src/trace/link.ts +++ b/api/src/trace/link.ts @@ -15,7 +15,7 @@ */ import { SpanAttributes } from './attributes'; -import { LinkContext } from './link_context'; +import { SpanContext } from './span_context'; /** * A pointer from the current {@link Span} to another span in the same trace or @@ -33,8 +33,8 @@ import { LinkContext } from './link_context'; * Service Provider) can be correlated. */ export interface Link { - /** The {@link LinkContext} of a linked span. */ - context: LinkContext; + /** The {@link SpanContext} of a linked span. */ + context: SpanContext; /** A set of {@link SpanAttributes} on the link. */ attributes?: SpanAttributes; } diff --git a/api/src/trace/link_context.ts b/api/src/trace/link_context.ts deleted file mode 100644 index c52245975da..00000000000 --- a/api/src/trace/link_context.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { SpanContext } from './span_context'; - -/** - * A pointer to another span. - */ -export type LinkContext = Pick;