Fix OpenTelemetry dependency issue in semantic-kernel agents #225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Contract Analysis Agent and other semantic-kernel agents that were failing with:
This error occurred when trying to run the agents due to missing dependencies and deprecated packages in their requirements.txt files.
Root Cause
The issue had two parts:
azure_storage==0.37.0
is deprecated since v0.37.0 and causes installation failuressemantic_kernel==1.31.0
requires OpenTelemetry semconv attributes but the dependency wasn't declaredChanges
Fixed requirements.txt for all affected semantic-kernel agents:
Before:
After:
Agents Fixed
contract-analysis-agent
(primary issue reported)sop-forge-agent
warranty-claim-processing-agent
All three agents use
from semantic_kernel.agents import AzureAIAgent, AzureAIAgentThread
which triggers the missing OpenTelemetry import.Validation
✅ Verified that
opentelemetry-semantic-conventions
provides the missingopentelemetry.semconv.attributes.error_attributes.ERROR_TYPE
✅ Confirmed through code analysis that none of the agents actually use Azure Storage APIs
✅ All requirements.txt files now install successfully without deprecated package errors
Users should now be able to:
pip install -r requirements.txt
Fixes #165.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.