Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v1.26.2 (release.sh) #169

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/aws-elasticbeanstalk/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.1
replace github.com/uptrace/uptrace-go => ../..

require (
github.com/uptrace/uptrace-go v1.26.0
github.com/uptrace/uptrace-go v1.26.2
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0
go.opentelemetry.io/otel/trace v1.26.0
)
Expand Down
2 changes: 1 addition & 1 deletion example/aws-lambda/function/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/aws/aws-lambda-go v1.47.0
github.com/aws/aws-sdk-go-v2/config v1.27.11
github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1
github.com/uptrace/uptrace-go v1.26.0
github.com/uptrace/uptrace-go v1.26.2
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.51.0
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.51.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0
Expand Down
2 changes: 1 addition & 1 deletion example/basic/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.1
replace github.com/uptrace/uptrace-go => ../..

require (
github.com/uptrace/uptrace-go v1.26.0
github.com/uptrace/uptrace-go v1.26.2
go.opentelemetry.io/otel v1.26.0
go.opentelemetry.io/otel/trace v1.26.0
)
Expand Down
2 changes: 1 addition & 1 deletion example/metrics/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.1
replace github.com/uptrace/uptrace-go => ../..

require (
github.com/uptrace/uptrace-go v1.26.0
github.com/uptrace/uptrace-go v1.26.2
go.opentelemetry.io/otel v1.26.0
go.opentelemetry.io/otel/metric v1.26.0
)
Expand Down
2 changes: 1 addition & 1 deletion example/otel-api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.1
replace github.com/uptrace/uptrace-go => ../..

require (
github.com/uptrace/uptrace-go v1.26.0
github.com/uptrace/uptrace-go v1.26.2
go.opentelemetry.io/otel v1.26.0
go.opentelemetry.io/otel/trace v1.26.0
)
Expand Down
2 changes: 1 addition & 1 deletion example/panic/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.22.1

replace github.com/uptrace/uptrace-go => ../..

require github.com/uptrace/uptrace-go v1.26.0
require github.com/uptrace/uptrace-go v1.26.2

require (
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion example/tutorial/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ replace github.com/uptrace/uptrace-go => ../..

require (
github.com/uptrace/opentelemetry-go-extra/otelzap v0.2.4
github.com/uptrace/uptrace-go v1.26.0
github.com/uptrace/uptrace-go v1.26.2
go.opentelemetry.io/otel v1.26.0
go.uber.org/zap v1.27.0
)
Expand Down
2 changes: 1 addition & 1 deletion example/zerolog-vector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ replace github.com/uptrace/uptrace-go => ../..

require (
github.com/rs/zerolog v1.32.0
github.com/uptrace/uptrace-go v1.26.0
github.com/uptrace/uptrace-go v1.26.2
go.opentelemetry.io/otel v1.26.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)
Expand Down
8 changes: 8 additions & 0 deletions uptrace/dsn.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ func ParseDSN(dsnStr string) (*DSN, error) {
if dsn.Host == "api.uptrace.dev" {
dsn.Host = "uptrace.dev"
}
if dsn.HTTPPort == "" {
switch dsn.Scheme {
case "http":
dsn.HTTPPort = "80"
case "https":
dsn.HTTPPort = "443"
}
}

query := u.Query()
if grpc := query.Get("grpc"); grpc != "" {
Expand Down
39 changes: 32 additions & 7 deletions uptrace/dsn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,61 @@ import (
func TestParseDSN(t *testing.T) {
type Test struct {
dsn string
otlp string
grpc string
http string
siteURL string
}

tests := []Test{
{"https://[email protected]/1", "otlp.uptrace.dev:4317", "https://app.uptrace.dev"},
{"https://[email protected]/1", "otlp.uptrace.dev:4317", "https://app.uptrace.dev"},
{
"https://[email protected]/1",
"otlp.uptrace.dev:4317",
"otlp.uptrace.dev:443",
"https://app.uptrace.dev",
},
{
"https://[email protected]/1",
"otlp.uptrace.dev:4317",
"otlp.uptrace.dev:443",
"https://app.uptrace.dev",
},
{
"https://[email protected]/1?grpc=4317",
"demo.uptrace.dev:4317",
"https://demo.uptrace.dev",
"demo.uptrace.dev:443",
"https://demo.uptrace.dev:443",
},
{
"https://token@localhost:1234/1",
"localhost:1234",
"localhost:1234",
"https://localhost:1234",
},
{
"http://token@localhost:14317/project_id",
"localhost:14317",
"localhost:14318",
"http://localhost:14318",
},
{"https://token@localhost:1234/1", "localhost:1234", "https://localhost:1234"},
{"http://token@localhost:14317/project_id", "localhost:14317", "http://localhost:14318"},
{
"https://[email protected]:4317/1",
"demo-api.uptrace.dev:4317",
"demo-api.uptrace.dev:4317",
"https://demo-api.uptrace.dev:4317",
},
{
"http://Qcn7rcwWO_w0ePo7WmeUtw@localhost:14318?grpc=14317",
"localhost:14317",
"localhost:14318",
"http://localhost:14318",
},
}
for i, test := range tests {
t.Run(fmt.Sprint(i), func(t *testing.T) {
dsn, err := uptrace.ParseDSN(test.dsn)
require.NoError(t, err)
require.Equal(t, test.otlp, dsn.OTLPEndpoint())
require.Equal(t, test.grpc, dsn.OTLPGrpcEndpoint())
require.Equal(t, test.http, dsn.OTLPHttpEndpoint())
require.Equal(t, test.siteURL, dsn.SiteURL())
})
}
Expand Down
2 changes: 1 addition & 1 deletion uptrace/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package uptrace

// Version is the current release version.
func Version() string {
return "1.26.0"
return "1.26.2"
}
Loading