mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 10:22:25 -05:00 
			
		
		
		
	[chore]: Bump github.com/prometheus/client_golang from 1.20.3 to 1.20.4 (#3327)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.3 to 1.20.4. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.20.3...v1.20.4) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								4f8f6d9dac
							
						
					
				
			
			
				commit
				
					
						862cc9e3c4
					
				
			
		
					 4 changed files with 10 additions and 8 deletions
				
			
		
							
								
								
									
										10
									
								
								vendor/github.com/prometheus/client_golang/prometheus/histogram.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/github.com/prometheus/client_golang/prometheus/histogram.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -844,9 +844,7 @@ func (h *histogram) Write(out *dto.Metric) error { | |||
| 			}} | ||||
| 		} | ||||
| 
 | ||||
| 		// If exemplars are not configured, the cap will be 0. | ||||
| 		// So append is not needed in this case. | ||||
| 		if cap(h.nativeExemplars.exemplars) > 0 { | ||||
| 		if h.nativeExemplars.isEnabled() { | ||||
| 			h.nativeExemplars.Lock() | ||||
| 			his.Exemplars = append(his.Exemplars, h.nativeExemplars.exemplars...) | ||||
| 			h.nativeExemplars.Unlock() | ||||
|  | @ -1665,6 +1663,10 @@ type nativeExemplars struct { | |||
| 	exemplars []*dto.Exemplar | ||||
| } | ||||
| 
 | ||||
| func (n *nativeExemplars) isEnabled() bool { | ||||
| 	return n.ttl != -1 | ||||
| } | ||||
| 
 | ||||
| func makeNativeExemplars(ttl time.Duration, maxCount int) nativeExemplars { | ||||
| 	if ttl == 0 { | ||||
| 		ttl = 5 * time.Minute | ||||
|  | @ -1686,7 +1688,7 @@ func makeNativeExemplars(ttl time.Duration, maxCount int) nativeExemplars { | |||
| } | ||||
| 
 | ||||
| func (n *nativeExemplars) addExemplar(e *dto.Exemplar) { | ||||
| 	if n.ttl == -1 { | ||||
| 	if !n.isEnabled() { | ||||
| 		return | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue