Skip to content

Commit

Permalink
bump(deps): go.opentelemetry.io/otel/metric from v0.26.0 to v1.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsong committed Jun 23, 2023
1 parent 9d37b96 commit 1a07989
Show file tree
Hide file tree
Showing 361 changed files with 27,082 additions and 16,377 deletions.
1 change: 0 additions & 1 deletion cmd/varlogsn/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func newStartCommand() *cli.Command {

flagExporterType.StringFlag(false, "noop"),
flagExporterStopTimeout.DurationFlag(false, 5*time.Second),
flagStdoutExporterPrettyPrint.BoolFlag(),
flagOTLPExporterInsecure.BoolFlag(),
flagOTLPExporterEndpoint.StringFlag(false, ""),
},
Expand Down
5 changes: 0 additions & 5 deletions cmd/varlogsn/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,6 @@ var (
Usage: "timeout for stopping exporter",
Envs: []string{"EXPORTER_STOP_TIMEOUT"},
}
flagStdoutExporterPrettyPrint = flags.FlagDesc{
Name: "exporter-pretty-print",
Usage: "pretty print when using stdout exporter",
Envs: []string{"EXPORTER_PRETTY_PRINT"},
}
flagOTLPExporterInsecure = flags.FlagDesc{
Name: "exporter-otlp-insecure",
Usage: "disable client transport security for the OTLP exporter",
Expand Down
19 changes: 6 additions & 13 deletions cmd/varlogsn/varlogsn.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import (

"github.com/urfave/cli/v2"
"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc"
"go.opentelemetry.io/otel/exporters/stdout/stdoutmetric"
"go.opentelemetry.io/otel/metric"
metricsdk "go.opentelemetry.io/otel/sdk/export/metric"
"go.opentelemetry.io/otel/sdk/metric/selector/simple"
metricsdk "go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
_ "go.uber.org/automaxprocs"
"go.uber.org/multierr"
"go.uber.org/zap"
Expand Down Expand Up @@ -191,9 +189,9 @@ func initTelemetry(ctx context.Context, c *cli.Context, snid types.StorageNodeID
resource.WithFromEnv(),
resource.WithHost(),
resource.WithAttributes(
semconv.ServiceNameKey.String("sn"),
semconv.ServiceNamespaceKey.String("varlog"),
semconv.ServiceInstanceIDKey.Int64(int64(snid)),
semconv.ServiceName("sn"),
semconv.ServiceNamespace("varlog"),
semconv.ServiceInstanceID(snid.String()),
))
if err != nil {
return nil, nil, err
Expand All @@ -202,15 +200,10 @@ func initTelemetry(ctx context.Context, c *cli.Context, snid types.StorageNodeID
meterProviderOpts := []telemetry.MeterProviderOption{
telemetry.WithResource(res),
telemetry.WithRuntimeInstrumentation(),
telemetry.WithAggregatorSelector(simple.NewWithInexpensiveDistribution()),
}
switch strings.ToLower(c.String(flagExporterType.Name)) {
case "stdout":
var opts []stdoutmetric.Option
if c.Bool(flagStdoutExporterPrettyPrint.Name) {
opts = append(opts, stdoutmetric.WithPrettyPrint())
}
exporter, shutdown, err = telemetry.NewStdoutExporter(opts...)
exporter, shutdown, err = telemetry.NewStdoutExporter()
case "otlp":
var opts []otlpmetricgrpc.Option
if c.Bool(flagOTLPExporterInsecure.Name) {
Expand Down
43 changes: 22 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ require (
github.com/stretchr/testify v1.8.4
github.com/urfave/cli/v2 v2.25.6
go.etcd.io/etcd v0.5.0-alpha.5.0.20230414071934-94593e63d45c
go.opentelemetry.io/contrib/instrumentation/host v0.27.0
go.opentelemetry.io/contrib/instrumentation/runtime v0.27.0
go.opentelemetry.io/otel v1.15.1
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.26.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.26.0
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.26.0
go.opentelemetry.io/otel/metric v0.26.0
go.opentelemetry.io/otel/sdk v1.15.1
go.opentelemetry.io/otel/sdk/export/metric v0.26.0
go.opentelemetry.io/otel/sdk/metric v0.26.0
go.opentelemetry.io/contrib/instrumentation/host v0.42.0
go.opentelemetry.io/contrib/instrumentation/runtime v0.42.0
go.opentelemetry.io/otel v1.16.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.39.0
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.39.0
go.opentelemetry.io/otel/metric v1.16.0
go.opentelemetry.io/otel/sdk v1.16.0
go.opentelemetry.io/otel/sdk/metric v0.39.0
go.uber.org/automaxprocs v1.5.2
go.uber.org/goleak v1.2.1
go.uber.org/multierr v1.11.0
Expand All @@ -48,10 +46,9 @@ require (

require (
github.com/DataDog/zstd v1.4.5 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.8.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect
Expand All @@ -66,7 +63,7 @@ require (
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
Expand All @@ -77,36 +74,40 @@ require (
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_golang v1.12.0 // indirect
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil/v3 v3.21.9 // indirect
github.com/shirou/gopsutil/v3 v3.23.4 // indirect
github.com/shoenig/go-m1cpu v0.1.5 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tklauser/go-sysconf v0.3.9 // indirect
github.com/tklauser/numcpus v0.3.0 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0 // indirect
go.opentelemetry.io/otel/internal/metric v0.26.0 // indirect
go.opentelemetry.io/otel/trace v1.15.1 // indirect
go.opentelemetry.io/proto/otlp v0.11.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/mod v0.11.0 // indirect
golang.org/x/net v0.11.0 // indirect
Expand Down
Loading

0 comments on commit 1a07989

Please sign in to comment.