mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 19:29:49 -06:00
feat: include X-WOPI-SessionId header in the logs and tracing
This commit is contained in:
@@ -23,6 +23,7 @@ func CollaborationTracingMiddleware(next http.Handler) http.Handler {
|
||||
wopiUser := wopiContext.User.GetId()
|
||||
|
||||
attrs := []attribute.KeyValue{
|
||||
attribute.String("ocis.wopi.sessionid", r.Header.Get("X-WOPI-SessionId")),
|
||||
attribute.String("ocis.wopi.method", wopiMethod),
|
||||
attribute.String("ocis.wopi.resource.id.storage", wopiFile.GetResourceId().GetStorageId()),
|
||||
attribute.String("ocis.wopi.resource.id.opaque", wopiFile.GetResourceId().GetOpaqueId()),
|
||||
|
||||
@@ -90,6 +90,7 @@ func WopiContextAuthMiddleware(cfg *config.Config, next http.Handler) http.Handl
|
||||
// although some headers might not be sent depending on the client.
|
||||
logger := zerolog.Ctx(ctx)
|
||||
ctx = logger.With().
|
||||
Str("WopiSessionId", r.Header.Get("X-WOPI-SessionId")).
|
||||
Str("WopiOverride", r.Header.Get("X-WOPI-Override")).
|
||||
Str("WopiProof", r.Header.Get("X-WOPI-Proof")).
|
||||
Str("WopiProofOld", r.Header.Get("X-WOPI-ProofOld")).
|
||||
|
||||
Reference in New Issue
Block a user