Skip to content

Commit

Permalink
Modify the logging
Browse files Browse the repository at this point in the history
  • Loading branch information
xxx0624 committed Sep 25, 2024
1 parent 061a483 commit 9dbb98e
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 1 deletion.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ecs-agent/tmds/handlers/fault/v1/handlers/middlewares.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ func TelemetryMiddleware(
"DurationInMs": durationInMs,
"Request": r.URL.Path,
}
logger.Info("Complete the request", loggerFields)

// Both the telemetry middleware hanle and other next handlers(including the corresponding
// start/stop/check fault handlers) are finished.
logger.Info("The telemetry middleware is complete", loggerFields)
// Emit a duration metric.
mf.New(fmt.Sprintf("MetadataServer.%s%sDuration", faultOperation, faultType)).
WithFields(loggerFields).
Expand Down

0 comments on commit 9dbb98e

Please sign in to comment.