mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-03 17:43:42 +08:00 
			
		
		
		
	metricutil: remove BUILDX_EXPERIMENTAL from internal docker reporting
The `BUILDX_EXPERIMENTAL` check is removed from the docker otel collector. We'll send metrics to the OTLP endpoint for docker desktop if it is present and enabled regardless of experimental status. The user-facing `OTEL` endpoints for enabling the metric reporting for external use is still hidden behind the experimental flag. We'll likely remove the experimental flag for this feature for v0.14. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
		@@ -37,14 +37,14 @@ type MeterProvider struct {
 | 
				
			|||||||
func NewMeterProvider(ctx context.Context, cli command.Cli) (*MeterProvider, error) {
 | 
					func NewMeterProvider(ctx context.Context, cli command.Cli) (*MeterProvider, error) {
 | 
				
			||||||
	var exps []sdkmetric.Exporter
 | 
						var exps []sdkmetric.Exporter
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Only metric exporters if the experimental flag is set.
 | 
						if exp, err := dockerOtelExporter(cli); err != nil {
 | 
				
			||||||
	if confutil.IsExperimental() {
 | 
							return nil, err
 | 
				
			||||||
		if exp, err := dockerOtelExporter(cli); err != nil {
 | 
						} else if exp != nil {
 | 
				
			||||||
			return nil, err
 | 
							exps = append(exps, exp)
 | 
				
			||||||
		} else if exp != nil {
 | 
						}
 | 
				
			||||||
			exps = append(exps, exp)
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if confutil.IsExperimental() {
 | 
				
			||||||
 | 
							// Expose the user-facing metric exporter only if the experimental flag is set.
 | 
				
			||||||
		if exp, err := detectOtlpExporter(ctx); err != nil {
 | 
							if exp, err := detectOtlpExporter(ctx); err != nil {
 | 
				
			||||||
			return nil, err
 | 
								return nil, err
 | 
				
			||||||
		} else if exp != nil {
 | 
							} else if exp != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user