Skip to content

Commit

Permalink
fix(backend): adding empty port as supported for tempo (#2704)
Browse files Browse the repository at this point in the history
fix(backend): adding empty port as supproted for tempo
  • Loading branch information
xoscar committed Jun 12, 2023
1 parent f40ff6b commit 2e8c2e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions server/tracedb/datasource/http.go
Expand Up @@ -9,9 +9,9 @@ import (
"fmt"
"io"
"net/http"
"net/url"
"strings"

"github.com/goware/urlx"
"github.com/kubeshop/tracetest/server/model"
"github.com/kubeshop/tracetest/server/tracedb/connection"
"github.com/kubeshop/tracetest/server/tracedb/datastoreresource"
Expand All @@ -25,7 +25,7 @@ type HttpClient struct {
}

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

func (client *HttpClient) Endpoint() string {
return client.config.Host
return client.config.URL.String()
}

func (client *HttpClient) Connect(ctx context.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion server/tracedb/tempodb.go
Expand Up @@ -23,7 +23,7 @@ import (
)

func tempoDefaultPorts() []string {
return []string{"9095"}
return []string{"9095", ""}
}

type tempoTraceDB struct {
Expand Down

0 comments on commit 2e8c2e4

Please sign in to comment.