- 
                Notifications
    
You must be signed in to change notification settings  - Fork 805
 
Ensure spans complete on early stream closure for Bedrock Streaming APIs #3481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
            xrmx
  merged 10 commits into
  open-telemetry:main
from
SrdjanLL:botocore-stream-close-handle
  
      
      
   
  May 23, 2025 
      
    
                
     Merged
            
            Ensure spans complete on early stream closure for Bedrock Streaming APIs #3481
                    xrmx
  merged 10 commits into
  open-telemetry:main
from
SrdjanLL:botocore-stream-close-handle
  
      
      
   
  May 23, 2025 
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    d659757    to
    2f022cc      
    Compare
  
    ebb27e0    to
    260f9d2      
    Compare
  
    
              
                    xrmx
  
              
              reviewed
              
                  
                    May 9, 2025 
                  
              
              
            
            
        
          
                ...ry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                ...ry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
      260f9d2    to
    a2c2b43      
    Compare
  
    
      
        
      
      
  
    5 tasks
  
a2c2b43    to
    ff15a02      
    Compare
  
    
      
        
      
      
  
    18 tasks
  
              
                    xrmx
  
              
              reviewed
              
                  
                    May 20, 2025 
                  
              
              
            
            
        
          
                ...ry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …t that span status is unset.
ff15a02    to
    df1d4d4      
    Compare
  
    
              
                    xrmx
  
              
              approved these changes
              
                  
                    May 20, 2025 
                  
              
              
            
            
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
              
                    xrmx
  
              
              reviewed
              
                  
                    May 23, 2025 
                  
              
              
            
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  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.
  
    
  
    
Description
ConverseStream,InvokeModelWithResponseStream).close()is called prematurely or prior to even consuming the stream.StatusCode.ERRORunless one is explicitly thrown (it will beStatusCode.UNSETinstead, with fewer attributes captured).This improvement was surfaced as part of the bedrock instrumentation tracking issue: #3210
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.