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

> 実行されたクエリのトレーススパンに関する情報を格納するシステムテーブル。

# system.opentelemetry_span_log

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

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

<div id="description">
  ## 説明
</div>

実行されたクエリの[トレーススパン](https://opentracing.io/docs/overview/spans/)に関する情報を含みます。

<div id="columns">
  ## カラム
</div>

* `hostname` ([LowCardinality(String)](/ja/reference/data-types/lowcardinality)) — このスパンが取得されたホスト名です。
* `trace_id` ([UUID](/ja/reference/data-types/uuid)) — 実行されたクエリのトレース ID。
* `span_id` ([UInt64](/ja/reference/data-types/int-uint)) — トレーススパンの ID。
* `parent_span_id` ([UInt64](/ja/reference/data-types/int-uint)) — 親トレーススパンの ID。
* `operation_name` ([LowCardinality(String)](/ja/reference/data-types/lowcardinality)) — オペレーション名。
* `kind` ([Enum8('INTERNAL' = 0, 'SERVER' = 1, 'CLIENT' = 2, 'PRODUCER' = 3, 'CONSUMER' = 4)](/ja/reference/data-types/enum)) — スパンの SpanKind。INTERNAL — スパンがアプリケーション内の内部処理を表すことを示します。SERVER — スパンが同期 RPC またはその他のリモートリクエストに対するサーバー側の処理を表すことを示します。CLIENT — スパンが何らかのリモートサービスへのリクエストを表すことを示します。PRODUCER — スパンが非同期リクエストのイニシエーターを表すことを示します。この親スパンは、対応する子 CONSUMER スパンより前に終了することが多く、場合によっては子スパンの開始前に終了することもあります。CONSUMER - スパンが非同期 PRODUCER リクエストの子を表すことを示します。
* `start_time_us` ([UInt64](/ja/reference/data-types/int-uint)) — トレーススパンの開始時刻 (マイクロ秒) 。
* `finish_time_us` ([UInt64](/ja/reference/data-types/int-uint)) — トレーススパンの終了時刻 (マイクロ秒) 。
* `finish_date` ([Date](/ja/reference/data-types/date)) — トレーススパンの終了日。
* `status_code` ([Enum8('UNSET' = 0, 'OK' = 1, 'ERROR' = 2)](/ja/reference/data-types/enum)) — スパンのステータスコード。
* `status_message` ([LowCardinality(String)](/ja/reference/data-types/lowcardinality)) — エラーメッセージ。
* `attribute` ([Map(LowCardinality(String), String)](/ja/reference/data-types/map)) — トレーススパンに応じた属性です。これらは OpenTelemetry 標準の推奨事項に従って設定されます。

**別名:**

* `attribute.names` — `mapKeys(attribute)` の別名。
* `attribute.values` — `mapValues(attribute)` の別名。

<div id="example">
  ## 例
</div>

```sql title="Query" theme={null}
SELECT * FROM system.opentelemetry_span_log LIMIT 1 FORMAT Vertical;
```

```text title="Response" theme={null}
Row 1:
──────
trace_id:         cdab0847-0d62-61d5-4d38-dd65b19a1914
span_id:          701487461015578150
parent_span_id:   2991972114672045096
operation_name:   DB::Block DB::InterpreterSelectQuery::getSampleBlockImpl()
kind:             INTERNAL
start_time_us:    1612374594529090
finish_time_us:   1612374594529108
finish_date:      2021-02-03
attribute.names:  []
attribute.values: []
```

<div id="see-also">
  ## 関連項目
</div>

* [OpenTelemetry](/ja/guides/oss/deployment-and-scaling/monitoring/opentelemetry)
