> Source: https://www.ymotongpoo.com/works/otel-specs-ja/semconv/app/app-events/


# App Events

**ステータス**: [Development][DocumentStatus]

この文書では、クライアント側アプリケーション（Webアプリやモバイルアプリなど）に関連するイベントを定義します。

## Click Events

### Event: `app.screen.click`

<!-- semconv event.app.screen.click -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

イベント名は `app.screen.click` でなければなりません（MUST）。

このイベントは、アプリケーションの画面上での瞬間的なクリックを表します。

`app.screen.click` イベントは、ユーザーがアプリケーションの画面領域をクリックまたはタップしたことを示すために使用できます。アプリケーションのアクティブな領域外でのクリックは、このイベントを発生させるべきではありません（SHOULD NOT）。このイベントは、タッチ/マウスのダウンとタッチ/マウスのアップを区別しません。実装は、通常タッチのリリース時またはマウスのアップ時である、クリックが完了した時点でこのイベントを発生させることを優先すべきです（SHOULD）。クリックイベントの位置は、絶対的な画面ピクセルで提供しなければなりません（MUST）。

**Attributes:**

| Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`app.screen.coordinate.x`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | int | 画面座標のx（水平）座標。画面ピクセル単位。 | `0`; `131` |
| [`app.screen.coordinate.y`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | int | 画面座標のy（垂直）成分。画面ピクセル単位。 | `12`; `99` |
| [`app.screen.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | 同じアプリケーション内の他の画面からこの画面を一意に区別する識別子。[1] | `f9bc787d-ff05-48ad-90e1-fca1d46130b3`; `com.example.app.MainActivity`; `com.example.shop.ProductDetailFragment`; `MyApp.ProfileView`; `MyApp.ProfileViewController` |
| [`app.screen.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | アプリケーション画面の名前。[2] | `MainActivity`; `ProductDetailFragment`; `ProfileView`; `ProfileViewController` |

**[1] `app.screen.id`:** 画面は、アプリが描画するデバイスディスプレイの一部分のみを表します。通常、複数のウィジェットやUIコンポーネントを含み、個々のウィジェットよりも大きな範囲を持ちます。同じディスプレイ上に複数の画面が同時に存在できます（例: タブレットの分割ビュー）。

**[2] `app.screen.name`:** 画面は、アプリが描画するデバイスディスプレイの一部分のみを表します。通常、複数のウィジェットやUIコンポーネントを含み、個々のウィジェットよりも大きな範囲を持ちます。同じディスプレイ上に複数の画面が同時に存在できます（例: タブレットの分割ビュー）。

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### Event: `app.widget.click`

<!-- semconv event.app.widget.click -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

イベント名は `app.widget.click` でなければなりません（MUST）。

このイベントは、アプリケーションのウィジェットがクリックされたことを示します。

このイベントは、視覚的なアプリケーションコンポーネントがクリックされたこと、通常はユーザーの手動操作によるものを示すために使用します。

**Attributes:**

| Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`app.widget.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | 同じアプリケーション内の他のウィジェットからこのウィジェットを一意に区別する識別子。[1] | `f9bc787d-ff05-48ad-90e1-fca1d46130b3`; `submit_order_1829` |
| [`app.screen.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | 同じアプリケーション内の他の画面からこの画面を一意に区別する識別子。[2] | `f9bc787d-ff05-48ad-90e1-fca1d46130b3`; `com.example.app.MainActivity`; `com.example.shop.ProductDetailFragment`; `MyApp.ProfileView`; `MyApp.ProfileViewController` |
| [`app.screen.coordinate.x`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | int | 画面座標のx（水平）座標。画面ピクセル単位。 | `0`; `131` |
| [`app.screen.coordinate.y`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | int | 画面座標のy（垂直）成分。画面ピクセル単位。 | `12`; `99` |
| [`app.screen.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | アプリケーション画面の名前。[3] | `MainActivity`; `ProductDetailFragment`; `ProfileView`; `ProfileViewController` |
| [`app.widget.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | string | アプリケーションウィジェットの名前。[4] | `submit`; `attack`; `Clear Cart` |

**[1] `app.widget.id`:** ウィジェットは、通常画面上に表示される視覚的なGUI要素であるアプリケーションコンポーネントです。

**[2] `app.screen.id`:** 画面は、アプリが描画するデバイスディスプレイの一部分のみを表します。通常、複数のウィジェットやUIコンポーネントを含み、個々のウィジェットよりも大きな範囲を持ちます。同じディスプレイ上に複数の画面が同時に存在できます（例: タブレットの分割ビュー）。

**[3] `app.screen.name`:** 画面は、アプリが描画するデバイスディスプレイの一部分のみを表します。通常、複数のウィジェットやUIコンポーネントを含み、個々のウィジェットよりも大きな範囲を持ちます。同じディスプレイ上に複数の画面が同時に存在できます（例: タブレットの分割ビュー）。

**[4] `app.widget.name`:** ウィジェットは、通常画面上に表示される視覚的なGUI要素であるアプリケーションコンポーネントです。

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Crash Event

### Event: `app.crash`

<!-- semconv event.app.crash -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

イベント名は `app.crash` でなければなりません（MUST）。

このイベントは、例外や、より低いレベルでエラーが発生したことを示す信号など、回復不能なプログラミングエラーによってユーザー向けアプリケーションが終了したことを表します。

クラッシュイベントは、クラッシュが発生したアプリケーションインスタンス内で実行されていないOTel SDKインスタンスによって、非同期に生成されることがあります。例えば、計装は、ディスク上のtombstoneに記録された情報に基づいて、以前のアプリインスタンスのクラッシュを報告する場合があります。クラッシュの報告者がクラッシュしたアプリケーションインスタンス自身でない場合、報告者のリソースの属性が代わりに使われないようにするため、クラッシュしたアプリケーションインスタンスを識別する関連するリソース属性をイベント属性として提供しなければなりません（MUST）。計装がクラッシュのインスタンスがすでに報告済みかどうかをどのように判定し、必要なデータをどのように取得するかは、計装に委ねられています。重複排除に十分なデータを提供することは必須ではありません（NOT REQUIRED）。

**Attributes:**

| Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`app.build_id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Conditionally Required` [1] | string | 特定のアプリケーションのビルドまたはコンパイルを識別する一意の識別子。 | `6cff0a7e-cefc-4668-96f5-1273d8b334d0`; `9f2b833506aa6973a92fde9733e6271f`; `my-app-1.0.0-code-123` |
| [`os.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/os/) | ![Development](https://img.shields.io/badge/-development-blue) | `Conditionally Required` [2] | string | 人間が読めるオペレーティングシステム名。 | `iOS`; `Android`; `Ubuntu` |
| [`os.version`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/os/) | ![Development](https://img.shields.io/badge/-development-blue) | `Conditionally Required` [3] | string | [バージョン属性](/works/otel-specs-ja/semconv/resource/#バージョン属性)で定義されている、オペレーティングシステムのバージョン文字列。 | `14.2.1`; `18.04.1` |
| [`service.version`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/service/) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Conditionally Required` [4] | string | サービスコンポーネントのバージョン文字列。フォーマットはこれらの規約では定義されません。 | `2.0.0`; `a01dbef8a` |
| [`app.crash.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | エンドユーザー向けアプリのクラッシュの1つのインスタンスを表す一意の識別子。[5] | `083d3d2d-9a0e-47f8-be3d-bc3c5538ba38` |
| [`exception.message`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/exception/) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | 例外メッセージ。[6] | `Division by zero`; `Can't convert 'int' object to str implicitly` |
| [`exception.stacktrace`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/exception/) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | 言語ランタイムにおける自然な表現形式での文字列としてのスタックトレース。表現形式は各言語のSIGが決定し、文書化するものとします。[7] | `Exception in thread "main" java.lang.RuntimeException: Test exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at com.example.GenerateTrace.main(GenerateTrace.java:5)` |
| [`exception.type`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/exception/) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | 例外の型（該当する場合は完全修飾クラス名）。この型をサポートする言語では、静的な型よりも例外の動的な型を優先すべきです。[8] | `java.net.ConnectException`; `OSError` |
| [`session.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/session/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | セッションを識別する一意のID。 | `00112233-4455-6677-8899-aabbccddeeff` |

**[1] `app.build_id`:** 報告者がクラッシュしたアプリケーションインスタンス自身ではなく、かつ利用可能な場合。

**[2] `os.name`:** 報告者がクラッシュしたアプリケーションインスタンス自身ではなく、かつOS名が利用可能な場合。

**[3] `os.version`:** 報告者がクラッシュしたアプリケーションインスタンス自身ではない場合。

**[4] `service.version`:** 報告者がクラッシュしたアプリケーションインスタンス自身ではない場合。

**[5] `app.crash.id`:** その値は意味を持つことがあり（MAY）、同じ計装によって記録されたテレメトリーとメタデータの参照として使用されることがあります（例えば、クラッシュを捕捉した外部ソースが生成したIDである場合）。計装以外の外部ソースから来ることがあり（MAY）、それによって他のソースから追加データを検索したり、重複排除を容易にしたりできます。

**[6] `exception.message`:** これに難読化されたシンボルが含まれる場合、それらの復号ができるように `app.build_id` を提供すべきです（SHOULD）。

**[7] `exception.stacktrace`:** これに難読化されたシンボルが含まれる場合、それらの復号ができるように `app.build_id` を提供すべきです（SHOULD）。

**[8] `exception.type`:** これに難読化されたシンボルが含まれる場合、それらの復号ができるように `app.build_id` を提供すべきです（SHOULD）。

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Jank Event

### Event: `app.jank`

Jank（ジャンク）とは、UIレンダリングの乱れであり、表示がぎこちなく感じられたり、応答不能・フリーズしたように感じられたりする現象です。ジャンクを検知できるアプリケーションは、次のイベントで報告できます。

<!-- semconv event.app.jank -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

イベント名は `app.jank` でなければなりません（MUST）。

このイベントは、アプリケーションが標準以下のUIレンダリング性能を検知したことを示します。

ジャンクは、UIのレンダリングが遅く、ユーザーが何らかの乱れやぎこちなさを感じるほどになったときに発生します。

**Attributes:**

| Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`app.jank.frame_count`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | int | ジャンクが発生したフレームレンダリングの回数。[1] | `9`; `42` |
| [`app.jank.period`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | double | このジャンクが報告される対象の時間帯（秒単位）。 | `1.0`; `5.0`; `10.24` |
| [`app.jank.threshold`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | double | このジャンクの最小レンダリング閾値（秒単位）。 | `0.016`; `0.7`; `1.024` |

**[1] `app.jank.frame_count`:** プラットフォームの制約によっては、提供される値が近似値であることがあります（MAY）。

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

## Attributes

テレメトリー項目に現れる可能性のあるアプリケーション関連の属性については、[appの属性](https://opentelemetry.io/docs/specs/semconv/registry/attributes/app/)レジストリを参照してください。

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status

