diff --git a/src/main/java/io/stargate/sgv2/jsonapi/service/processor/MeteredCommandProcessor.java b/src/main/java/io/stargate/sgv2/jsonapi/service/processor/MeteredCommandProcessor.java index 1b94b9c950..6711bc2243 100644 --- a/src/main/java/io/stargate/sgv2/jsonapi/service/processor/MeteredCommandProcessor.java +++ b/src/main/java/io/stargate/sgv2/jsonapi/service/processor/MeteredCommandProcessor.java @@ -32,6 +32,7 @@ import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.MDC; @ApplicationScoped public class MeteredCommandProcessor { @@ -98,6 +99,7 @@ public MeteredCommandProcessor( public Uni processCommand( CommandContext commandContext, T command) { Timer.Sample sample = Timer.start(meterRegistry); + MDC.put("tenantId", stargateRequestInfo.getTenantId().orElse(UNKNOWN_VALUE)); // start by resolving the command, get resolver return commandProcessor .processCommand(commandContext, command)