Skip to content

Commit 3b47fa3

Browse files
Add additional logging for Azure repository stats (#12079) (#12115)
* Adding logging for AzureStats * Debugging * Removing debugging lines * Addressing comments * Addressing feedback 2 --------- (cherry picked from commit 16c5257) Signed-off-by: Sarat Vemulapalli <vemsarat@amazon.com> Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent b5820f5 commit 3b47fa3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/repository-azure/src/internalClusterTest/java/org/opensearch/repositories/azure/AzureBlobStoreRepositoryTests.java

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
import com.azure.storage.common.implementation.Constants;
4040
import com.azure.storage.common.policy.RequestRetryOptions;
4141
import com.azure.storage.common.policy.RetryPolicyType;
42+
import org.apache.logging.log4j.LogManager;
43+
import org.apache.logging.log4j.Logger;
4244
import org.opensearch.common.SuppressForbidden;
4345
import org.opensearch.common.regex.Regex;
4446
import org.opensearch.common.settings.MockSecureSettings;
@@ -188,6 +190,7 @@ protected String requestUniqueId(final HttpExchange exchange) {
188190
@SuppressForbidden(reason = "this test uses a HttpServer to emulate an Azure endpoint")
189191
private static class AzureHTTPStatsCollectorHandler extends HttpStatsCollectorHandler {
190192

193+
private static final Logger testLogger = LogManager.getLogger(AzureHTTPStatsCollectorHandler.class);
191194
private static final Pattern listPattern = Pattern.compile("GET /[a-zA-Z0-9]+\\??.+");
192195
private static final Pattern getPattern = Pattern.compile("GET /[^?/]+/[^?/]+\\??.*");
193196

@@ -197,6 +200,7 @@ private AzureHTTPStatsCollectorHandler(HttpHandler delegate) {
197200

198201
@Override
199202
protected void maybeTrack(String request, Headers headers) {
203+
testLogger.info(request, headers);
200204
if (getPattern.matcher(request).matches()) {
201205
trackRequest("GetBlob");
202206
} else if (Regex.simpleMatch("HEAD /*/*", request)) {

0 commit comments

Comments
 (0)