Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logs with request latency for json readData/metaData API #749

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mayanks
Copy link
Contributor

@mayanks mayanks commented Mar 9, 2022

No description provided.

@mayanks
Copy link
Contributor Author

mayanks commented Mar 9, 2022

/gcbrun

@@ -239,11 +246,26 @@ private GoogleCloudStorageItemInfo fetchInitialMetadata() throws IOException {
RetryDeterminer.SOCKET_ERRORS,
IOException.class,
sleeper);

logger.atFinest().log(
"GoogleCloudStorageReadChannel:getMetadata complete context:%d,time:%d,resource:%s,requestId:%s",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to log the class name GoogleCloudStorageReadChannel logging pattern have the fully qualified class name

? createFileNotFoundException(resourceId, e)
: new IOException("Error reading " + resourceId, e);
if (errorExtractor.itemNotFound(e)) {
throw createFileNotFoundException(resourceId, e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add a log here as well

@@ -995,13 +1031,21 @@ protected InputStream openStream(long bytesToRead) throws IOException {
cacheFooter(response);
if (retriesCount != 0) {
logger.atInfo().log(
"Successfully cached footer after %s retries for '%s'", retriesCount, resourceId);
"Successfully cached footer context:%d,retries:%s,time:%d,resource:%s",
Thread.currentThread().getId(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to log the threadId, it should already be part of the logging pattern (thread Id/name)

Copy link
Contributor

@mprashanthsagar mprashanthsagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants