As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit a509a44a authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Include WrittenBytes in LogData

parent 72054c3e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -22,8 +22,9 @@ type LogMetadata struct {
}
type LogData struct {
Username string `json:"username"`
Meta LogMetadata `json:"meta"`
Username string `json:"username"`
WrittenBytes int64 `json:"written_bytes"`
Meta LogMetadata `json:"meta"`
}
func CheckForVersionFlag(osArgs []string, version, buildTime string) {
Loading
Loading
@@ -87,7 +88,8 @@ func NewLogData(project, username string) LogData {
}
return LogData{
Username: username,
Username: username,
WrittenBytes: 0,
Meta: LogMetadata{
Project: project,
RootNamespace: rootNameSpace,
Loading
Loading
Loading
Loading
@@ -217,8 +217,9 @@ func (s *Server) handleConn(ctx context.Context, nconn net.Conn) {
logData := extractDataFromContext(ctxWithLogData)
ctxlog.WithFields(log.Fields{
"duration_s": time.Since(started).Seconds(),
"meta": logData.Meta,
"duration_s": time.Since(started).Seconds(),
"written_bytes": logData.WrittenBytes,
"meta": logData.Meta,
}).Info("access: finish")
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment