Skip to content

Commit 2e8c2e4

Browse files
authored
fix(backend): adding empty port as supported for tempo (#2704)
fix(backend): adding empty port as supproted for tempo
1 parent f40ff6b commit 2e8c2e4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server/tracedb/datasource/http.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"fmt"
1010
"io"
1111
"net/http"
12-
"net/url"
1312
"strings"
1413

14+
"github.com/goware/urlx"
1515
"github.com/kubeshop/tracetest/server/model"
1616
"github.com/kubeshop/tracetest/server/tracedb/connection"
1717
"github.com/kubeshop/tracetest/server/tracedb/datastoreresource"
@@ -25,7 +25,7 @@ type HttpClient struct {
2525
}
2626

2727
func NewHttpClient(name string, config *datastoreresource.HttpClientConfig, callback HttpCallback) DataSource {
28-
endpoint, _ := url.Parse(config.Url)
28+
endpoint, _ := urlx.Parse(config.Url)
2929
client := &http.Client{
3030
Transport: &http.Transport{
3131
TLSClientConfig: getTlsConfig(config.TLS),
@@ -63,7 +63,7 @@ func (client *HttpClient) GetTraceByID(ctx context.Context, traceID string) (mod
6363
}
6464

6565
func (client *HttpClient) Endpoint() string {
66-
return client.config.Host
66+
return client.config.URL.String()
6767
}
6868

6969
func (client *HttpClient) Connect(ctx context.Context) error {

server/tracedb/tempodb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
)
2424

2525
func tempoDefaultPorts() []string {
26-
return []string{"9095"}
26+
return []string{"9095", ""}
2727
}
2828

2929
type tempoTraceDB struct {

0 commit comments

Comments
 (0)