From 4d908e63a61dc28d1b2994ca7a3a2a6c9959990f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Sumis=C5=82awski?= Date: Wed, 3 Apr 2024 18:41:16 +0200 Subject: [PATCH] Fix more imports --- .../src/triggers/common.ts | 3 +-- .../src/triggers/dynamodb-stream.ts | 5 ++--- .../src/triggers/event-bridge.ts | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/common.ts b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/common.ts index 217f83de1f..dbc567d9bd 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/common.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/common.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import { SpanOptions } from '@opentelemetry/api/build/src/trace/SpanOptions'; -import { Span } from '@opentelemetry/api'; +import { Span, SpanOptions } from '@opentelemetry/api'; import { TriggerOrigin } from './index'; import { AwsLambdaInstrumentationConfig } from '../types'; diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/dynamodb-stream.ts b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/dynamodb-stream.ts index f7d8a69a2c..54cd8451e6 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/dynamodb-stream.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/dynamodb-stream.ts @@ -21,8 +21,7 @@ import { } from './common'; import { isDefined } from '../utils'; import { Attributes, SpanKind } from '@opentelemetry/api'; -import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; -import { DbSystemValues } from '@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes'; +import { DBSYSTEMVALUES_DYNAMODB, SemanticAttributes } from '@opentelemetry/semantic-conventions'; import { TriggerOrigin } from './index'; export const isDynamoDBStreamEvent = @@ -60,7 +59,7 @@ function initalizeDynamoDBStreamSpan( ); const attributes: Attributes = { - [SemanticAttributes.DB_SYSTEM]: DbSystemValues.DYNAMODB, + [SemanticAttributes.DB_SYSTEM]: DBSYSTEMVALUES_DYNAMODB, }; if (tableNames.length > 0) { diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/event-bridge.ts b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/event-bridge.ts index e0613f8b7f..2a9eefbcf8 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/event-bridge.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/triggers/event-bridge.ts @@ -18,15 +18,15 @@ import { Attributes, Link, SpanKind, + SpanOptions, + defaultTextMapGetter, diag, propagation, trace, + context as otelContext, } from '@opentelemetry/api'; import { LambdaTrigger, TriggerSpanInitializerResult } from './common'; import { TriggerOrigin } from './index'; -import { SpanOptions } from '@opentelemetry/api/build/src/trace/SpanOptions'; -import { context as otelContext } from '@opentelemetry/api/build/src/context-api'; -import { defaultTextMapGetter } from '@opentelemetry/api/build/src/propagation/TextMapPropagator'; export const CONTEXT_KEY = '_context'; type EventBridgeDetailWithContext = { [CONTEXT_KEY]?: object } & object;