Skip to content

Commit

Permalink
cc grpc: update docs on log middlewares
Browse files Browse the repository at this point in the history
commit_hash:4b010c72e3a179b586da7d6b3455404df906a30f
  • Loading branch information
Anton3 committed Nov 25, 2024
1 parent 6071c7f commit 12abfd5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
7 changes: 5 additions & 2 deletions grpc/functional_tests/basic_chaos/static_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ components_manager:
- grpc-server-congestion-control
# /// [Sample grpc server logging middleware component config]
grpc-server-logging:
msg-size-log-limit: 10
log-level: info
msg-log-level: info
msg-size-log-limit: 512
# /// [Sample grpc server logging middleware component config]

# /// [Sample grpc server deadline propagation middleware component config]
Expand Down Expand Up @@ -94,7 +96,8 @@ components_manager:

# /// [Sample grpc client logging middleware component config]
grpc-client-logging:
log-level: debug
log-level: info
msg-log-level: info
msg-size-log-limit: 512
# /// [Sample grpc client logging middleware component config]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ struct Settings;
///
/// @brief Component for gRPC client logging
///
/// @warning Logs are currently written with log level `debug` by default, which typically means that they are not
/// written in production. See details below.
///
/// ## Static options:
/// Name | Description | Default value
/// ---- | ----------- | -------------
/// log-level | log level for msg logging | debug
/// log-level | log level to use for `Span`, status code and the facts of sending requests receiving responses arriving | debug
/// msg-log-level | log level to use for request and response messages themselves | debug
/// msg-size-log-limit | max message size to log, the rest will be truncated | 512
/// trim-secrets | trim the secrets from logs as marked by the protobuf option | true (*)
///
Expand All @@ -33,6 +37,8 @@ struct Settings;
/// ## Static configuration example:
///
/// @snippet grpc/functional_tests/basic_chaos/static_config.yaml Sample grpc client logging middleware component config
///
/// In this example, we enable logs for gRPC clients in production.

// clang-format on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ struct Settings;
///
/// @brief Component for gRPC server logging
///
/// @warning Logs are currently written with log level `debug` by default, which typically means that they are not
/// written in production. See details below.
///
/// ## Static options:
/// Name | Description | Default value
/// ---- | ----------- | -------------
/// log-level | log level for msg logging | debug
/// msg-log-level | gRPC message body logging level | debug
/// log-level | log level to use for `Span`, status code and the facts of sending requests receiving responses arriving | debug
/// msg-log-level | log level to use for request and response messages themselves | debug
/// msg-size-log-limit | max message size to log, the rest will be truncated | 512
/// trim-secrets | trim the secrets from logs as marked by the protobuf option | true (*)
///
Expand All @@ -34,6 +37,8 @@ struct Settings;
/// ## Static configuration example:
///
/// @snippet grpc/functional_tests/basic_chaos/static_config.yaml Sample grpc server logging middleware component config
///
/// In this example, we enable logs for gRPC clients in production.

// clang-format on

Expand Down

0 comments on commit 12abfd5

Please sign in to comment.