I Checked the Application Logs of ELB for Envoy

I Checked the Application Logs of ELB for Envoy

I looked into Envoy process (application) logs for Elastic Load Balancing: output by log level, per-component levels, the fields included on each line, and the text and JSON formats.
2026.11.27

This page has been translated by machine translation. View original

Introduction

On November 25, 2026, the general availability of Elastic Load Balancing for Envoy was announced.

https://aws.amazon.com/about-aws/whats-new/2026/11/elastic-load-balancing-for-envoy-generally-available/

In earlier articles, I introduced how ELB for Envoy behaves as a reverse proxy and its access logs.

https://dev.classmethod.jp/articles/aws-elb-for-envoy-ga-create-proxy/

https://dev.classmethod.jp/articles/elb-for-envoy-access-log-cloudwatch-logs/

Separately from the access log, an ELB for Envoy proxy outputs the logs of the Envoy process itself (called the application log in the documentation) to CloudWatch Logs. In this article, I present the results of checking this process log: the output at each log level, per-component levels, and the fields and format contained in one line.

Test environment

  • Region: Tokyo (ap-northeast-1)
  • Proxy version: 1.40
  • Proxy configuration: internet-facing (IPv4), two subnets (ap-northeast-1a / 1c)
  • aws-cli: 2.42.4

Log destination and how to retrieve logs

The process logs are output to the log group /aws/elb-proxy/<proxy-name>. The log stream names are the IDs of the proxy's ENIs. In this configuration there were two subnets, so two streams were created, named after the ENI ID of each subnet.

The per-request access log is a separate mechanism, output by specifying a network access logger in the Envoy configuration.

For testing, I used the following configuration file envoy.yaml. Requests to /direct return a fixed response (200), and all other paths are forwarded to checkip.amazonaws.com.

envoy.yaml
admin:
  address:
    socket_address:
      address: 127.0.0.1
      port_value: 9901
static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 80
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match:
                  prefix: "/direct"
                direct_response:
                  status: 200
                  body:
                    inline_string: "Your proxy is running\n"
              - match:
                  prefix: "/"
                route:
                  cluster: checkip
                  auto_host_rewrite: true
          http_filters:
          - name: envoy.filters.http.router
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
  clusters:
  - name: checkip
    type: STRICT_DNS
    dns_lookup_family: V4_ONLY
    connect_timeout: 5s
    load_assignment:
      cluster_name: checkip
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: checkip.amazonaws.com
                port_value: 80

Each time I switched the level, I sent HTTP requests (port 80) with curl to /direct and /forward, 3 times each, for a total of 6 requests. To tell them apart in the logs, I added the query strings lvl (level name) and n (count) to the requests.

I retrieved the logs for 15 seconds from sending the first request, from all streams of the log group using aws logs filter-log-events, and counted the events. In the text format, one line is one event.

The log group is created when the proxy's logs are written. Immediately after the proxy was created, the log group did not exist.

Log levels

Specifying the level

The log level is specified in the proxy attribute envoy.log_level.

aws elb-proxy update-proxy-attributes \
  --proxy-identifier <proxy-arn> \
  --attributes key=envoy.log_level,value=debug

The values you can specify are off, critical, error, warning (alias warn), info, debug, and trace, and I tried all of them in this article. The value immediately after creation was warn, and envoy.component_log_level was empty.

When I specified warn from the debug state, the value in the response of update-proxy-attributes became warn, but the debug output continued. When I specified warning, the output stopped after about 6 seconds. To return to a level that suppresses output, specify warning, not warn.

https://docs.aws.amazon.com/elasticloadbalancing/latest/elbproxy/monitoring-log-level.html

Output at each level

I counted the total number of events across the 2 streams for 15 seconds from the start of the requests. Each count is from a single measurement.

envoy.log_level Number of events Components that appeared
warn (default, right after creation) No log group None
off 0 None
critical 0 None
error 0 None
warning 0 None
info 0 None
debug 2,793 9: http, connection, conn_handler, upstream, pool, router, client, main, filter
trace 4,551 13: the 9 from debug plus misc, dns, wasm, happy_eyeballs

Most of the 2,793 events at debug are lines other than requests, such as health checks. The lines corresponding to the 6 requests totaled 177 events, per the table in the next section.

At debug and trace, logs continue to be output even without requests. At debug, 1,942 events were output during 9.5 seconds in which I sent no requests. The number of message characters over 15 seconds was 331,953 for debug and 716,245 for trace (one proxy, 6 requests). Because the retention period of the log group was not set, leaving it at debug or trace will keep increasing the stored volume even without traffic.

Immediately after changing the level, one line with severity info (2 lines for the 2 streams) may appear per stream. When I changed from info to error, the following line appeared.

[2026-11-26 13:38:11.683][2290][info][misc] [external/envoy+/source/common/common/logger.cc:176] change all log levels: level='error'

This line appeared when the level before the change was info, debug, or trace (debug to trace, trace to info, info to error). It did not appear for the change from error to critical or from warn to debug.

Lines for one request

The following are all the connection lines for a single request sent once to /direct (fixed response) at debug. This includes the continuation lines of the headers.

[2026-11-26 13:35:56.941][2352][debug][conn_handler] [external/envoy+/source/common/listener_manager/active_tcp_listener.cc:162] [Tags: "ConnectionId":"383"] new connection from <client-ip>:<port>
[2026-11-26 13:35:56.941][2352][debug][http] [external/envoy+/source/common/http/conn_manager_impl.cc:506] [Tags: "ConnectionId":"383"] new stream
[2026-11-26 13:35:56.941][2352][debug][http] [external/envoy+/source/common/http/conn_manager_impl.cc:1560] [Tags: "ConnectionId":"383","StreamId":"6151829858538851096"] request headers complete (end_stream=true):
':authority', '<proxy-dns>'
':path', '/direct?lvl=debug&n=1'
':method', 'GET'
'user-agent', 'curl/8.18.0'
'accept', '*/*'
[2026-11-26 13:35:56.941][2352][debug][http] [external/envoy+/source/common/http/conn_manager_impl.cc:1543] [Tags: "ConnectionId":"383","StreamId":"6151829858538851096"] request end stream timestamp recorded
[2026-11-26 13:35:56.941][2352][debug][connection] [external/envoy+/source/common/network/connection_impl.h:101] [Tags: "ConnectionId":"383"] current connecting state: false
[2026-11-26 13:35:56.941][2352][debug][http] [external/envoy+/source/common/http/filter_manager.cc:1143] [Tags: "ConnectionId":"383","StreamId":"6151829858538851096"] Preparing local reply with details direct_response
[2026-11-26 13:35:56.941][2352][debug][http] [external/envoy+/source/common/http/filter_manager.cc:1179] [Tags: "ConnectionId":"383","StreamId":"6151829858538851096"] Executing sending local reply.
[2026-11-26 13:35:56.941][2352][debug][http] [external/envoy+/source/common/http/conn_manager_impl.cc:2253] [Tags: "ConnectionId":"383","StreamId":"6151829858538851096"] encoding headers via codec (end_stream=false):
':status', '200'
'content-length', '22'
'content-type', 'text/plain'
'date', 'Thu, 26 Nov 2026 13:35:56 GMT'
'server', 'envoy'
[2026-11-26 13:35:56.941][2352][debug][http] [external/envoy+/source/common/http/conn_manager_impl.cc:2389] [Tags: "ConnectionId":"383","StreamId":"6151829858538851096"] Codec completed encoding stream.
[2026-11-26 13:35:56.948][2352][debug][connection] [external/envoy+/source/common/network/connection_impl.cc:833] [Tags: "ConnectionId":"383"] remote close
[2026-11-26 13:35:56.948][2352][debug][connection] [external/envoy+/source/common/network/connection_impl.cc:358] [Tags: "ConnectionId":"383"] closing socket: 0
[2026-11-26 13:35:56.948][2352][debug][conn_handler] [external/envoy+/source/common/listener_manager/active_stream_listener_base.cc:133] [Tags: "ConnectionId":"383"] adding to cleanup list
[2026-11-26 13:35:56.948][2352][debug][connection] [external/envoy+/source/common/network/connection_impl.cc:157] [Tags: "ConnectionId":"383"] Not closing conn, socket is not open

At debug, the values of the request headers and response headers were output as they are.

The number of events per request is as follows. Both /direct and /forward had the same counts all 3 times. "First lines" is the number of lines that begin with a square bracket. What I counted were the connection lines for that request (lines with the same ConnectionId).

Level /direct (fixed response) /forward (forwarding)
debug 23 events (13 first lines) 36 events (15 first lines)
trace 58 events (48 first lines) 87 events (59 first lines)

At trace, in addition to the debug lines, lines with severity trace that trace connection and request processing in detail are output.

Per-component levels

To change the level for each component, specify component:level pairs separated by commas in envoy.component_log_level. In the following example, the overall level is set to warning, and only http and router are set to debug.

aws elb-proxy update-proxy-attributes \
  --proxy-identifier <proxy-arn> \
  --attributes '[{"key":"envoy.log_level","value":"warning"},{"key":"envoy.component_log_level","value":"http:debug,router:debug"}]'

I tried four combinations with the overall level. In the table, debug/http represents lines with severity debug and component http.

envoy.log_level envoy.component_log_level Number of first lines output in 15 seconds (severity/component)
warning http:debug,router:debug debug/http 342, debug/router 24
warning http:debug debug/http 568 only
info router:debug debug/router 24 only
debug http:error http is 0. connection 334, upstream 106, conn_handler 110, router 24, etc.

For the specified components, the per-component level takes precedence over the overall level. When I passed an empty string, the value of envoy.component_log_level returned to empty.

Log format

text

The default format is text, and the pattern is [%Y-%m-%d %T.%e][%t][%l][%n] [%g:%#] %v. One line consists of six fields. For the example in the table, I used the new stream line shown in the section "Lines for one request".

Field Flag Example
Timestamp (UTC) %Y-%m-%d %T.%e 2026-11-26 13:35:56.941
Thread ID %t 2352
Severity %l debug
Component name %n http
Source file and line %g:%# external/envoy+/source/common/http/conn_manager_impl.cc:506
Message %v [Tags: "ConnectionId":"383"] new stream

For lines tied to a connection, [Tags: "ConnectionId":"…"] is added at the beginning of the message, and for lines tied to a request, "StreamId":"…" is also added. For messages followed by headers, such as request headers complete, the second and subsequent lines have no square-bracket prefix.

JSON

To use JSON, add application_log_config to the Envoy configuration and specify keys and format flags in json_format. For the message, specify %j, which outputs it escaped for JSON. This time, I added the following block to the top of envoy.yaml (the rest is the same as the envoy.yaml shown earlier).

application_log_config:
  log_format:
    json_format:
      timestamp: "%Y-%m-%dT%T.%e%z"
      thread_id: "%t"
      level: "%l"
      component: "%n"
      source: "%g:%#"
      message: "%j"

Apply the configuration with update-proxy-configuration.

aws elb-proxy update-proxy-configuration \
  --proxy-identifier <proxy-arn> \
  --cli-binary-format raw-in-base64-out \
  --configuration-file configurationBytes@=file://envoy.yaml

At the time of the update, envoy.log_level was warning and envoy.component_log_level was http:debug,router:debug. The lines for a request sent to /direct after the update are as follows.

{"timestamp":"2026-11-26T13:50:40.984+00:00","message":"new stream","source":"external/envoy+/source/common/http/conn_manager_impl.cc:506","thread_id":"3520","component":"http","level":"debug","ConnectionId":"23"}
{"timestamp":"2026-11-26T13:50:40.984+00:00","message":"request headers complete (end_stream=true):\n':authority', '<proxy-dns>'\n':path', '/direct?lvl=json&n=1'\n':method', 'GET'\n'user-agent', 'curl/8.18.0'\n'accept', '*/*'\n","source":"external/envoy+/source/common/http/conn_manager_impl.cc:1560","thread_id":"3520","component":"http","level":"debug","ConnectionId":"23","StreamId":"10006565570368311731"}

In addition to the six specified keys, ConnectionId was added to lines tied to a connection, and StreamId was also added to lines tied to a request. Unlike in text, multi-line messages such as headers are not split by line, and go into a single message with newlines represented as \n.

When you update the configuration, a new process starts. Because the format change is applied to the new process, text and JSON lines are mixed right after switching.

https://docs.aws.amazon.com/elasticloadbalancing/latest/elbproxy/monitoring-log-format.html

Time to take effect

When I changed the level with update-proxy-attributes, the time until the new level took effect was 1.4 to 5.9 seconds from the start of the command. The thread ID did not change, and no restart was involved.

When I updated the configuration with update-proxy-configuration, the time until the update status became valid,complete was 17 seconds for both the text-to-JSON update and the JSON-to-text update. I checked the status every 2 to 3 seconds. The lines from the process started by the update have a thread ID different from before the update.

Summary

In the process logs of ELB for Envoy, per-request processing was output at debug and trace.

At these levels, you can obtain information useful for detailed tracing and debugging. On the other hand, a large volume of logs is generated, which may increase CloudWatch Logs costs. Change the log level step by step, and check the log volume after the change.

I recommend checking normal operation in everyday use with the access log, and saving the process logs at warning or above.

https://dev.classmethod.jp/articles/elb-for-envoy-access-log-cloudwatch-logs/

Share this article

AWSのお困り事はクラスメソッドへ