> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-parallel-read-in-order-multi-part.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> インストルメンテーションポイントが含まれるシステムテーブル

# system.instrumentation

<Info>
  **ClickHouse Cloud でのクエリ**

  このシステムテーブルのデータは、ClickHouse Cloud の各ノードにローカルに保持されています。したがって、すべてのデータを完全に把握するには、`clusterAllReplicas` 関数を使用する必要があります。詳細については、[こちら](/ja/reference/system-tables/overview#system-tables-in-clickhouse-cloud)を参照してください。
</Info>

## 説明

LLVM の XRay 機能を使用するインストルメンテーションポイントが格納されます。

**利用可否**

`system.instrumentation` は、LLVM XRay サポート (`USE_XRAY`) を有効にしてコンパイルされた ClickHouse ビルドにのみ存在します。それ以外のビルドではこのテーブルは存在せず、このテーブルに対するクエリは `UNKNOWN_TABLE` で失敗します。お使いのビルドで有効になっているかどうかは、次のコマンドで確認できます。

```sql theme={null}
SELECT value FROM system.build_options WHERE name = 'USE_XRAY';
```

## カラム

* `id` ([UInt32](/ja/reference/data-types/int-uint)) — インストルメンテーションポイントの ID
* `function_id` ([Int32](/ja/reference/data-types/int-uint)) — ELF バイナリの xray\_instr\_map セクションで関数に割り当てられた ID。
* `function_name` ([LowCardinality(String)](/ja/reference/data-types/lowcardinality)) — 関数のインストルメントに使用される名前。
* `handler` ([LowCardinality(String)](/ja/reference/data-types/lowcardinality)) — 関数のインストルメンテーションポイントにパッチ適用されたハンドラー。
* `entry_type` ([Enum8('Entry' = 0, 'Exit' = 1, 'EntryAndExit' = 2)](/ja/reference/data-types/enum)) — パッチのエントリタイプ。
* `symbol` ([LowCardinality(String)](/ja/reference/data-types/lowcardinality)) — 完全なデマングル済みのシンボル名。
* `arguments` ([Array(Dynamic)](/ja/reference/data-types/array)) — ハンドラー呼び出しの引数。

## 例

```sql theme={null}
SELECT * FROM system.instrumentation FORMAT Vertical;
```

```text theme={null}
Row 1:
──────
id:            0
function_id:   231280
function_name: QueryMetricLog::startQuery
handler:       log
entry_type:    Entry
symbol:        DB::QueryMetricLog::startQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l>>>, unsigned long)
arguments:     ['test']

Row 2:
──────
id:            1
function_id:   231280
function_name: QueryMetricLog::startQuery
handler:       profile
entry_type:    EntryAndExit
symbol:        DB::QueryMetricLog::startQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l>>>, unsigned long)
arguments:     []

Row 3:
──────
id:            2
function_id:   231280
function_name: QueryMetricLog::startQuery
handler:       sleep
entry_type:    Exit
symbol:        DB::QueryMetricLog::startQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l>>>, unsigned long)
arguments:     [0.3]

3 rows in set. Elapsed: 0.302 sec.
```

## 関連項目

* [SYSTEM INSTRUMENT](/ja/reference/statements/system#instrument) — インストルメンテーションポイントを追加または削除します。
* [system.trace\_log](/ja/reference/system-tables/trace_log) — プロファイリングログを確認します。
* [system.symbols](/ja/reference/system-tables/symbols) — インストルメンテーションポイントの追加に使用するシンボルを確認します。
