Skip to content

Commit

Permalink
Merge branch 'feature/fix-monitor' into 'develop'
Browse files Browse the repository at this point in the history
打印报错输出

See merge request goku/apinto!187
  • Loading branch information
刘健 committed Jan 18, 2023
2 parents dd303ce + b74fde3 commit 0a0f563
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/plugins/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func (a *App) auth(ctx http_service.IHttpContext) error {
setLabels(ctx, user.App.Labels())
ctx.SetLabel("application_id", user.App.Id())
ctx.SetLabel("application", user.App.Name())
log.Error("application name is ", user.App.Name())
if user.HideCredential {
application.HideToken(ctx, user.TokenName, user.Position)
}
Expand All @@ -96,6 +97,7 @@ func (a *App) auth(ctx http_service.IHttpContext) error {
setLabels(ctx, app.Labels())
ctx.SetLabel("application_id", app.Id())
ctx.SetLabel("application", app.Name())
log.Error("application name is ", app.Name())
return app.Execute(ctx)
}
return errors.New("invalid user")
Expand Down
1 change: 1 addition & 0 deletions drivers/plugins/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func (l *worker) DoFilter(ctx eocontext.EoContext, next eocontext.IChain) (err e
}

func (l *worker) DoHttpFilter(ctx http_service.IHttpContext, next eocontext.IChain) (err error) {
log.Error("start monitor...")
apiID := ctx.GetLabel("api_id")
monitorManager.ConcurrencyAdd(apiID, 1)
err = next.DoChain(ctx)
Expand Down
1 change: 1 addition & 0 deletions monitor-entry/proxy-reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func ReadProxy(ctx http_context.IHttpContext) []IPoint {
if value == "" {
value = "-"
}
log.Error("label name: ", key, " label value: ", value)
labelMetrics[key] = value
}

Expand Down

0 comments on commit 0a0f563

Please sign in to comment.