Skip to content

Commit 195a1ac

Browse files
committed
Import Bedrock gen_ai.request.stop_sequences from @sentry/conventions
1 parent 09c7610 commit 195a1ac

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const DB_SYSTEM_VALUE_DYNAMODB = 'dynamodb';
1515
export const ATTR_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind';
1616
export const MESSAGING_DESTINATION_KIND_VALUE_TOPIC = 'topic';
1717

18-
// Bedrock (gen_ai)
19-
export const ATTR_GEN_AI_REQUEST_STOP_SEQUENCES = 'gen_ai.request.stop_sequences';
18+
// Bedrock (gen_ai) attribute values (not keys, so not covered by conventions)
2019
export const GEN_AI_OPERATION_NAME_VALUE_CHAT = 'chat';
2120
export const GEN_AI_SYSTEM_VALUE_AWS_BEDROCK = 'aws.bedrock';

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
GEN_AI_OPERATION_NAME,
55
GEN_AI_REQUEST_MAX_TOKENS,
66
GEN_AI_REQUEST_MODEL,
7+
GEN_AI_REQUEST_STOP_SEQUENCES as ATTR_GEN_AI_REQUEST_STOP_SEQUENCES,
78
GEN_AI_REQUEST_TEMPERATURE,
89
GEN_AI_REQUEST_TOP_P,
910
GEN_AI_RESPONSE_FINISH_REASONS,
@@ -12,11 +13,7 @@ import {
1213
GEN_AI_USAGE_OUTPUT_TOKENS,
1314
} from '@sentry/conventions/attributes';
1415
import { DEBUG_BUILD } from '../../../../debug-build';
15-
import {
16-
ATTR_GEN_AI_REQUEST_STOP_SEQUENCES,
17-
GEN_AI_OPERATION_NAME_VALUE_CHAT,
18-
GEN_AI_SYSTEM_VALUE_AWS_BEDROCK,
19-
} from '../constants';
16+
import { GEN_AI_OPERATION_NAME_VALUE_CHAT, GEN_AI_SYSTEM_VALUE_AWS_BEDROCK } from '../constants';
2017
import type { NormalizedRequest, NormalizedResponse } from '../types';
2118
import type { RequestMetadata, ServiceExtension } from './ServiceExtension';
2219

0 commit comments

Comments
 (0)