Skip to content

Commit d8adc04

Browse files
committed
minor fixes
1 parent d0106cd commit d8adc04

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/node/opentelemetry-instrumentation-aws-sdk/src/services/bedrock-runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class BedrockRuntimeServiceExtension implements ServiceExtension {
107107
// add operation name for InvokeModel API
108108
};
109109

110-
const modelId = request.commandInput.modelId;
110+
const modelId = request.commandInput?.modelId;
111111
if (modelId) {
112112
spanAttributes[ATTR_GEN_AI_REQUEST_MODEL] = modelId;
113113
}

plugins/node/opentelemetry-instrumentation-aws-sdk/test/bedrock-runtime.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ describe('Bedrock', () => {
156156

157157
// TODO: Instrument InvokeModel
158158
describe('InvokeModel', () => {
159-
it('does not currently add genai conventions', async () => {
159+
it('adds amazon titan model attributes to span', async () => {
160160
const modelId = 'amazon.titan-text-express-v1';
161161
const inputText = 'Say this is a test';
162162
const textGenerationConfig = {

0 commit comments

Comments
 (0)