From 5fc81fbf18052bdb2e03f8a071a6fb38e4f4dfac Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Mon, 28 Feb 2022 15:39:27 -0500 Subject: [PATCH] Update to use channel trace --- controller/handler_ctrl/trace.go | 4 ++-- controller/handler_mgmt/stream_toggle_pipe_traces.go | 2 +- controller/handler_mgmt/stream_traces.go | 2 +- router/handler_ctrl/toggle_pipe_traces.go | 2 +- trace/channel_peekhandler.go | 2 +- trace/controller.go | 2 +- trace/event_handler.go | 2 +- trace/filter.go | 10 +++++----- trace/xgress_peekhandler.go | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/controller/handler_ctrl/trace.go b/controller/handler_ctrl/trace.go index ff9654a85..e6e1576d5 100644 --- a/controller/handler_ctrl/trace.go +++ b/controller/handler_ctrl/trace.go @@ -3,10 +3,10 @@ package handler_ctrl import ( "github.com/golang/protobuf/proto" "github.com/michaelquigley/pfxlog" + "github.com/openziti/channel" + "github.com/openziti/channel/trace/pb" "github.com/openziti/fabric/pb/ctrl_pb" "github.com/openziti/fabric/trace" - "github.com/openziti/channel" - trace_pb "github.com/openziti/foundation/trace/pb" ) type traceHandler struct { diff --git a/controller/handler_mgmt/stream_toggle_pipe_traces.go b/controller/handler_mgmt/stream_toggle_pipe_traces.go index f2f09f889..81fba06d2 100644 --- a/controller/handler_mgmt/stream_toggle_pipe_traces.go +++ b/controller/handler_mgmt/stream_toggle_pipe_traces.go @@ -20,12 +20,12 @@ import ( "fmt" "github.com/golang/protobuf/proto" "github.com/openziti/channel" + "github.com/openziti/channel/trace/pb" "github.com/openziti/fabric/controller/handler_common" "github.com/openziti/fabric/controller/network" "github.com/openziti/fabric/pb/ctrl_pb" "github.com/openziti/fabric/pb/mgmt_pb" "github.com/openziti/fabric/trace" - trace_pb "github.com/openziti/foundation/trace/pb" "sync" "time" ) diff --git a/controller/handler_mgmt/stream_traces.go b/controller/handler_mgmt/stream_traces.go index 33cd047a3..ccdcdafc1 100644 --- a/controller/handler_mgmt/stream_traces.go +++ b/controller/handler_mgmt/stream_traces.go @@ -20,12 +20,12 @@ import ( "github.com/golang/protobuf/proto" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel" + "github.com/openziti/channel/trace/pb" "github.com/openziti/fabric/controller/handler_common" "github.com/openziti/fabric/controller/network" "github.com/openziti/fabric/events" "github.com/openziti/fabric/pb/mgmt_pb" "github.com/openziti/fabric/trace" - "github.com/openziti/foundation/trace/pb" ) type streamTracesHandler struct { diff --git a/router/handler_ctrl/toggle_pipe_traces.go b/router/handler_ctrl/toggle_pipe_traces.go index b6386652a..779ed3813 100644 --- a/router/handler_ctrl/toggle_pipe_traces.go +++ b/router/handler_ctrl/toggle_pipe_traces.go @@ -20,10 +20,10 @@ import ( "github.com/golang/protobuf/proto" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel" + trace_pb "github.com/openziti/channel/trace/pb" "github.com/openziti/fabric/pb/ctrl_pb" "github.com/openziti/fabric/trace" "github.com/openziti/foundation/identity/identity" - trace_pb "github.com/openziti/foundation/trace/pb" ) func newTraceHandler(appId *identity.TokenId, controller trace.Controller) *traceHandler { diff --git a/trace/channel_peekhandler.go b/trace/channel_peekhandler.go index 98e9b9e58..bfe364077 100644 --- a/trace/channel_peekhandler.go +++ b/trace/channel_peekhandler.go @@ -21,10 +21,10 @@ import ( "github.com/golang/protobuf/proto" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel" + "github.com/openziti/channel/trace/pb" "github.com/openziti/fabric/pb/ctrl_pb" "github.com/openziti/fabric/pb/mgmt_pb" "github.com/openziti/fabric/router/xgress" - trace_pb "github.com/openziti/foundation/trace/pb" "github.com/openziti/foundation/util/concurrenz" "time" ) diff --git a/trace/controller.go b/trace/controller.go index c32d34978..2b99f474a 100644 --- a/trace/controller.go +++ b/trace/controller.go @@ -18,7 +18,7 @@ package trace import ( "fmt" - "github.com/openziti/foundation/trace/pb" + "github.com/openziti/channel/trace/pb" "regexp" "strings" ) diff --git a/trace/event_handler.go b/trace/event_handler.go index 2d033d6fd..52b6ff95c 100644 --- a/trace/event_handler.go +++ b/trace/event_handler.go @@ -17,8 +17,8 @@ package trace import ( + "github.com/openziti/channel/trace/pb" "github.com/openziti/fabric/event" - "github.com/openziti/foundation/trace/pb" "github.com/openziti/foundation/util/cowslice" ) diff --git a/trace/filter.go b/trace/filter.go index 37969c2ca..5377a5620 100644 --- a/trace/filter.go +++ b/trace/filter.go @@ -16,10 +16,10 @@ package trace -import tracepb "github.com/openziti/foundation/trace/pb" +import "github.com/openziti/channel/trace/pb" type Filter interface { - Accept(event *tracepb.ChannelMessage) bool + Accept(event *trace_pb.ChannelMessage) bool } func NewAllowAllFilter() Filter { @@ -36,7 +36,7 @@ func NewExcludeFilter(excludedContentTypes []int32) Filter { type allowAllFilter struct{} -func (*allowAllFilter) Accept(event *tracepb.ChannelMessage) bool { +func (*allowAllFilter) Accept(event *trace_pb.ChannelMessage) bool { return true } @@ -44,7 +44,7 @@ type includeFilter struct { contentTypes []int32 } -func (filter *includeFilter) Accept(event *tracepb.ChannelMessage) bool { +func (filter *includeFilter) Accept(event *trace_pb.ChannelMessage) bool { for _, contentType := range filter.contentTypes { if event.ContentType == contentType { return true @@ -57,7 +57,7 @@ type excludeFilter struct { contentTypes []int32 } -func (filter *excludeFilter) Accept(event *tracepb.ChannelMessage) bool { +func (filter *excludeFilter) Accept(event *trace_pb.ChannelMessage) bool { for _, contentType := range filter.contentTypes { if event.ContentType == contentType { return false diff --git a/trace/xgress_peekhandler.go b/trace/xgress_peekhandler.go index d8c38762c..aa85ecf5c 100644 --- a/trace/xgress_peekhandler.go +++ b/trace/xgress_peekhandler.go @@ -19,9 +19,9 @@ package trace import ( "fmt" "github.com/openziti/channel" + "github.com/openziti/channel/trace/pb" "github.com/openziti/fabric/router/xgress" "github.com/openziti/foundation/identity/identity" - trace_pb "github.com/openziti/foundation/trace/pb" "github.com/openziti/foundation/util/concurrenz" "time" )