diff --git a/pkg/actionlog/context.go b/pkg/actionlog/context.go index c0b740fbb..ba949af8a 100644 --- a/pkg/actionlog/context.go +++ b/pkg/actionlog/context.go @@ -8,13 +8,13 @@ import ( type ctxKey int const ( - RequestOrigin_APP_Init = "app/init" - RequestOrigin_APP_Upgrade = "app/upgrade" - RequestOrigin_APP_Activate = "app/activate" - RequestOrigin_APP_Provision = "app/provision" - RequestOrigin_APP_Run = "app/run" - RequestOrigin_HTTPServer_API_REST = "app/http-server/api/rest" - RequestOrigin_HTTPServer_API_GRPC = "app/http-server/api/grpc" + RequestOrigin_APP_Init = "app/init" + RequestOrigin_APP_Upgrade = "app/upgrade" + RequestOrigin_APP_Activate = "app/activate" + RequestOrigin_APP_Provision = "app/provision" + RequestOrigin_APP_Run = "app/run" + RequestOrigin_API_REST = "api/rest" + RequestOrigin_API_GRPC = "api/grpc" ) // RequestOriginKey is the key that holds th unique request ID in a request context. diff --git a/pkg/actionlog/service.go b/pkg/actionlog/service.go index 2686b4743..5fd025aac 100644 --- a/pkg/actionlog/service.go +++ b/pkg/actionlog/service.go @@ -5,11 +5,10 @@ import ( "strings" "github.com/go-chi/chi/middleware" + "go.uber.org/zap" "github.com/cortezaproject/corteza-server/pkg/api" "github.com/cortezaproject/corteza-server/pkg/auth" - - "go.uber.org/zap" ) type ( diff --git a/pkg/app/runner.go b/pkg/app/runner.go index 99e7e5b1b..2f6a0d416 100644 --- a/pkg/app/runner.go +++ b/pkg/app/runner.go @@ -245,7 +245,7 @@ func (r *runner) serve(ctx context.Context) (err error) { { wg.Add(1) go func(ctx context.Context) { - r.httpApiServer.Serve(actionlog.RequestOriginToContext(ctx, actionlog.RequestOrigin_HTTPServer_API_REST)) + r.httpApiServer.Serve(actionlog.RequestOriginToContext(ctx, actionlog.RequestOrigin_API_REST)) wg.Done() }(ctx) } @@ -253,7 +253,7 @@ func (r *runner) serve(ctx context.Context) (err error) { if r.grpcServer != nil { wg.Add(1) go func(ctx context.Context) { - r.grpcServer.Serve(actionlog.RequestOriginToContext(ctx, actionlog.RequestOrigin_HTTPServer_API_GRPC)) + r.grpcServer.Serve(actionlog.RequestOriginToContext(ctx, actionlog.RequestOrigin_API_GRPC)) wg.Done() }(ctx) diff --git a/system/rest/actionlog.go b/system/rest/actionlog.go index 48c4887da..09e1b758e 100644 --- a/system/rest/actionlog.go +++ b/system/rest/actionlog.go @@ -42,6 +42,7 @@ func (ctrl *Actionlog) List(ctx context.Context, r *request.ActionlogList) (inte To: r.To, ActorID: payload.ParseUInt64s(r.ActorID), Resource: r.Resource, + Action: r.Action, PageFilter: rh.Paging(r), })