-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Storage][Logging]Let users opt in logging_request_body #19710
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ae2eea2
[Storage][Logging]Let users opt in logging_request_body
xiafu-msft f83981b
Update policies.py
xiafu-msft 9559470
Update policies.py
xiafu-msft ad4a91f
Update policies.py
xiafu-msft d90401b
Update policies.py
xiafu-msft ae10fde
logging response body
xiafu-msft 4af2cd9
Update settings_fake.py
xiafu-msft 8d7b856
Merge branch 'main' into logging
xiafu-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,6 @@ | |
| from io import SEEK_SET, UnsupportedOperation | ||
| import logging | ||
| import uuid | ||
| import types | ||
| from typing import Any, TYPE_CHECKING | ||
| from wsgiref.handlers import format_date_time | ||
| try: | ||
|
|
@@ -183,11 +182,15 @@ class StorageLoggingPolicy(NetworkTraceLoggingPolicy): | |
|
|
||
| This accepts both global configuration, and per-request level with "enable_http_logger" | ||
| """ | ||
| def __init__(self, logging_enable=False, **kwargs): | ||
| self.logging_body = kwargs.pop("logging_body", False) | ||
| super(StorageLoggingPolicy, self).__init__(logging_enable=logging_enable, **kwargs) | ||
|
|
||
| def on_request(self, request): | ||
| # type: (PipelineRequest, Any) -> None | ||
| http_request = request.http_request | ||
| options = request.context.options | ||
| self.logging_body = self.logging_body or options.pop("logging_body", False) | ||
| if options.pop("logging_enable", self.enable_http_logger): | ||
| request.context["logging_enable"] = True | ||
| if not _LOGGER.isEnabledFor(logging.DEBUG): | ||
|
|
@@ -216,11 +219,11 @@ def on_request(self, request): | |
| _LOGGER.debug(" %r: %r", header, value) | ||
| _LOGGER.debug("Request body:") | ||
|
|
||
| # We don't want to log the binary data of a file upload. | ||
| if isinstance(http_request.body, types.GeneratorType): | ||
| _LOGGER.debug("File upload") | ||
| else: | ||
| if self.logging_body: | ||
| _LOGGER.debug(str(http_request.body)) | ||
| else: | ||
| # We don't want to log the binary data of a file upload. | ||
| _LOGGER.debug("Hidden body, please use logging_body to show body") | ||
| except Exception as err: # pylint: disable=broad-except | ||
| _LOGGER.debug("Failed to log request: %r", err) | ||
|
|
||
|
|
@@ -240,19 +243,24 @@ def on_response(self, request, response): | |
| _LOGGER.debug("Response content:") | ||
| pattern = re.compile(r'attachment; ?filename=["\w.]+', re.IGNORECASE) | ||
| header = response.http_response.headers.get('content-disposition') | ||
| resp_content_type = response.http_response.headers.get("content-type", "") | ||
|
|
||
| if header and pattern.match(header): | ||
| filename = header.partition('=')[2] | ||
| _LOGGER.debug("File attachments: %s", filename) | ||
| elif response.http_response.headers.get("content-type", "").endswith("octet-stream"): | ||
| elif resp_content_type.endswith("octet-stream"): | ||
| _LOGGER.debug("Body contains binary data.") | ||
| elif response.http_response.headers.get("content-type", "").startswith("image"): | ||
| elif resp_content_type.startswith("image"): | ||
| _LOGGER.debug("Body contains image data.") | ||
|
Comment on lines
-247
to
254
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could consider dumbing binary payloads in encoded (base64 for example) form. (not blocking this PR). |
||
| else: | ||
| if response.context.options.get('stream', False): | ||
|
|
||
| if self.logging_body and resp_content_type.startswith("text"): | ||
| _LOGGER.debug(response.http_response.text()) | ||
| elif self.logging_body: | ||
| try: | ||
| _LOGGER.debug(response.http_response.body()) | ||
| except ValueError: | ||
| _LOGGER.debug("Body is streamable") | ||
| else: | ||
| _LOGGER.debug(response.http_response.text()) | ||
|
|
||
| except Exception as err: # pylint: disable=broad-except | ||
| _LOGGER.debug("Failed to log response: %s", repr(err)) | ||
|
|
||
|
|
||
253 changes: 253 additions & 0 deletions
253
...re-storage-blob/tests/recordings/test_logging.test_logging_request_and_response_body.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,253 @@ | ||
| interactions: | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - application/xml | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '0' | ||
| User-Agent: | ||
| - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) | ||
| x-ms-date: | ||
| - Thu, 22 Jul 2021 00:58:15 GMT | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| method: PUT | ||
| uri: https://storagename.blob.core.windows.net/utcontainer21d61510?restype=container | ||
| response: | ||
| body: | ||
| string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>ContainerAlreadyExists</Code><Message>The | ||
| specified container already exists.\nRequestId:e1cc4389-801e-00bf-1f94-7e6451000000\nTime:2021-07-22T00:58:15.9669124Z</Message></Error>" | ||
| headers: | ||
| content-length: | ||
| - '230' | ||
| content-type: | ||
| - application/xml | ||
| date: | ||
| - Thu, 22 Jul 2021 00:58:15 GMT | ||
| server: | ||
| - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
| x-ms-error-code: | ||
| - ContainerAlreadyExists | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| status: | ||
| code: 409 | ||
| message: The specified container already exists. | ||
| - request: | ||
| body: aaaaaa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ers: | ||
| Accept: | ||
| - application/xml | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '4096' | ||
| Content-Type: | ||
| - application/octet-stream | ||
| User-Agent: | ||
| - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) | ||
| x-ms-blob-type: | ||
| - BlockBlob | ||
| x-ms-date: | ||
| - Thu, 22 Jul 2021 00:58:16 GMT | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| method: PUT | ||
| uri: https://storagename.blob.core.windows.net/utcontainer21d61510/srcblob21d61510 | ||
| response: | ||
| body: | ||
| string: '' | ||
| headers: | ||
| content-length: | ||
| - '0' | ||
| content-md5: | ||
| - IaGZxT9CKjgOILFi+26+nA== | ||
| date: | ||
| - Thu, 22 Jul 2021 00:58:15 GMT | ||
| etag: | ||
| - '"0x8D94CABC9EBBC01"' | ||
| last-modified: | ||
| - Thu, 22 Jul 2021 00:58:16 GMT | ||
| server: | ||
| - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
| x-ms-content-crc64: | ||
| - Ep3PX5ZZvPI= | ||
| x-ms-request-server-encrypted: | ||
| - 'true' | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| status: | ||
| code: 201 | ||
| message: Created | ||
| - request: | ||
| body: testloggingbody | ||
| headers: | ||
| Accept: | ||
| - application/xml | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '15' | ||
| Content-Type: | ||
| - application/octet-stream | ||
| User-Agent: | ||
| - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) | ||
| x-ms-blob-type: | ||
| - BlockBlob | ||
| x-ms-date: | ||
| - Thu, 22 Jul 2021 00:58:16 GMT | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| method: PUT | ||
| uri: https://storagename.blob.core.windows.net/utcontainer21d61510/testloggingblob21d61510 | ||
| response: | ||
| body: | ||
| string: '' | ||
| headers: | ||
| content-length: | ||
| - '0' | ||
| content-md5: | ||
| - kiWDMg2eTMJ7rcIxBGHjdQ== | ||
| date: | ||
| - Thu, 22 Jul 2021 00:58:15 GMT | ||
| etag: | ||
| - '"0x8D94CABC9FF6EAB"' | ||
| last-modified: | ||
| - Thu, 22 Jul 2021 00:58:16 GMT | ||
| server: | ||
| - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
| x-ms-content-crc64: | ||
| - V9QvlmP+jQ4= | ||
| x-ms-request-server-encrypted: | ||
| - 'true' | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| status: | ||
| code: 201 | ||
| message: Created | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - application/xml | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| User-Agent: | ||
| - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) | ||
| x-ms-date: | ||
| - Thu, 22 Jul 2021 00:58:16 GMT | ||
| x-ms-range: | ||
| - bytes=0-33554431 | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| method: GET | ||
| uri: https://storagename.blob.core.windows.net/utcontainer21d61510/testloggingblob21d61510 | ||
| response: | ||
| body: | ||
| string: testloggingbody | ||
| headers: | ||
| accept-ranges: | ||
| - bytes | ||
| content-length: | ||
| - '15' | ||
| content-range: | ||
| - bytes 0-14/15 | ||
| content-type: | ||
| - application/octet-stream | ||
| date: | ||
| - Thu, 22 Jul 2021 00:58:15 GMT | ||
| etag: | ||
| - '"0x8D94CABC9FF6EAB"' | ||
| last-modified: | ||
| - Thu, 22 Jul 2021 00:58:16 GMT | ||
| server: | ||
| - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
| vary: | ||
| - Origin | ||
| x-ms-blob-content-md5: | ||
| - kiWDMg2eTMJ7rcIxBGHjdQ== | ||
| x-ms-blob-type: | ||
| - BlockBlob | ||
| x-ms-creation-time: | ||
| - Thu, 22 Jul 2021 00:18:58 GMT | ||
| x-ms-lease-state: | ||
| - available | ||
| x-ms-lease-status: | ||
| - unlocked | ||
| x-ms-server-encrypted: | ||
| - 'true' | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| status: | ||
| code: 206 | ||
| message: Partial Content | ||
| - request: | ||
| body: null | ||
| headers: | ||
| Accept: | ||
| - application/xml | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| User-Agent: | ||
| - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) | ||
| x-ms-date: | ||
| - Thu, 22 Jul 2021 00:58:16 GMT | ||
| x-ms-range: | ||
| - bytes=0-33554431 | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| method: GET | ||
| uri: https://storagename.blob.core.windows.net/utcontainer21d61510/testloggingblob21d61510 | ||
| response: | ||
| body: | ||
| string: testloggingbody | ||
| headers: | ||
| accept-ranges: | ||
| - bytes | ||
| content-length: | ||
| - '15' | ||
| content-range: | ||
| - bytes 0-14/15 | ||
| content-type: | ||
| - application/octet-stream | ||
| date: | ||
| - Thu, 22 Jul 2021 00:58:15 GMT | ||
| etag: | ||
| - '"0x8D94CABC9FF6EAB"' | ||
| last-modified: | ||
| - Thu, 22 Jul 2021 00:58:16 GMT | ||
| server: | ||
| - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 | ||
| vary: | ||
| - Origin | ||
| x-ms-blob-content-md5: | ||
| - kiWDMg2eTMJ7rcIxBGHjdQ== | ||
| x-ms-blob-type: | ||
| - BlockBlob | ||
| x-ms-creation-time: | ||
| - Thu, 22 Jul 2021 00:18:58 GMT | ||
| x-ms-lease-state: | ||
| - available | ||
| x-ms-lease-status: | ||
| - unlocked | ||
| x-ms-server-encrypted: | ||
| - 'true' | ||
| x-ms-version: | ||
| - '2020-08-04' | ||
| status: | ||
| code: 206 | ||
| message: Partial Content | ||
| version: 1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather delete this else branch. It's going to produce lot of entries that are not very useful.
Instead consider adding logger.debug in ctor/ctors if logging is enabled but body logging is not. so that there's some hint about that option but is not rendered on each request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave this like this for now, and put it in the TODO so it will be picked up later.