We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0ab2b6 commit 75b898dCopy full SHA for 75b898d
1 file changed
uptrace/dsn.go
@@ -2,6 +2,7 @@ package uptrace
2
3
import (
4
"fmt"
5
+ "net"
6
"net/url"
7
)
8
@@ -23,7 +24,11 @@ func (dsn *DSN) AppHost() string {
23
24
if dsn.Host == "uptrace.dev" {
25
return "app.uptrace.dev"
26
}
- return dsn.Host
27
+ host, _, err := net.SplitHostPort(dsn.Host)
28
+ if err != nil {
29
+ return dsn.Host
30
+ }
31
+ return net.JoinHostPort(host, "15678")
32
33
34
func (dsn *DSN) OTLPHost() string {
@@ -59,7 +64,7 @@ func ParseDSN(dsnStr string) (*DSN, error) {
59
64
if dsn.Host == "api.uptrace.dev" {
60
65
dsn.Host = "uptrace.dev"
61
66
62
- if dsn.Host == "uptrace.dev" {
67
+ if dsn.Host != "uptrace.dev" {
63
68
return &dsn, nil
69
70
0 commit comments