outposts: make metrics compliant with Prometheus best-practices (#6398)
web/outpost: make metrics compliant with Prometheus best-practices Today, all NewHistogramVec store values in nanoseconds without changing the default histogram bucket, which are made for seconds, making them a bit useless. In addition, some metrics names are not self-explanatoryand and do not comply with Prometheus best practices. This commit tries to fix all of this "issues". NOTE: I kept old metrics in order to avoid breaking changes with existing dashboards and metrics. Signed-off-by: Alexandre NICOLAIE <xunleii@users.noreply.github.com>
This commit is contained in:
		 Alexandre NICOLAIE
					Alexandre NICOLAIE
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							5347dd7022
						
					
				
				
					commit
					a2714ab1f1
				
			| @ -15,6 +15,12 @@ import ( | ||||
|  | ||||
| var ( | ||||
| 	Requests = promauto.NewHistogramVec(prometheus.HistogramOpts{ | ||||
| 		Name: "authentik_main_request_duration_seconds", | ||||
| 		Help: "API request latencies in seconds", | ||||
| 	}, []string{"dest"}) | ||||
|  | ||||
| 	// NOTE: the following metric is kept for compatibility purpose | ||||
| 	RequestsLegacy = promauto.NewHistogramVec(prometheus.HistogramOpts{ | ||||
| 		Name: "authentik_main_requests", | ||||
| 		Help: "The total number of configured providers", | ||||
| 	}, []string{"dest"}) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user