Should calls to the AWS Bedrock Knowledgebase retrieve function be auto-instrumented if we are using BedrockInstrumentor? From what I can see, bedrock converse calls are auto-instrumented but theretrieve calls are not 馃
No, calls to the AWS Bedrock Knowledgebase retrieve function are not auto-instrumented by BedrockInstrumentor. The current auto-instrumentation only covers invoke_model, converse, and (recently) invoke_agent for the bedrock-runtime and bedrock-agent-runtime clients, but there is no mention of retrieve being instrumented in the official documentation or changelogs [PyPI BedrockInstrumentor] [README].If you need observability for retrieve calls, you would have to implement manual instrumentation, as auto-instrumentation for this method is not currently supported. Would you like more detail on how to manually instrument these calls?Sources:
- PyPI BedrockInstrumentor
- README
馃挕聽Hint: Mention RunLLM in the thread for followups.
Yes, the example you linked is the recommended approach for manual instrumentation of retriever spans. It shows how to set the span kind to "RETRIEVER" and add relevant attributes like input, output, and metadata using OpenInference semantic conventions [Arize retriever manual instrumentation].This ensures your custom retrieve calls are properly displayed in Phoenix with the correct span kind and attributes. Would you like a code snippet or more detail on applying this pattern?Sources:
- Arize retriever manual instrumentation
馃挕聽Hint: Mention RunLLM in the thread for followups.
