Skip to content

Commit

Permalink
Merge pull request #51 from vroldanbet/update-deps
Browse files Browse the repository at this point in the history
update all dependencies and drop jaeger exporter
  • Loading branch information
jzelinskie authored Oct 16, 2023
2 parents b466959 + 2dfbbea commit 9f8a4f6
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 197 deletions.
29 changes: 0 additions & 29 deletions cobraotel/cobraotel.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package cobraotel
import (
"context"
"fmt"
"net/url"
"runtime/debug"
"strings"

Expand All @@ -17,7 +16,6 @@ import (
"go.opentelemetry.io/contrib/propagators/b3"
"go.opentelemetry.io/contrib/propagators/ot"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
Expand Down Expand Up @@ -118,33 +116,6 @@ func (b *Builder) RunE() cobrautil.CobraRunFunc {
switch provider {
case "none":
// Nothing.
case "jaeger":
// Legacy flags! Will eventually be dropped!
b.logger.V(0).Info("jaeger provider is deprecated; migrate to OpenTelemetry")
endpoint = stringz.DefaultEmpty(endpoint, cobrautil.MustGetString(cmd, "otel-jaeger-endpoint"))
serviceName = stringz.Default(serviceName, cobrautil.MustGetString(cmd, "otel-jaeger-service-name"), "", cmd.Flags().Lookup(b.prefix("service-name")).DefValue)

var opts []jaeger.CollectorEndpointOption

if endpoint != "" {
parsed, err := url.Parse(endpoint)
if err != nil {
return fmt.Errorf("failed to parse endpoint: %w", err)
}
if (insecure && parsed.Scheme == "https") || (!insecure && parsed.Scheme == "http") {
return fmt.Errorf("endpoint schema is %s but insecure flag is set to %t", parsed.Scheme, insecure)
}
opts = append(opts, jaeger.WithEndpoint(endpoint))
}

exporter, err = jaeger.New(jaeger.WithCollectorEndpoint(opts...))
if err != nil {
return err
}

if err := initOtelTracer(exporter, serviceName, propagators, sampleRatio); err != nil {
return err
}
case "otlphttp":
var opts []otlptracehttp.Option
if endpoint != "" {
Expand Down
78 changes: 39 additions & 39 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,53 @@ module github.com/jzelinskie/cobrautil/v2
go 1.18

require (
github.com/go-logr/logr v1.2.3
github.com/go-logr/logr v1.2.4
github.com/joho/godotenv v1.5.1
github.com/jzelinskie/stringz v0.0.1
github.com/mattn/go-isatty v0.0.16
github.com/rs/zerolog v1.28.0
github.com/spf13/cobra v1.5.0
github.com/jzelinskie/stringz v0.0.2
github.com/mattn/go-isatty v0.0.19
github.com/rs/zerolog v1.31.0
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.13.0
go.opentelemetry.io/contrib/propagators/b3 v1.10.0
go.opentelemetry.io/contrib/propagators/ot v1.10.0
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/exporters/jaeger v1.10.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0
go.opentelemetry.io/otel/sdk v1.10.0
google.golang.org/grpc v1.49.0
github.com/spf13/viper v1.17.0
go.opentelemetry.io/contrib/propagators/b3 v1.20.0
go.opentelemetry.io/contrib/propagators/ot v1.20.0
go.opentelemetry.io/otel v1.19.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0
go.opentelemetry.io/otel/sdk v1.19.0
google.golang.org/grpc v1.58.3
)

require (
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
go.opentelemetry.io/otel/trace v1.10.0 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
google.golang.org/protobuf v1.28.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 9f8a4f6

Please sign in to comment.