Skip to content

Commit 03eeceb

Browse files
committed
Use unknown for stringified DynamoDB values
1 parent 25a057e commit 03eeceb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • packages/server-utils/src/integrations/tracing-channel/aws-sdk/services

packages/server-utils/src/integrations/tracing-channel/aws-sdk/services/dynamodb.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ export class DynamodbServiceExtension implements ServiceExtension {
7979
if (normalizedRequest.commandInput?.GlobalSecondaryIndexes) {
8080
spanAttributes[ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES] = toArray(
8181
normalizedRequest.commandInput.GlobalSecondaryIndexes,
82-
).map((x: Record<string, any>) => JSON.stringify(x));
82+
).map((x: unknown) => JSON.stringify(x));
8383
}
8484

8585
if (normalizedRequest.commandInput?.LocalSecondaryIndexes) {
8686
spanAttributes[ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES] = toArray(
8787
normalizedRequest.commandInput.LocalSecondaryIndexes,
88-
).map((x: Record<string, any>) => JSON.stringify(x));
88+
).map((x: unknown) => JSON.stringify(x));
8989
}
9090
}
9191

@@ -138,13 +138,13 @@ export class DynamodbServiceExtension implements ServiceExtension {
138138
if (normalizedRequest.commandInput?.AttributeDefinitions) {
139139
spanAttributes[ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS] = toArray(
140140
normalizedRequest.commandInput.AttributeDefinitions,
141-
).map((x: Record<string, any>) => JSON.stringify(x));
141+
).map((x: unknown) => JSON.stringify(x));
142142
}
143143

144144
if (normalizedRequest.commandInput?.GlobalSecondaryIndexUpdates) {
145145
spanAttributes[ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES] = toArray(
146146
normalizedRequest.commandInput.GlobalSecondaryIndexUpdates,
147-
).map((x: Record<string, any>) => JSON.stringify(x));
147+
).map((x: unknown) => JSON.stringify(x));
148148
}
149149
}
150150

@@ -160,14 +160,14 @@ export class DynamodbServiceExtension implements ServiceExtension {
160160
if (response.data?.ConsumedCapacity) {
161161
span.setAttribute(
162162
ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY,
163-
toArray(response.data.ConsumedCapacity).map((x: Record<string, any>) => JSON.stringify(x)),
163+
toArray(response.data.ConsumedCapacity).map((x: unknown) => JSON.stringify(x)),
164164
);
165165
}
166166

167167
if (response.data?.ItemCollectionMetrics) {
168168
span.setAttribute(
169169
ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS,
170-
toArray(response.data.ItemCollectionMetrics).map((x: Record<string, any>) => JSON.stringify(x)),
170+
toArray(response.data.ItemCollectionMetrics).map((x: unknown) => JSON.stringify(x)),
171171
);
172172
}
173173

0 commit comments

Comments
 (0)