@@ -156,7 +156,7 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
156
156
: [ "" , "" ] ;
157
157
158
158
attributes = {
159
- [ SpanAttributes . LLM_VENDOR ] : vendor ,
159
+ [ SpanAttributes . LLM_SYSTEM ] : vendor ,
160
160
[ SpanAttributes . LLM_REQUEST_MODEL ] : model ,
161
161
[ SpanAttributes . LLM_RESPONSE_MODEL ] : model ,
162
162
[ SpanAttributes . LLM_REQUEST_TYPE ] : LLMRequestTypeValues . COMPLETION ,
@@ -197,7 +197,7 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
197
197
? ( span [ "attributes" ] as Record < string , any > )
198
198
: { } ;
199
199
200
- if ( SpanAttributes . LLM_VENDOR in attributes ) {
200
+ if ( SpanAttributes . LLM_SYSTEM in attributes ) {
201
201
if ( ! ( result . body instanceof Object . getPrototypeOf ( Uint8Array ) ) ) {
202
202
const rawRes = result . body as AsyncIterable < bedrock . ResponseStream > ;
203
203
@@ -234,7 +234,7 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
234
234
}
235
235
236
236
let responseAttributes = this . _setResponseAttributes (
237
- attributes [ SpanAttributes . LLM_VENDOR ] ,
237
+ attributes [ SpanAttributes . LLM_SYSTEM ] ,
238
238
parsedResponse ,
239
239
true ,
240
240
) ;
@@ -265,7 +265,7 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
265
265
const parsedResponse = JSON . parse ( jsonString ) ;
266
266
267
267
const responseAttributes = this . _setResponseAttributes (
268
- attributes [ SpanAttributes . LLM_VENDOR ] ,
268
+ attributes [ SpanAttributes . LLM_SYSTEM ] ,
269
269
parsedResponse ,
270
270
) ;
271
271
@@ -289,8 +289,8 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
289
289
switch ( vendor ) {
290
290
case "ai21" : {
291
291
return {
292
- [ SpanAttributes . LLM_TOP_P ] : requestBody [ "topP" ] ,
293
- [ SpanAttributes . LLM_TEMPERATURE ] : requestBody [ "temperature" ] ,
292
+ [ SpanAttributes . LLM_REQUEST_TOP_P ] : requestBody [ "topP" ] ,
293
+ [ SpanAttributes . LLM_REQUEST_TEMPERATURE ] : requestBody [ "temperature" ] ,
294
294
[ SpanAttributes . LLM_REQUEST_MAX_TOKENS ] : requestBody [ "maxTokens" ] ,
295
295
[ SpanAttributes . LLM_PRESENCE_PENALTY ] :
296
296
requestBody [ "presencePenalty" ] [ "scale" ] ,
@@ -309,9 +309,9 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
309
309
}
310
310
case "amazon" : {
311
311
return {
312
- [ SpanAttributes . LLM_TOP_P ] :
312
+ [ SpanAttributes . LLM_REQUEST_TOP_P ] :
313
313
requestBody [ "textGenerationConfig" ] [ "topP" ] ,
314
- [ SpanAttributes . LLM_TEMPERATURE ] :
314
+ [ SpanAttributes . LLM_REQUEST_TEMPERATURE ] :
315
315
requestBody [ "textGenerationConfig" ] [ "temperature" ] ,
316
316
[ SpanAttributes . LLM_REQUEST_MAX_TOKENS ] :
317
317
requestBody [ "textGenerationConfig" ] [ "maxTokenCount" ] ,
@@ -328,9 +328,9 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
328
328
}
329
329
case "anthropic" : {
330
330
return {
331
- [ SpanAttributes . LLM_TOP_P ] : requestBody [ "top_p" ] ,
331
+ [ SpanAttributes . LLM_REQUEST_TOP_P ] : requestBody [ "top_p" ] ,
332
332
[ SpanAttributes . LLM_TOP_K ] : requestBody [ "top_k" ] ,
333
- [ SpanAttributes . LLM_TEMPERATURE ] : requestBody [ "temperature" ] ,
333
+ [ SpanAttributes . LLM_REQUEST_TEMPERATURE ] : requestBody [ "temperature" ] ,
334
334
[ SpanAttributes . LLM_REQUEST_MAX_TOKENS ] :
335
335
requestBody [ "max_tokens_to_sample" ] ,
336
336
@@ -350,9 +350,9 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
350
350
}
351
351
case "cohere" : {
352
352
return {
353
- [ SpanAttributes . LLM_TOP_P ] : requestBody [ "p" ] ,
353
+ [ SpanAttributes . LLM_REQUEST_TOP_P ] : requestBody [ "p" ] ,
354
354
[ SpanAttributes . LLM_TOP_K ] : requestBody [ "k" ] ,
355
- [ SpanAttributes . LLM_TEMPERATURE ] : requestBody [ "temperature" ] ,
355
+ [ SpanAttributes . LLM_REQUEST_TEMPERATURE ] : requestBody [ "temperature" ] ,
356
356
[ SpanAttributes . LLM_REQUEST_MAX_TOKENS ] : requestBody [ "max_tokens" ] ,
357
357
358
358
// Prompt & Role
@@ -367,8 +367,8 @@ export class BedrockInstrumentation extends InstrumentationBase<any> {
367
367
}
368
368
case "meta" : {
369
369
return {
370
- [ SpanAttributes . LLM_TOP_P ] : requestBody [ "top_p" ] ,
371
- [ SpanAttributes . LLM_TEMPERATURE ] : requestBody [ "temperature" ] ,
370
+ [ SpanAttributes . LLM_REQUEST_TOP_P ] : requestBody [ "top_p" ] ,
371
+ [ SpanAttributes . LLM_REQUEST_TEMPERATURE ] : requestBody [ "temperature" ] ,
372
372
[ SpanAttributes . LLM_REQUEST_MAX_TOKENS ] : requestBody [ "max_gen_len" ] ,
373
373
374
374
// Prompt & Role
0 commit comments