| 1 |
gRPC environment variables |
| 2 |
-------------------------- |
| 3 |
|
| 4 |
gRPC C core based implementations (those contained in this repository) expose |
| 5 |
some configuration as environment variables that can be set. |
| 6 |
|
| 7 |
* grpc_proxy, https_proxy, http_proxy |
| 8 |
The URI of the proxy to use for HTTP CONNECT support. These variables are |
| 9 |
checked in order, and the first one that has a value is used. |
| 10 |
|
| 11 |
* no_grpc_proxy, no_proxy |
| 12 |
A comma separated list of hostnames to connect to without using a proxy even |
| 13 |
if a proxy is set. These variables are checked in order, and the first one |
| 14 |
that has a value is used. |
| 15 |
|
| 16 |
* GRPC_ABORT_ON_LEAKS |
| 17 |
A debugging aid to cause a call to abort() when gRPC objects are leaked past |
| 18 |
grpc_shutdown(). Set to 1 to cause the abort, if unset or 0 it does not |
| 19 |
abort the process. |
| 20 |
|
| 21 |
* GOOGLE_APPLICATION_CREDENTIALS |
| 22 |
The path to find the credentials to use when Google credentials are created |
| 23 |
|
| 24 |
* GRPC_SSL_CIPHER_SUITES |
| 25 |
A colon separated list of cipher suites to use with OpenSSL |
| 26 |
Defaults to: |
| 27 |
ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384 |
| 28 |
|
| 29 |
* GRPC_DEFAULT_SSL_ROOTS_FILE_PATH |
| 30 |
PEM file to load SSL roots from |
| 31 |
|
| 32 |
* GRPC_POLL_STRATEGY [posix-style environments only] |
| 33 |
Declares which polling engines to try when starting gRPC. |
| 34 |
This is a comma-separated list of engines, which are tried in priority order |
| 35 |
first -> last. |
| 36 |
Available polling engines include: |
| 37 |
- epoll (linux-only) - a polling engine based around the epoll family of |
| 38 |
system calls |
| 39 |
- poll - a portable polling engine based around poll(), intended to be a |
| 40 |
fallback engine when nothing better exists |
| 41 |
- legacy - the (deprecated) original polling engine for gRPC |
| 42 |
|
| 43 |
* GRPC_TRACE |
| 44 |
A comma separated list of tracers that provide additional insight into how |
| 45 |
gRPC C core is processing requests via debug logs. Available tracers include: |
| 46 |
- api - traces api calls to the C core |
| 47 |
- bdp_estimator - traces behavior of bdp estimation logic |
| 48 |
- call_error - traces the possible errors contributing to final call status |
| 49 |
- cares_resolver - traces operations of the c-ares based DNS resolver |
| 50 |
- cares_address_sorting - traces operations of the c-ares based DNS |
| 51 |
resolver's resolved address sorter |
| 52 |
- cds_lb - traces cds LB policy |
| 53 |
- channel - traces operations on the C core channel stack |
| 54 |
- channel_stack - traces the set of filters in a channel stack upon |
| 55 |
construction |
| 56 |
- client_channel - traces client channel control plane activity, including |
| 57 |
resolver and load balancing policy interaction |
| 58 |
- client_channel_call - traces client channel call activity related to name |
| 59 |
resolution |
| 60 |
- client_channel_lb_call - traces client channel call activity related |
| 61 |
to load balancing picking |
| 62 |
- compression - traces compression operations |
| 63 |
- connectivity_state - traces connectivity state changes to channels |
| 64 |
- cronet - traces state in the cronet transport engine |
| 65 |
- dns_resolver - traces state in the native DNS resolver |
| 66 |
- executor - traces grpc's internal thread pool ('the executor') |
| 67 |
- glb - traces the grpclb load balancer |
| 68 |
- handshaker - traces handshaking state |
| 69 |
- health_check_client - traces health checking client code |
| 70 |
- http - traces state in the http2 transport engine |
| 71 |
- http2_stream_state - traces all http2 stream state mutations. |
| 72 |
- http1 - traces HTTP/1.x operations performed by gRPC |
| 73 |
- inproc - traces the in-process transport |
| 74 |
- http_keepalive - traces gRPC keepalive pings |
| 75 |
- flowctl - traces http2 flow control |
| 76 |
- op_failure - traces error information when failure is pushed onto a |
| 77 |
completion queue |
| 78 |
- pick_first - traces the pick first load balancing policy |
| 79 |
- plugin_credentials - traces plugin credentials |
| 80 |
- pollable_refcount - traces reference counting of 'pollable' objects (only |
| 81 |
in DEBUG) |
| 82 |
- priority_lb - traces priority LB policy |
| 83 |
- resource_quota - trace resource quota objects internals |
| 84 |
- ring_hash_lb - traces the ring hash load balancing policy |
| 85 |
- rls_lb - traces the RLS load balancing policy |
| 86 |
- round_robin - traces the round_robin load balancing policy |
| 87 |
- queue_pluck |
| 88 |
- grpc_authz_api - traces gRPC authorization |
| 89 |
- server_channel - lightweight trace of significant server channel events |
| 90 |
- secure_endpoint - traces bytes flowing through encrypted channels |
| 91 |
- subchannel - traces the connectivity state of subchannel |
| 92 |
- subchannel_pool - traces subchannel pool |
| 93 |
- timer - timers (alarms) in the grpc internals |
| 94 |
- timer_check - more detailed trace of timer logic in grpc internals |
| 95 |
- transport_security - traces metadata about secure channel establishment |
| 96 |
- tcp - traces bytes in and out of a channel |
| 97 |
- tsi - traces tsi transport security |
| 98 |
- weighted_target_lb - traces weighted_target LB policy |
| 99 |
- xds_client - traces xds client |
| 100 |
- xds_cluster_manager_lb - traces cluster manager LB policy |
| 101 |
- xds_cluster_impl_lb - traces cluster impl LB policy |
| 102 |
- xds_cluster_resolver_lb - traces xds cluster resolver LB policy |
| 103 |
- xds_resolver - traces xds resolver |
| 104 |
|
| 105 |
The following tracers will only run in binaries built in DEBUG mode. This is |
| 106 |
accomplished by invoking `CONFIG=dbg make <target>` |
| 107 |
- metadata - tracks creation and mutation of metadata |
| 108 |
- combiner - traces combiner lock state |
| 109 |
- call_combiner - traces call combiner state |
| 110 |
- closure - tracks closure creation, scheduling, and completion |
| 111 |
- fd_trace - traces fd create(), shutdown() and close() calls for channel fds. |
| 112 |
- pending_tags - traces still-in-progress tags on completion queues |
| 113 |
- polling - traces the selected polling engine |
| 114 |
- polling_api - traces the api calls to polling engine |
| 115 |
- subchannel_refcount |
| 116 |
- queue_refcount |
| 117 |
- error_refcount |
| 118 |
- stream_refcount |
| 119 |
- workqueue_refcount |
| 120 |
- fd_refcount |
| 121 |
- cq_refcount |
| 122 |
- auth_context_refcount |
| 123 |
- security_connector_refcount |
| 124 |
- resolver_refcount |
| 125 |
- lb_policy_refcount |
| 126 |
- chttp2_refcount |
| 127 |
|
| 128 |
'all' can additionally be used to turn all traces on. |
| 129 |
Individual traces can be disabled by prefixing them with '-'. |
| 130 |
|
| 131 |
'refcount' will turn on all of the tracers for refcount debugging. |
| 132 |
|
| 133 |
if 'list_tracers' is present, then all of the available tracers will be |
| 134 |
printed when the program starts up. |
| 135 |
|
| 136 |
Example: |
| 137 |
export GRPC_TRACE=all,-pending_tags |
| 138 |
|
| 139 |
* GRPC_VERBOSITY |
| 140 |
Default gRPC logging verbosity - one of: |
| 141 |
- DEBUG - log all gRPC messages |
| 142 |
- INFO - log INFO and ERROR message |
| 143 |
- ERROR - log only errors (default) |
| 144 |
- NONE - won't log any |
| 145 |
|
| 146 |
* GRPC_STACKTRACE_MINLOGLEVEL |
| 147 |
Minimum loglevel to print the stack-trace - one of DEBUG, INFO, ERROR, and NONE. |
| 148 |
NONE is a default value. |
| 149 |
|
| 150 |
* GRPC_TRACE_FUZZER |
| 151 |
if set, the fuzzers will output trace (it is usually suppressed). |
| 152 |
|
| 153 |
* GRPC_DNS_RESOLVER |
| 154 |
Declares which DNS resolver to use. The default is ares if gRPC is built with |
| 155 |
c-ares support. Otherwise, the value of this environment variable is ignored. |
| 156 |
Available DNS resolver include: |
| 157 |
- ares (default on most platforms except iOS, Android or Node)- a DNS |
| 158 |
resolver based around the c-ares library |
| 159 |
- native - a DNS resolver based around getaddrinfo(), creates a new thread to |
| 160 |
perform name resolution |
| 161 |
|
| 162 |
*NetBIOS and DNS*: If your network relies on NetBIOS name resolution or a mixture of |
| 163 |
DNS and NetBIOS name resolution (e.g. in some Windows networks) then you should use |
| 164 |
the '*native*' DNS resolver or make sure all NetBIOS names are |
| 165 |
also configured in DNS. The '*ares*' DNS resolver only supports DNS name resolution. |
| 166 |
|
| 167 |
* GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS |
| 168 |
Default: 5000 |
| 169 |
Declares the interval between two backup polls on client channels. These polls |
| 170 |
are run in the timer thread so that gRPC can process connection failures while |
| 171 |
there is no active polling thread. They help reconnect disconnected client |
| 172 |
channels (mostly due to idleness), so that the next RPC on this channel won't |
| 173 |
fail. Set to 0 to turn off the backup polls. |
| 174 |
|
| 175 |
* grpc_cfstream |
| 176 |
set to 1 to turn on CFStream experiment. With this experiment gRPC uses CFStream API to make TCP |
| 177 |
connections. The option is only available on iOS platform and when macro GRPC_CFSTREAM is defined. |