Full event coverage test configuration (full/)
==============================================

The 'full' test is a standalone single-instance configuration that exercises
every supported OTel filter event with all three signal types: traces (spans),
metrics (instruments) and logs (log-records).

It extends the 'sa' (standalone) configuration by adding the events that 'sa'
does not cover and by attaching log-records to every scope.


Files
-----

  full/otel.cfg    OTel filter configuration (scopes, groups, instruments)
  full/haproxy.cfg HAProxy frontend/backend configuration
  full/otel.yml    Exporter, processor, reader and provider definitions
  run-full.sh      Convenience script to launch HAProxy with this config


Events
------

The table below lists every event defined in include/event.h together with the
scope that handles it and the signals produced by that scope.

  T = Trace (span)    M = Metric (instrument)    L = Log (log-record)

  Stream lifecycle events:

    Event                    Scope                       T  M  L
    ---------------------------------------------------------------
    on-stream-start          on_stream_start             x  x  x
    on-stream-stop           on_stream_stop              -  -  x
    on-idle-timeout          on_idle_timeout              x  x  x
    on-backend-set           on_backend_set               x  x  x

  Request analyzer events:

    Event                              Scope                          T  M  L
    --------------------------------------------------------------------------
    on-client-session-start            client_session_start           x  x  x
    on-frontend-tcp-request            frontend_tcp_request           x  x  x
    on-http-wait-request               http_wait_request              x  -  x
    on-http-body-request               http_body_request              x  -  x
    on-frontend-http-request           frontend_http_request          x  x  x
    on-switching-rules-request         switching_rules_request        x  -  x
    on-backend-tcp-request             backend_tcp_request            x  x  x
    on-backend-http-request            backend_http_request           x  -  x
    on-process-server-rules-request    process_server_rules_request   x  -  x
    on-http-process-request            http_process_request           x  -  x
    on-tcp-rdp-cookie-request          tcp_rdp_cookie_request         x  -  x
    on-process-sticking-rules-request  process_sticking_rules_request x  -  x
    on-http-headers-request            http_headers_request           x  x  x
    on-http-end-request                http_end_request               x  x  x
    on-client-session-end              client_session_end             -  x  x
    on-server-unavailable              server_unavailable             -  -  x

  Response analyzer events:

    Event                              Scope                          T  M  L
    --------------------------------------------------------------------------
    on-server-session-start            server_session_start           x  x  x
    on-tcp-response                    tcp_response                   x  x  x
    on-http-wait-response              http_wait_response             x  -  x
    on-process-store-rules-response    process_store_rules_response   x  -  x
    on-http-response                   http_response                  x  x  x
    on-http-headers-response           http_headers_response          x  x  x
    on-http-end-response               http_end_response              x  x  x
    on-http-reply                      http_reply                     x  x  x
    on-server-session-end              server_session_end             -  x  x

  Additionally, the http_response-error scope fires conditionally on the
  on-http-response event when the response status is outside the 100-399 range,
  setting an error status on the "HTTP response" span.

  The http_response_group (http_response_1, http_response_2) and
  http_after_response_group (http_after_response) are invoked via http-response
  and http-after-response directives in haproxy.cfg.


Instruments
-----------

Every instrument definition has at least one corresponding update.

  Instrument name                Type       Defined in              Updated in
  -------------------------------------------------------------------------------
  haproxy.sessions.active        udcnt_int  on_stream_start         client_session_end
  haproxy.fe.connections         gauge_int  on_stream_start         http_response
  idle.count                     cnt_int    on_idle_timeout         on_idle_timeout
  haproxy.backend.set            cnt_int    on_backend_set          on_backend_set
  haproxy.client.session.start   cnt_int    client_session_start    client_session_end
  haproxy.tcp.request.fe         cnt_int    frontend_tcp_request    frontend_http_request
  haproxy.http.requests          cnt_int    frontend_http_request   http_response
  haproxy.http.latency           hist_int   frontend_http_request   frontend_http_request,
                                                                    http_response
  haproxy.tcp.request.be         cnt_int    backend_tcp_request     backend_http_request
  haproxy.http.headers.request   cnt_int    http_headers_request    http_end_request
  haproxy.http.end.request       cnt_int    http_end_request        client_session_end
  haproxy.server.session.start   cnt_int    server_session_start    server_session_end
  haproxy.tcp.response           cnt_int    tcp_response            http_wait_response
  haproxy.http.headers.response  cnt_int    http_headers_response   http_end_response
  haproxy.http.end.response      cnt_int    http_end_response       http_reply
  haproxy.http.reply             cnt_int    http_reply              server_session_end


Span hierarchy
--------------

  Request path:

    "HAProxy session" (root)
     +-- "Client session"
          +-- "Frontend TCP request"
               +-- "HTTP wait request"
                    +-- "HTTP body request"
                         +-- "Frontend HTTP request"  [link: "HAProxy session"]
                              +-- "Switching rules request"
                                   +-- "Backend TCP request"
                                        +-- "Backend HTTP request"
                                             +-- "Process server rules request"
                                                  +-- "HTTP process request"
                                                       +-- "TCP RDP cookie request"
                                                            +-- "Process sticking rules request"
                                                                 +-- "HTTP headers request"
                                                                      +-- "HTTP end request"

  Response path:

    "HAProxy session" (root)
     +-- "Server session"  [link: "HAProxy session", "Client session"]
          +-- "TCP response"
               +-- "HTTP wait response"
                    +-- "Process store rules response"
                         +-- "HTTP response"
                              +-- "HTTP headers response"
                                   +-- "HTTP end response"
                                        +-- "HTTP reply"

  Auxiliary spans:

    "HAProxy session"
     +-- "Backend set"
     +-- "heartbeat"              (on-idle-timeout, periodic)
     +-- "HAProxy response"       (http_after_response_group, on error)


Running the test
----------------

From the test/ directory:

  % ./run-full.sh [/path/to/haproxy] [pidfile]

If no arguments are given, the script looks for the haproxy binary three
directories up from the current working directory.  The backend origin server
must be running on 127.0.0.1:8000.
