Skip to content

config: move logging of full response to trace logging#6226

Merged
htuch merged 2 commits intoenvoyproxy:masterfrom
snowp:trace-logging
Mar 11, 2019
Merged

config: move logging of full response to trace logging#6226
htuch merged 2 commits intoenvoyproxy:masterfrom
snowp:trace-logging

Conversation

@snowp
Copy link
Copy Markdown
Contributor

@snowp snowp commented Mar 8, 2019

With large response bodies, this tends to seize up the process due to
log volume, making debug logging not very useful. This drops logging the
entire update to trace.

Also includes the resource version in the debug log line.

Signed-off-by: Snow Pettersen snowp@squareup.com

Risk Level: Low
Testing: n/a
Docs Changes: n/a
Release Notes: n/a

With large response bodies, this tends to seize up the proccess due to
log volume, making debug logging not very useful. This drops logging the
entire update to trace.

Signed-off-by: Snow Pettersen <snowp@squareup.com>
@snowp snowp requested a review from htuch March 8, 2019 22:07
Signed-off-by: Snow Pettersen <snowp@squareup.com>
Copy link
Copy Markdown
Member

@venilnoronha venilnoronha left a comment

Choose a reason for hiding this comment

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

I feel that the log needs to be more specific.

resources.size(), RepeatedPtrUtil::debugString(typed_resources));
ENVOY_LOG(debug, "gRPC config for {} accepted with {} resources with version {}", type_url_,
resources.size(), version_info);
ENVOY_LOG(trace, "resources: {}", RepeatedPtrUtil::debugString(typed_resources));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since multiple threads can be logging at the same time, I'd actually have a more specific line when printing out resources in the trace. Something like below:

ENVOY_LOG(trace, "_gRPC config accepted with resources: {}_", RepeatedPtrUtil::debugString(typed_resources));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think demuxing multiple threads is a consumer issue, for example I have a log viewer that can colorize based on TID. So, no need to force it into a single statement.

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks.

@htuch htuch merged commit bcb670e into envoyproxy:master Mar 11, 2019
mpuncel added a commit to mpuncel/envoy that referenced this pull request Mar 11, 2019
* master:
  token bucket: several fixes (envoyproxy#6235)
  config: move logging of full response to trace logging (envoyproxy#6226)
  mysql_filter: add a warning about compatibility (envoyproxy#6234)
  upstream: add transport socket failure reason to stream info and log (envoyproxy#6018)
  IoHandle readv and writev (envoyproxy#6037)

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
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.

3 participants