> Source: https://www.ymotongpoo.com/works/otel-specs-ja/semconv/resource/browser/


# Browser

<!-- semconv entity.browser -->
<!-- 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)

**type:** `browser`

**Description:** そのリソースが表すアプリケーションが実行されているWebブラウザー。`browser.*`属性は、（モバイルデバイスかデスクトップデバイスかにかかわらず）Webブラウザー内で実行されているアプリケーションを表すリソースにのみ使用しなければなりません（MUST）。

> [!warning]
> このEntity定義には、roleを持たない属性が含まれています。
> 安定版のEntityは、roleが定義されていない属性を持ってはなりません（MUST NOT）。

**Attributes:**

| Role | Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Other | [`browser.brands`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/browser/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string[] | ブランド名とバージョンをスペースで区切った配列。[1] | `[" Not A;Brand 99", "Chromium 99", "Chrome 99"]` |
| Other | [`browser.language`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/browser/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ブラウザーを使用しているユーザーの優先言語。[2] | `en`; `en-US`; `fr`; `fr-FR` |
| Other | [`browser.mobile`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/browser/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | boolean | ブラウザーがモバイルデバイス上で動作している場合にtrueとなるブール値。[3] | |
| Other | [`browser.platform`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/browser/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ブラウザーが動作しているプラットフォーム。[4] | `Windows`; `macOS`; `Android` |
| Other | [`user_agent.original`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/user-agent/) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Recommended` | string | ブラウザーが提供する完全なUser-Agent文字列。[5] | `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36` |

**[1] `browser.brands`:** この値は、[UA client hints API](https://wicg.github.io/ua-client-hints/#interface)（`navigator.userAgentData.brands`）から取得することを想定しています。

**[2] `browser.language`:** この値は、Navigator APIの`navigator.language`から取得することを想定しています。

**[3] `browser.mobile`:** この値は、[UA client hints API](https://wicg.github.io/ua-client-hints/#interface)（`navigator.userAgentData.mobile`）から取得することを想定しています。利用できない場合、この属性は未設定のままにすべきです（SHOULD）。

**[4] `browser.platform`:** この値は、[UA client hints API](https://wicg.github.io/ua-client-hints/#interface)（`navigator.userAgentData.platform`）から取得することを想定しています。利用できない場合、代わりにレガシーな`navigator.platform` APIを使用すべきではなく（SHOULD NOT）、値の一貫性を保つためにこの属性は未設定のままにすべきです（SHOULD）。
取りうる値の一覧は、[W3C User-Agent Client Hints仕様書](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform)で定義されています。これらの値の一部（すべてではありません）は、[`os.type`と`os.name`属性](/works/otel-specs-ja/semconv/resource/os/)の値と重複することがある点に注意してください。しかし一貫性のため、`browser.platform`属性の値は、ユーザーエージェントが提供する値を正確に取得すべきです。

**[5] `user_agent.original`:** この値を取得するには、レガシーな`navigator.userAgent` APIを使用できます。
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

これらの属性はすべて、ユーザーエージェント自身がHTTPヘッダー（Sec-CH-UA、Sec-CH-Platform、User-Agentなど）の形式で提供できます。しかし、これらのヘッダーはプロキシサーバーによって取り除かれる可能性があり、個々のクライアントからの呼び出しに結び付いています。Collectorのようなサービスを通じたバッチ処理をサポートし、（プロキシサーバーがヘッダーを取り除くことなどによる）データの損失を防ぐため、可能な場合はこれらの属性を使用すべきです。

**type:** `browser.document`

<!-- semconv entity.browser.document -->
<!-- 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)

**type:** `browser.document`

**Description:** ブラウザーに読み込まれたWebページのドキュメント。

**Attributes:**

| Role | Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- | --- |
| Identity | [`browser.document.url.full`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/browser/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)に基づく、現在のブラウザードキュメントの絶対URL。 | `https://www.example.com/search?q=OpenTelemetry#SemConv` |
<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

