XDebug プラグイン¶
XDebug プラグインは HTTP クライアントがデフォルトでは X-Deubg
ヘッダーを使用して Traffic Server キャッシュの操作をデバッグすることを可能にします。このプラグインはクライアントからのリクエストに X-Debug
ヘッダーあるいはクライアントリクエスト内で設定されたヘッダーが含まれることによって動作を開始します。このヘッダーの内容はレスポンスに要望するデバッグヘッダーの名前です。XDebug プラグインはクライアントからのリクエストから X-Debug
ヘッダーを取り除き、クライアントへのレスポンスに要望されたヘッダーを注入します。
XDebug はグローバルなプラグインです。plugin.config
ファイルに追加することでインストールされます。現時点では単一の省略可能な設定オプション --header
を受け取ります。例えば
--header=ATS-My-Debug
This overrides the default X-Debug
header name.
ヘッダーのデバッグ¶
XDebug プラグインは次のデバッグヘッダーを生成することができます。
- Via
Via
ヘッダーがリクエストされた場合、XDebug プラグインはそのリクエストのproxy.config.http.insert_response_via_str
設定変数に3
を設定します。- Diags
If the
Diags
header is requested, the XDebug plugin enables the transaction specific diagnostics for the transaction. This also requires thatproxy.config.diags.debug.enabled
is set to1
.- log-headers
If the
log-headers
is requested whileproxy.config.diags.debug.tags
is set toxdebug.headers
andproxy.config.diags.debug.enabled
is set to1
, then all client and server, request and response headers are logged. Also, theX-Debug: log-headers
header is always added to the upstream request.- X-Cache-Key
The
X-Cache-Key
header contains the URL that identifies the HTTP object in the Traffic Server cache. This header is particularly useful if a custom cache key is being used.- X-Cache
The
X-Cache
header contains the results of any cache lookups.値
解説
none
No cache lookup was attempted.
miss
The object was not found in the cache.
hit-stale
The object was found in the cache, but it was stale.
hit-fresh
The object was fresh in the cache.
skipped
The cache lookup was skipped.
If a request goes through multiple proxies, each one prepends its X-Cache header content at the beginning of the existing X-Cache header. As a result, the order is reversed from the Via: header.
- X-Cache-Generation
The cache generation ID for this transaction, as specified by the
proxy.config.http.cache.generation
configuration variable.- X-Milestones
The
X-Milestones
header contains detailed information about how long the transaction took to traverse portions of the HTTP state machine. The timing information is obtained from theTSHttpTxnMilestoneGet()
API. Each milestone value is a fractional number of seconds since the beginning of the transaction.- X-Transaction-ID
A unique transaction ID, which identifies this request / transaction. This matches the log field format that is also available, %<cruuid>.
- X-Remap
If the URL was remapped for a request, this header gives the to and from field from the line in remap.config that caused the URL to be remapped.