diff --git a/exporters/zipkin/zipkin.go b/exporters/zipkin/zipkin.go index d9fb1604fda..8de40472224 100644 --- a/exporters/zipkin/zipkin.go +++ b/exporters/zipkin/zipkin.go @@ -91,10 +91,10 @@ func New(collectorURL string, opts ...Option) (*Exporter, error) { } u, err := url.Parse(collectorURL) if err != nil { - return nil, fmt.Errorf("invalid collector URL: %v", err) + return nil, fmt.Errorf("invalid collector URL %q: %v", collectorURL, err) } if u.Scheme == "" || u.Host == "" { - return nil, errors.New("invalid collector URL") + return nil, fmt.Errorf("invalid collector URL %q: no scheme or host", collectorURL) } cfg := config{} diff --git a/exporters/zipkin/zipkin_test.go b/exporters/zipkin/zipkin_test.go index bac8cdc2950..3e8e9c910ff 100644 --- a/exporters/zipkin/zipkin_test.go +++ b/exporters/zipkin/zipkin_test.go @@ -71,7 +71,7 @@ func TestNewRawExporterShouldFailInvalidCollectorURL(t *testing.T) { ) assert.Error(t, err) - assert.EqualError(t, err, "invalid collector URL") + assert.EqualError(t, err, "invalid collector URL \"localhost\": no scheme or host") assert.Nil(t, exp) }