Analyzer ngx-http-access-time

Name

ngx-http-access-time - Nginx HTTP Access Phase Latency

This analyzer measures the latency of Nginx HTTP access phase processing in applications. It tracks timing for access control checks, authentication, authorization, and access module execution. The analyzer generates histogram distributions of access phase latencies, helping diagnose performance issues in security policies, authentication mechanisms, and access control logic.

Resource Category

Latency.

Application Type & Technical Stack

  • OpenResty
  • Kong
  • APISIX

Command Line Syntax

The analyzer can be invoked directly on the command-line via the orxray utility from the openresty-xray-cli software package.

Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).

# PID is the target process PID.
orxray analyzer run ngx-http-access-time -p PID

# trace a shell command directly
orxray analyzer run ngx-http-access-time -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-http-access-time -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run ngx-http-access-time --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Histogram Bar Charts
  • Plain Texts

Output Example

{
  "data": {
    "distribution": [
      {"count": 0, "key": "32"},
      {"count": 0, "key": "64"},
      {"count": 7, "key": "128"},
      {"count": 20, "key": "256"},
      {"count": 10, "key": "512"},
      {"count": 0, "key": "1024"},
      {"count": 0, "key": "2048"},
      {"count": 1, "key": "4096"},
      {"count": 0, "key": "8192"},
      {"count": 1, "key": "16384"},
      {"count": 2, "key": "32768"},
      {"count": 0, "key": "65536"},
      {"count": 0, "key": "131072"}
    ],
    "unit": "us",
    "summary": {
      "min": 165,
      "max": 36539,
      "count": 41,
      "sum": 121264
    }
  },
  "kind": "access-latency"
}

Author

The OpenResty Inc. Team.

Copyright (C) by OpenResty Inc. All rights reserved.