Merge branch 'metrics-typo' into 'master'
Fix typo in gitlab-workhorse header See merge request !5891
This commit is contained in:
		
						commit
						94cfd4adb2
					
				| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
0.7.8
 | 
			
		||||
0.7.10
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -397,7 +397,7 @@ If you are not using Linux you may have to run `gmake` instead of
 | 
			
		|||
    cd /home/git
 | 
			
		||||
    sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git
 | 
			
		||||
    cd gitlab-workhorse
 | 
			
		||||
    sudo -u git -H git checkout v0.7.8
 | 
			
		||||
    sudo -u git -H git checkout v0.7.10
 | 
			
		||||
    sudo -u git -H make
 | 
			
		||||
 | 
			
		||||
### Initialize Database and Activate Advanced Features
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@ module Gitlab
 | 
			
		|||
      
 | 
			
		||||
      def call(env)
 | 
			
		||||
        trans = Gitlab::Metrics.current_transaction
 | 
			
		||||
        proxy_start = env['HTTP_GITLAB_WORHORSE_PROXY_START'].presence
 | 
			
		||||
        proxy_start = env['HTTP_GITLAB_WORKHORSE_PROXY_START'].presence
 | 
			
		||||
        if trans && proxy_start
 | 
			
		||||
          # Time in milliseconds since gitlab-workhorse started the request
 | 
			
		||||
          trans.set(:rails_queue_duration, Time.now.to_f * 1_000 - proxy_start.to_f / 1_000_000)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@ describe Gitlab::Middleware::RailsQueueDuration do
 | 
			
		|||
      end
 | 
			
		||||
 | 
			
		||||
      it 'sets proxy_flight_time and calls the app when the header is present' do
 | 
			
		||||
        env['HTTP_GITLAB_WORHORSE_PROXY_START'] = '123'
 | 
			
		||||
        env['HTTP_GITLAB_WORKHORSE_PROXY_START'] = '123'
 | 
			
		||||
        expect(transaction).to receive(:set).with(:rails_queue_duration, an_instance_of(Float))
 | 
			
		||||
        expect(middleware.call(env)).to eq('yay')
 | 
			
		||||
      end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue