Skip to content

Commit 33bf274

Browse files
authored
log: change request hostname to request_host (#259)
GELF specification have a reserved field named 'host' that should contains the hostname of the system emitting the logs. If µTask runs on an infrastructure that contains multiples instances, it's interesting to not override this field. Signed-off-by: Romain Beuque <[email protected]>
1 parent 4c14c06 commit 33bf274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/middleware.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func auditLogsMiddleware(c *gin.Context) {
3434
"user_agent": c.Request.UserAgent(),
3535
"duration": requestDuration.Seconds(),
3636
"duration_ms": requestDuration.Milliseconds(),
37-
"host": c.Request.Host,
37+
"request_host": c.Request.Host,
3838
"remote_ip": c.ClientIP(),
3939
"runner_instance": utask.InstanceID,
4040
"request_id": c.Request.Header.Get(requestIDHeader),

0 commit comments

Comments
 (0)