mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Send deployment id and minio version in http header (#14378)
This commit is contained in:
@@ -32,6 +32,7 @@ import (
|
||||
|
||||
"github.com/minio/highwayhash"
|
||||
"github.com/minio/minio-go/v7/pkg/set"
|
||||
xhttp "github.com/minio/minio/internal/http"
|
||||
"github.com/minio/minio/internal/logger/message/log"
|
||||
)
|
||||
|
||||
@@ -53,8 +54,6 @@ const (
|
||||
|
||||
var trimStrings []string
|
||||
|
||||
var globalDeploymentID string
|
||||
|
||||
// TimeFormat - logging time format.
|
||||
const TimeFormat string = "15:04:05 MST 01/02/2006"
|
||||
|
||||
@@ -130,11 +129,6 @@ func uniqueEntries(paths []string) []string {
|
||||
return m.ToSlice()
|
||||
}
|
||||
|
||||
// SetDeploymentID -- Deployment Id from the main package is set here
|
||||
func SetDeploymentID(deploymentID string) {
|
||||
globalDeploymentID = deploymentID
|
||||
}
|
||||
|
||||
// Init sets the trimStrings to possible GOPATHs
|
||||
// and GOROOT directories. Also append github.com/minio/minio
|
||||
// This is done to clean up the filename, when stack trace is
|
||||
@@ -319,7 +313,7 @@ func logIf(ctx context.Context, err error, errKind ...interface{}) {
|
||||
// Get the cause for the Error
|
||||
message := fmt.Sprintf("%v (%T)", err, err)
|
||||
if req.DeploymentID == "" {
|
||||
req.DeploymentID = globalDeploymentID
|
||||
req.DeploymentID = xhttp.GlobalDeploymentID
|
||||
}
|
||||
|
||||
objects := make([]log.ObjectVersion, 0, len(req.Objects))
|
||||
|
||||
Reference in New Issue
Block a user