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

docs: troubleshooting guide for logging #9315

Merged
merged 2 commits into from
Apr 5, 2023

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented Apr 5, 2023

Document to explain how to change logging level for our libraries and underlying libraries.

Credit: I used @BenWhitehead 's snippet in bits benwhitehead/6166544285433856.

@suztomo suztomo changed the title docs: troubleshooting with logging docs: troubleshooting guilde for logging Apr 5, 2023
@rajatbhatta
Copy link

very minor nit: guilde -> guide in PR title

.level=INFO

# Specify logging level for certain packages
com.google.api.level=ALL
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add notes to indicate that this is only needed for REST APIs and io.groc.level below is only needed for gRPC APIs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added comments.

Note that even when you use gRPC library, some authentication happens in HTTP 1.1.

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that even when you use gRPC library, some authentication happens in HTTP 1.1.

Thanks, that's good to know. I guess it would be mostly covered by the com.google.auth.level=FINE below?

Copy link
Member Author

Choose a reason for hiding this comment

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

That does not show HTTP headers.

@suztomo suztomo changed the title docs: troubleshooting guilde for logging docs: troubleshooting guide for logging Apr 5, 2023
io.grpc.level=FINE

# Example when we want to specify storge library's level
com.google.cloud.storage.level=INFO
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm afraid this is only useful for handwritten libraries, for pure generated ones, we have very little logs, which is something we are planning to improve as part of the observability project. Can we add something to indicate it as well or maybe remove this section?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added that.

@blakeli0
Copy link
Contributor

blakeli0 commented Apr 5, 2023

Thanks Tomo, this is very helpful! FYI, we are planning to improve the whole logging experience as part of the Observability project, so a lot of things could change, but this guide is pretty accurate as of now.

@lqiu96
Copy link
Contributor

lqiu96 commented Apr 5, 2023

Looks good! IIRC, I have used this page previously for logging some of the HTTP requests for REGAPIC: http://googleapis.github.io/google-http-java-client/http-transport.html

I think your guide should cover the cases. Just FYI if you wanted to add anything else.

Copy link
Member Author

@suztomo suztomo left a comment

Choose a reason for hiding this comment

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

@blakeli0 PTAL.

Observability project,

Looking forward.

@blakeli0
Copy link
Contributor

blakeli0 commented Apr 5, 2023

Looks good! IIRC, I have used this page previously for logging some of the HTTP requests for REGAPIC: http://googleapis.github.io/google-http-java-client/http-transport.html

I think your guide should cover the cases. Just FYI if you wanted to add anything else.

Thanks for then note Lawrence! I think it should be already covered by com.google.api.level=ALL as com.google.api.client.http is a sub-package of com.google.api.

@suztomo suztomo added automerge Merge the pull request once unit tests and other checks pass. owlbot:run Add this label to trigger the Owlbot post processor. labels Apr 5, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 5, 2023
@gcf-merge-on-green gcf-merge-on-green bot merged commit 971eb78 into googleapis:main Apr 5, 2023
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Apr 5, 2023
@release-please release-please bot mentioned this pull request Apr 5, 2023
@ddixit14 ddixit14 added the release-please:force-run To run release-please label Apr 6, 2023
@release-please release-please bot removed the release-please:force-run To run release-please label Apr 6, 2023
@ddixit14 ddixit14 added the release-please:force-run To run release-please label Apr 10, 2023
@release-please release-please bot removed the release-please:force-run To run release-please label Apr 10, 2023
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.

5 participants