PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: lightstep/otel-launcher-go (go)

Issue:
Default for metric endpoint should be set
The endpoint configured by default for the metric exporter is not set. This should be set to the same endpoint as for traces

Pull request:
set default endpoint for metrics
Fixes #37 

Patch:
diff --git a/launcher/config.go b/launcher/config.go
index 873a75e..7529648 100644
--- a/launcher/config.go
+++ b/launcher/config.go
@@ -181,7 +181,7 @@ type Config struct {
 	SpanExporterEndpointInsecure   bool     `env:"OTEL_EXPORTER_OTLP_SPAN_INSECURE,default=false"`
 	ServiceName                    string   `env:"LS_SERVICE_NAME"`
 	ServiceVersion                 string   `env:"LS_SERVICE_VERSION,default=unknown"`
-	MetricExporterEndpoint         string   `env:"OTEL_EXPORTER_OTLP_METRIC_ENDPOINT"`
+	MetricExporterEndpoint         string   `env:"OTEL_EXPORTER_OTLP_METRIC_ENDPOINT,default=ingest.lightstep.com:443"`
 	MetricExporterEndpointInsecure bool     `env:"OTEL_EXPORTER_OTLP_METRIC_INSECURE,default=false"`
 	MetricsEnabled                 bool     `env:"LS_METRICS_ENABLED,default=true"`
 	AccessToken                    string   `env:"LS_ACCESS_TOKEN"`


Test patch:
diff --git a/examples/tracing/trace_test.go b/examples/tracing/trace_test.go
index fc40a53..4447498 100644
--- a/examples/tracing/trace_test.go
+++ b/examples/tracing/trace_test.go
@@ -24,5 +24,6 @@ import (
 func TestMinimumConfiguration(t *testing.T) {
 	os.Setenv("LS_SERVICE_NAME", "test-service-name")
 	os.Setenv("OTEL_EXPORTER_OTLP_SPAN_ENDPOINT", "invalid-endpoint")
+	os.Setenv("OTEL_EXPORTER_OTLP_METRIC_ENDPOINT", "invalid-endpoint")
 	assert.NotPanics(t, main)
 }
diff --git a/launcher/config_test.go b/launcher/config_test.go
index 6e79b67..a252e33 100644
--- a/launcher/config_test.go
+++ b/launcher/config_test.go
@@ -309,7 +309,7 @@ func TestDefaultConfig(t *testing.T) {
 		ServiceVersion:                 "unknown",
 		SpanExporterEndpoint:           "ingest.lightstep.com:443",
 		SpanExporterEndpointInsecure:   false,
-		MetricExporterEndpoint:         "",
+		MetricExporterEndpoint:         "ingest.lightstep.com:443",
 		MetricExporterEndpointInsecure: false,
 		MetricReportingPeriod:          "30s",
 		MetricsEnabled:                 true,
@@ -461,6 +461,7 @@ func TestConfigurePropagators(t *testing.T) {
 		WithServiceName("test-service"),
 		WithSpanExporterEndpoint("localhost:443"),
 		WithPropagators([]string{"invalid"}),
+		WithMetricExporterEndpoint("localhost:443"),
 	)
 	defer lsOtel.Shutdown()