From 1c1f5c91670a3fb9a208d625966707632d0554b9 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 1 Sep 2021 14:22:54 +0200 Subject: [PATCH 1/3] tracing: use tracing agent instead of collector --- accounts/pkg/tracing/tracing.go | 2 +- glauth/pkg/tracing/tracing.go | 2 +- graph-explorer/pkg/tracing/tracing.go | 2 +- graph/pkg/tracing/tracing.go | 2 +- idp/pkg/tracing/tracing.go | 2 +- ocis-pkg/tracing/tracing.go | 62 +++++++++++++++++---- ocis-pkg/tracing/tracing_test.go | 77 +++++++++++++++++++++++++++ ocs/pkg/tracing/tracing.go | 2 +- proxy/pkg/tracing/tracing.go | 2 +- settings/pkg/tracing/tracing.go | 2 +- store/pkg/tracing/tracing.go | 2 +- thumbnails/pkg/tracing/tracing.go | 2 +- web/pkg/tracing/tracing.go | 2 +- webdav/pkg/tracing/tracing.go | 2 +- 14 files changed, 142 insertions(+), 21 deletions(-) create mode 100644 ocis-pkg/tracing/tracing_test.go diff --git a/accounts/pkg/tracing/tracing.go b/accounts/pkg/tracing/tracing.go index 2a8263a85e0..ab83f0fc8e7 100644 --- a/accounts/pkg/tracing/tracing.go +++ b/accounts/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "accounts"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "accounts", cfg.Tracing.Type); err != nil { return err } diff --git a/glauth/pkg/tracing/tracing.go b/glauth/pkg/tracing/tracing.go index 1ea50a2d6de..20a2dfd10da 100644 --- a/glauth/pkg/tracing/tracing.go +++ b/glauth/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "glauth"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "glauth", cfg.Tracing.Type); err != nil { return err } diff --git a/graph-explorer/pkg/tracing/tracing.go b/graph-explorer/pkg/tracing/tracing.go index d76a0c3e820..88e057a80e0 100644 --- a/graph-explorer/pkg/tracing/tracing.go +++ b/graph-explorer/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "graph-explorer"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "graph-explorer", cfg.Tracing.Type); err != nil { return err } diff --git a/graph/pkg/tracing/tracing.go b/graph/pkg/tracing/tracing.go index e0ee16cefd8..5fcbd521d86 100644 --- a/graph/pkg/tracing/tracing.go +++ b/graph/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "graph"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "graph", cfg.Tracing.Type); err != nil { return err } diff --git a/idp/pkg/tracing/tracing.go b/idp/pkg/tracing/tracing.go index 4426d67625b..d64481e9057 100644 --- a/idp/pkg/tracing/tracing.go +++ b/idp/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "idp"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "idp", cfg.Tracing.Type); err != nil { return err } diff --git a/ocis-pkg/tracing/tracing.go b/ocis-pkg/tracing/tracing.go index 4ca4c8581f1..f12664b9dd4 100644 --- a/ocis-pkg/tracing/tracing.go +++ b/ocis-pkg/tracing/tracing.go @@ -2,6 +2,8 @@ package tracing import ( "fmt" + "net/url" + "strings" "go.opentelemetry.io/otel/exporters/jaeger" "go.opentelemetry.io/otel/propagation" @@ -17,18 +19,36 @@ var Propagator = propagation.NewCompositeTextMapPropagator( ) // GetTraceProvider returns a configured open-telemetry trace provider. -func GetTraceProvider(collectorEndpoint, traceType, serviceName string) (*sdktrace.TracerProvider, error) { +func GetTraceProvider(agentEndpoint, collectorEndpoint, serviceName, traceType string) (*sdktrace.TracerProvider, error) { switch t := traceType; t { case "jaeger": - if collectorEndpoint == "" { - return sdktrace.NewTracerProvider(), nil - } - - exp, err := jaeger.New( - jaeger.WithCollectorEndpoint( - jaeger.WithEndpoint(collectorEndpoint), - ), + var ( + exp *jaeger.Exporter + err error ) + + if agentEndpoint != "" { + var agentHost string + var agentPort string + + agentHost, agentPort, err = parseAgentConfig(agentEndpoint) + if err != nil { + return nil, err + } + + exp, err = jaeger.New( + jaeger.WithAgentEndpoint( + jaeger.WithAgentHost(agentHost), + jaeger.WithAgentPort(agentPort), + ), + ) + } else if collectorEndpoint != "" { + exp, err = jaeger.New( + jaeger.WithCollectorEndpoint( + jaeger.WithEndpoint(collectorEndpoint), + ), + ) + } if err != nil { return nil, err } @@ -49,3 +69,27 @@ func GetTraceProvider(collectorEndpoint, traceType, serviceName string) (*sdktra return nil, fmt.Errorf("invalid trace configuration") } } + +func parseAgentConfig(ae string) (string, string, error) { + u, err := url.Parse(ae) + // as per url.go: + // [...] Trying to parse a hostname and path + // without a scheme is invalid but may not necessarily return an + // error, due to parsing ambiguities. + if err == nil && u.Hostname() != "" && u.Port() != "" { + return u.Hostname(), u.Port(), nil + } + + p := strings.Split(ae, ":") + if len(p) != 2 { + return "", "", fmt.Errorf(fmt.Sprintf("invalid agent endpoint `%s`. expected format: `hostname:port`", ae)) + } + + switch { + case p[0] == "" && p[1] == "": // case ae = ":" + return "", "", fmt.Errorf(fmt.Sprintf("invalid agent endpoint `%s`. expected format: `hostname:port`", ae)) + case p[0] == "": + return "", "", fmt.Errorf(fmt.Sprintf("invalid agent endpoint `%s`. expected format: `hostname:port`", ae)) + } + return p[0], p[1], nil +} diff --git a/ocis-pkg/tracing/tracing_test.go b/ocis-pkg/tracing/tracing_test.go new file mode 100644 index 00000000000..a2509bfe37f --- /dev/null +++ b/ocis-pkg/tracing/tracing_test.go @@ -0,0 +1,77 @@ +package tracing + +import "testing" + +func Test_parseAgentConfig(t *testing.T) { + type args struct { + ae string + } + tests := []struct { + name string + args args + want string + want1 string + wantErr bool + }{ + { + name: "docker-style config", + args: args{ + ae: "docker-jaeger:6666", + }, + want: "docker-jaeger", + want1: "6666", + wantErr: false, + }, + { + name: "agent in an url config", + args: args{ + ae: "https://example-agent.com:6666", + }, + want: "example-agent.com", + want1: "6666", + wantErr: false, + }, + { + name: "agent as ipv4", + args: args{ + ae: "127.0.0.1:6666", + }, + want: "127.0.0.1", + want1: "6666", + wantErr: false, + }, + { + name: "no hostname config should error", + args: args{ + ae: ":6666", + }, + want: "", + want1: "", + wantErr: true, + }, + { + name: "no hostname nor port but separator should error", + args: args{ + ae: ":", + }, + want: "", + want1: "", + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, got1, err := parseAgentConfig(tt.args.ae) + if (err != nil) != tt.wantErr { + t.Errorf("parseAgentConfig() error = %v, wantErr %v", err, tt.wantErr) + return + } + if got != tt.want { + t.Errorf("parseAgentConfig() got = %v, want %v", got, tt.want) + } + if got1 != tt.want1 { + t.Errorf("parseAgentConfig() got1 = %v, want %v", got1, tt.want1) + } + }) + } +} diff --git a/ocs/pkg/tracing/tracing.go b/ocs/pkg/tracing/tracing.go index e8c6f101e86..771085c162e 100644 --- a/ocs/pkg/tracing/tracing.go +++ b/ocs/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "ocs"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "ocs", cfg.Tracing.Type); err != nil { return err } diff --git a/proxy/pkg/tracing/tracing.go b/proxy/pkg/tracing/tracing.go index ffe29a220ec..d88d07332ee 100644 --- a/proxy/pkg/tracing/tracing.go +++ b/proxy/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "proxy"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "proxy", cfg.Tracing.Type); err != nil { return err } diff --git a/settings/pkg/tracing/tracing.go b/settings/pkg/tracing/tracing.go index 678ee7f55f6..b3ce213c697 100644 --- a/settings/pkg/tracing/tracing.go +++ b/settings/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "settings"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "settings", cfg.Tracing.Type); err != nil { return err } diff --git a/store/pkg/tracing/tracing.go b/store/pkg/tracing/tracing.go index 6f91bb967e7..1cf23565d63 100644 --- a/store/pkg/tracing/tracing.go +++ b/store/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "store"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "store", cfg.Tracing.Type); err != nil { return err } diff --git a/thumbnails/pkg/tracing/tracing.go b/thumbnails/pkg/tracing/tracing.go index e5ca712bc49..19adcc76201 100644 --- a/thumbnails/pkg/tracing/tracing.go +++ b/thumbnails/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "thumbnails"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "thumbnails", cfg.Tracing.Type); err != nil { return err } diff --git a/web/pkg/tracing/tracing.go b/web/pkg/tracing/tracing.go index d3e2a93659e..31b46e4c1dc 100644 --- a/web/pkg/tracing/tracing.go +++ b/web/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "web"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "web", cfg.Tracing.Type); err != nil { return err } diff --git a/webdav/pkg/tracing/tracing.go b/webdav/pkg/tracing/tracing.go index ebc16f2f855..891bfdb236b 100644 --- a/webdav/pkg/tracing/tracing.go +++ b/webdav/pkg/tracing/tracing.go @@ -13,7 +13,7 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Collector, cfg.Tracing.Type, "webdav"); err != nil { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "webdav", cfg.Tracing.Type); err != nil { return err } From bee17dbe299b0750bb8d36e652971ce4ab3e1649 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 1 Sep 2021 14:36:13 +0200 Subject: [PATCH 2/3] tracing: fix exporter config --- accounts/pkg/tracing/tracing.go | 6 ++++-- glauth/pkg/tracing/tracing.go | 6 ++++-- graph-explorer/pkg/tracing/tracing.go | 6 ++++-- graph/pkg/tracing/tracing.go | 6 ++++-- idp/pkg/tracing/tracing.go | 6 ++++-- ocs/pkg/tracing/tracing.go | 6 ++++-- proxy/pkg/tracing/tracing.go | 6 ++++-- settings/pkg/tracing/tracing.go | 6 ++++-- store/pkg/tracing/tracing.go | 6 ++++-- thumbnails/pkg/tracing/tracing.go | 6 ++++-- web/pkg/tracing/tracing.go | 6 ++++-- webdav/pkg/tracing/tracing.go | 6 ++++-- 12 files changed, 48 insertions(+), 24 deletions(-) diff --git a/accounts/pkg/tracing/tracing.go b/accounts/pkg/tracing/tracing.go index ab83f0fc8e7..4da38009fe9 100644 --- a/accounts/pkg/tracing/tracing.go +++ b/accounts/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "accounts", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "accounts", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/glauth/pkg/tracing/tracing.go b/glauth/pkg/tracing/tracing.go index 20a2dfd10da..a02161687bf 100644 --- a/glauth/pkg/tracing/tracing.go +++ b/glauth/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "glauth", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "glauth", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/graph-explorer/pkg/tracing/tracing.go b/graph-explorer/pkg/tracing/tracing.go index 88e057a80e0..b7fe7a3f631 100644 --- a/graph-explorer/pkg/tracing/tracing.go +++ b/graph-explorer/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "graph-explorer", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "graph-explorer", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/graph/pkg/tracing/tracing.go b/graph/pkg/tracing/tracing.go index 5fcbd521d86..5e67b08eb4c 100644 --- a/graph/pkg/tracing/tracing.go +++ b/graph/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "graph", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "graph", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/idp/pkg/tracing/tracing.go b/idp/pkg/tracing/tracing.go index d64481e9057..eb116d6ce35 100644 --- a/idp/pkg/tracing/tracing.go +++ b/idp/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "idp", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "idp", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/ocs/pkg/tracing/tracing.go b/ocs/pkg/tracing/tracing.go index 771085c162e..d79ef622fe0 100644 --- a/ocs/pkg/tracing/tracing.go +++ b/ocs/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "ocs", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "ocs", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/proxy/pkg/tracing/tracing.go b/proxy/pkg/tracing/tracing.go index d88d07332ee..e3b3aa50c03 100644 --- a/proxy/pkg/tracing/tracing.go +++ b/proxy/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "proxy", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "proxy", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/settings/pkg/tracing/tracing.go b/settings/pkg/tracing/tracing.go index b3ce213c697..09d85008bdb 100644 --- a/settings/pkg/tracing/tracing.go +++ b/settings/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "settings", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "settings", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/store/pkg/tracing/tracing.go b/store/pkg/tracing/tracing.go index 1cf23565d63..b6f66479ff7 100644 --- a/store/pkg/tracing/tracing.go +++ b/store/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "store", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "store", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/thumbnails/pkg/tracing/tracing.go b/thumbnails/pkg/tracing/tracing.go index 19adcc76201..6bbd7afc844 100644 --- a/thumbnails/pkg/tracing/tracing.go +++ b/thumbnails/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "thumbnails", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "thumbnails", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/web/pkg/tracing/tracing.go b/web/pkg/tracing/tracing.go index 31b46e4c1dc..1bd7caf66ab 100644 --- a/web/pkg/tracing/tracing.go +++ b/web/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "web", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "web", cfg.Tracing.Type); err != nil { + return err + } } return nil diff --git a/webdav/pkg/tracing/tracing.go b/webdav/pkg/tracing/tracing.go index 891bfdb236b..f3efeecd004 100644 --- a/webdav/pkg/tracing/tracing.go +++ b/webdav/pkg/tracing/tracing.go @@ -13,8 +13,10 @@ var ( func Configure(cfg *config.Config) error { var err error - if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "webdav", cfg.Tracing.Type); err != nil { - return err + if cfg.Tracing.Enabled { + if TraceProvider, err = pkgtrace.GetTraceProvider(cfg.Tracing.Endpoint, cfg.Tracing.Collector, "webdav", cfg.Tracing.Type); err != nil { + return err + } } return nil From 84d6962d15b2ea98a1e7639fac4b82d1f0a58d00 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Fri, 3 Sep 2021 15:15:32 +0200 Subject: [PATCH 3/3] update reva to latest master --- go.mod | 8 ++++++-- go.sum | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index b688407f824..f96e0f1088b 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/owncloud/ocis go 1.16 require ( + contrib.go.opencensus.io/exporter/jaeger v0.2.1 // indirect github.com/CiscoM31/godata v1.0.4 github.com/GeertJohan/yubigo v0.0.0-20190917122436-175bc097e60e github.com/asim/go-micro/plugins/client/grpc/v3 v3.0.0-20210812172626-c7195aae9817 @@ -19,12 +20,13 @@ require ( github.com/asim/go-micro/v3 v3.6.0 github.com/blevesearch/bleve/v2 v2.1.0 github.com/coreos/go-oidc/v3 v3.0.0 - github.com/cs3org/go-cs3apis v0.0.0-20210802070913-970eec344e59 - github.com/cs3org/reva v1.12.0 + github.com/cs3org/go-cs3apis v0.0.0-20210812121411-f18cf19614e8 + github.com/cs3org/reva v1.12.1-0.20210903075054-73f10ed5ab21 github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth v1.1.3-0.20210729125545-b9aecdfcac31 github.com/go-chi/chi/v5 v5.0.3 github.com/go-chi/render v1.0.1 + github.com/go-kit/kit v0.10.0 // indirect github.com/go-logr/logr v0.4.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/gofrs/uuid v4.0.0+incompatible @@ -34,6 +36,7 @@ require ( github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 + github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/iancoleman/strcase v0.2.0 github.com/justinas/alice v1.2.0 github.com/libregraph/lico v0.34.1-0.20210803054646-b584e0372224 @@ -60,6 +63,7 @@ require ( go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.22.0 go.opentelemetry.io/otel v1.0.0-RC2 go.opentelemetry.io/otel/exporters/jaeger v1.0.0-RC2 + go.opentelemetry.io/otel/metric v0.20.0 // indirect go.opentelemetry.io/otel/sdk v1.0.0-RC2 go.opentelemetry.io/otel/trace v1.0.0-RC2 golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 diff --git a/go.sum b/go.sum index 8cddf2227e4..bf987436cb9 100644 --- a/go.sum +++ b/go.sum @@ -45,6 +45,8 @@ contrib.go.opencensus.io/exporter/jaeger v0.2.1/go.mod h1:Y8IsLgdxqh1QxYxPC5IgXV contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= contrib.go.opencensus.io/exporter/prometheus v0.3.0 h1:08FMdJYpItzsknogU6PiiNo7XQZg/25GjH236+YCwD0= contrib.go.opencensus.io/exporter/prometheus v0.3.0/go.mod h1:rpCPVQKhiyH8oomWgm34ZmgIdZa8OVYO5WAIygPbBBE= +contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= +contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v32.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= @@ -309,8 +311,14 @@ github.com/crewjam/saml v0.4.5/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4= github.com/cs3org/go-cs3apis v0.0.0-20210802070913-970eec344e59 h1:cj9HxIbmbGn+HPpFP8nZ8oaNUsoFa0+cheCO8FUNoMc= github.com/cs3org/go-cs3apis v0.0.0-20210802070913-970eec344e59/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= +github.com/cs3org/go-cs3apis v0.0.0-20210812121411-f18cf19614e8 h1:bqUkE0l5wD62TKH6HkbSVYwyYzZ0PIeak/hnW7ggUdU= +github.com/cs3org/go-cs3apis v0.0.0-20210812121411-f18cf19614e8/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/cs3org/reva v1.12.0 h1:31Z+9+rLXUHRP3K6U3LK2wWLJUuicFjeFc2iZGg7rWE= github.com/cs3org/reva v1.12.0/go.mod h1:Fx2PHTX2Y3s/aNG/APpCbmttg5STWnxjD4DpnqdwjQc= +github.com/cs3org/reva v1.12.1-0.20210903075054-73f10ed5ab21 h1:noPCV/0p9EkjpNUQs1K+/U3f+twBefGJSRaPunhI2TA= +github.com/cs3org/reva v1.12.1-0.20210903075054-73f10ed5ab21/go.mod h1:5dEcJZiu8FoxUYR+apy7lkBl5AGiXWwqBzmm/6zCRuE= +github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= +github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -423,12 +431,14 @@ github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3I github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-ldap/ldap/v3 v3.1.7/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= github.com/go-ldap/ldap/v3 v3.3.0 h1:lwx+SJpgOHd8tG6SumBQZXCmNX51zM8B1cfxJ5gv4tQ= github.com/go-ldap/ldap/v3 v3.3.0/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -505,6 +515,8 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -812,6 +824,8 @@ github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7 github.com/miekg/dns v1.1.40/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/mileusna/useragent v1.0.2 h1:DgVKtiPnjxlb73z9bCwgdUvU2nQNQ97uhgfO8l9uz/w= +github.com/mileusna/useragent v1.0.2/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4ccGOMKNYYc= github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/minio-go/v7 v7.0.12 h1:/4pxUdwn9w0QEryNkrrWaodIESPRX+NxpO0Q6hVdaAA= @@ -1004,6 +1018,8 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20170703101242-e645f4e5aaa8/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1020,6 +1036,8 @@ github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3x github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/statsd_exporter v0.20.0 h1:M0hQphnq2WyWKS5CefQL8PqWwBOBPhiAkyLo5l4ZYvE= github.com/prometheus/statsd_exporter v0.20.0/go.mod h1:YL3FWCG8JBBtaUSxAg4Gz2ZYu22bS84XM89ZQXXTWmQ= +github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= +github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKcyumwBO6qip7RNQ5r77yrssm9bfCowcLEBcU5IA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1386,6 +1404,7 @@ golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5o golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1400,6 +1419,7 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210615190721-d04028783cf1 h1:x622Z2o4hgCr/4CiKWc51jHVKaWdtVpBNmEI8wI9Qns= golang.org/x/oauth2 v0.0.0-20210615190721-d04028783cf1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=