- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.1k
 
feat: add tracing api and instrument BaseApp #25516
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
          
     Draft
      
      
            aaronc
  wants to merge
  30
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
aaronc/tracing-metrics
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +1,249
        
        
          −627
        
        
          
        
      
    
  
  
     Draft
                    Changes from 15 commits
      Commits
    
    
            Show all changes
          
          
            30 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      1cf5e6c
              
                feat: add tracing
              
              
                aaronc a207f94
              
                work on otel tracer impl
              
              
                aaronc ee0bfb3
              
                add basic baseapp tracing
              
              
                aaronc d5f5ea4
              
                latest WIP
              
              
                aaronc 47f83e8
              
                add trace exporter setup
              
              
                aaronc 7fafce3
              
                fixes
              
              
                aaronc bdba035
              
                simapp setup, make tracers wrap loggers
              
              
                aaronc 25e3135
              
                add test setup
              
              
                aaronc 5c7e464
              
                fix shutdown order
              
              
                aaronc d71f7c1
              
                block trace nesting
              
              
                aaronc 56b215a
              
                update metrics config and instrumentation
              
              
                aaronc f9ce55c
              
                start adding otel metric config
              
              
                aaronc 3fff00f
              
                migrate to pure otel setup
              
              
                aaronc 5077567
              
                fixes
              
              
                aaronc 31536b6
              
                add basic metrics
              
              
                aaronc c922688
              
                add telemetry shutdown hook
              
              
                aaronc ed891cc
              
                docs, cleanup
              
              
                aaronc f685bd4
              
                WIP on removing go-metrics
              
              
                aaronc 42da2f7
              
                Merge branch 'main' of github.com:cosmos/cosmos-sdk into aaronc/traci…
              
              
                aaronc 699f5d3
              
                setup sim test flag
              
              
                aaronc 5df2460
              
                integrate slog logging
              
              
                aaronc 1c84edb
              
                update to use official env var
              
              
                aaronc 46e4bcb
              
                add README.md
              
              
                aaronc f0c3955
              
                delete spaces
              
              
                aaronc 7dfb754
              
                setup TestingMain
              
              
                aaronc 1ce344b
              
                update suggested config in README.md
              
              
                aaronc edbae92
              
                add otel custom config options
              
              
                aaronc 0f8085a
              
                add otel custom config options
              
              
                aaronc 03b6069
              
                add more instrumentation
              
              
                aaronc c4dbd07
              
                remove pretty print
              
              
                aaronc File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
              
  
    
      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
    
  
  
    
              
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  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.
  
    
  
    
Check warning
Code scanning / CodeQL
Useless assignment to local variable Warning
Copilot Autofix
AI 4 days ago
To fix the problem, the assignment to
ctxinctx, span := tracer.Start(ctx, "Query")should be replaced with the blank identifier_, since the new value is not used afterward. Thus, the line should be updated to_ , span := tracer.Start(ctx, "Query"). This keeps the logic correct and makes clear that the new context is irrelevant, and onlyspanis wanted. No additional imports, method, or definition changes are necessary. Only a single line inbaseapp/abci.goneeds updating.