# OpenTelemetry v0.148.0

2026-03-17 · [元のリリースノート](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.148.0) · [全体のまとめ](https://ratatosk.io/ja/releases/opentelemetry/v0.148.0)

破壊的変更 6 · 非推奨 1 · 重大な修正 5 · 機能・改善 7 · 依存関係の更新 1 · その他の変更 2

## 破壊的変更 (6)

### 内部 Prometheus サービスラベルのアンダースコア化

- 影響対象: Collector の内部メトリクスエンドポイント `:8888` を Prometheus receiver でスクレイプする場合

これまでは、これらのメトリクスはリソース属性とデータポイント属性に `service.name`、`service.instance.id`、`service.version` を公開していました。現在は代わりに `service_name`、`service_instance_id`、`service_version` を公開します。

> - `service`: The collector's internal Prometheus metrics endpoint (`:8888`) now emits OTel service labels with underscore
>   names (`service_name`, `service_instance_id`, `service_version`) instead of dot-notation names (`service.name`,
>   `service.instance.id`, `service.version`). Users scraping this endpoint with the Prometheus receiver will see these renamed
>   labels in resource and datapoint attributes. As a workaround, add the following `metric_relabel_configs` to your scrape
>   config in prometheus receiver:
>   ```yaml
>   metric_relabel_configs:
>     - source_labels: [service_name]
>       target_label: service.name
>     - source_labels: [service_instance_id]
>       target_label: service.instance.id
>     - source_labels: [service_version]
>       target_label: service.version
>     - regex: service_name|service_instance_id|service_version
>       action: labeldrop
>   ```
>   See https://github.com/open-telemetry/opentelemetry-collector/issues/14814 for details and updates.

### Collector メトリクスの単位を単数形に変更

- 影響対象: 波括弧で囲まれた複数形の単位を持つ Collector メトリクス (推定)

変更前は、対象のメトリクスで `{requests}` のような複数形の単位文字列が使われていました。

> - `all`: Change metric units to be singular to match OTel specification, e.g. `{requests}` -> `{request}` (#14753)

### Windows の `cmd/builder` が出力するファイル名に `.exe` を追加

- 影響対象: `cmd/builder` で作成する Windows ビルド

以前はバイナリの名前に拡張子がなく、`<distribution name>` でした。Windows ビルドでは、`<distribution name>.exe` が出力されるようになりました。

根拠: “If you use the builder to build a Windows binary, that binary will not have a `.exe` extension.” https://github.com/open-telemetry/opentelemetry-collector/issues/12591

> - `cmd/builder`: Add `.exe` to output binary names when building for Windows targets. (#12591)

### `pdata/pprofile` `Sample` のフィールド識別子の再割り当て

- 影響対象: `pdata/pprofile` `Sample` メッセージを使用する構成 (推定)

以前は、`Values` の `protoID` は 2、`AttributeIndices` は 3、`LinkIndex` は 4 でした。現在は、それぞれ 4、2、3 です。

> - `pdata/pprofile`: Update protoID for message Sample fields (#14652)

### `pdata/pprofile` によるプロファイル属性文字列の辞書参照としてのシリアライズ

- 影響対象: リソース属性またはスコープ属性に文字列属性を含むプロファイル

アンマーシャリング時に参照が文字列に戻されるため、pdata APIは透過的に利用できます。

根拠: “// Resolve all string_value_ref and key_ref to their actual strings” https://github.com/open-telemetry/opentelemetry-collector/pull/14546

> - `pdata/pprofile`: Implement reference based attributes in Profiles (#14546)

### メトリクスごとの設定型による `MetricConfig` の置き換え

- 影響対象: `reaggregation_enabled: true` のコンポーネント
- 必要な対応: アップグレード前の `MetricConfig` への参照の更新

集約可能な属性を持つメトリクスでは、`AggregationStrategy` と `EnabledAttributes []<MetricName>AttributeKey` が公開されます。それ以外のメトリクスで公開されるのは `Enabled` のみです。型付きの属性キー定数により `[]string` が置き換えられ、実行時の属性スライスの割り当てがなくなります。また、検証エラーには有効な属性とストラテジーが示されます。

> - `cmd/mdatagen`: Generate a per-metric config type `<MetricName>Config` for each metric when `reaggregation_enabled: true` (#14689)
>   Metrics with aggregatable attributes get `AggregationStrategy` and `EnabledAttributes []<MetricName>AttributeKey`
>   fields; others get `Enabled` only. Typed attribute key constants (e.g. `DefaultMetricAttributeKeyStringAttr`)
>   replace `[]string`, eliminating runtime attribute slice allocations. Validation errors now list valid attributes
>   and strategies by name. Components using `reaggregation_enabled: true` will need to update references to `MetricConfig`.

## 非推奨 (1)

### エンティティメトリクス向けルート `Record<Metric>DataPoint` および `EmitForResource` メソッドの非推奨化

- 影響対象: `metadata.yaml` でエンティティと関連メトリクスを定義し、`cmd/mdatagen` を使用するコンポーネント
- 削除予定: 不明

これまでは、関連メトリクスを任意のリソースに記録したり、必須の識別属性を省略したりしても、コンパイル時にも実行時にも警告されませんでした。生成されるエンティティスコープのビルダーでは、メトリクスとの関連付けがコンパイル時に強制されるようになりました。また、その `Emit()` はエンティティの識別属性と説明属性をリソースにコピーします。

> - `cmd/mdatagen`: Generate entity-scoped MetricsBuilder API that enforces entity-metric associations at compile time (#14659)

## 重大な修正 (5)

### [表面化しなかった不具合] `pkg/service`レポーターによるステータスイベントの繰り返し出力

- 影響対象: `pkg/service`の内部ステータスレポーターからコンポーネントのステータスイベントを受け取る構成 (推定)

以前は、状態機械が不正と判定した遷移（`Ok`や`RecoverableError`のステータスの繰り返しを含む）は黙って破棄され、コンシューマーには届きませんでした。現在は、メタデータだけが変化した場合でも、そうしたイベントがコンシューマーに届きます。

> - `pkg/service`: The internal status reporter no longer drops repeated Ok and RecoverableError statuses (#14282)
>   Status events can now carry metadata and there's value in allowing them to be emitted despite the status value itself
>   not changing.
> - `pkg/service`: The internal status reporter no longer drops repeated Ok and RecoverableError statuses (#14282)
>   Status events can now carry metadata and there's value in allowing them to be emitted despite the status value itself
>   not changing.

### `pdata/pprofile` のプロファイルマージにおける辞書切り替えの修正

- 影響対象: 複数のデータ項目で辞書テーブルのエントリーを共有するプロファイルマージ

複数のサンプルが同じスタックを共有している場合、マージ時にその辞書が複数回切り替わることがありました。現在はリソースプロファイルの処理前に辞書を一度だけ切り替え、サンプルでは切り替え済みのスタック辞書を使用します。

> - `pdata/pprofile`: Switch the dictionary of dictionary tables entries only once when merging profiles (#14709)
>   For dictionary table data, we used to switch their dictionaries when doing
>   the switch for the data that uses them.
>   However, when an entry is associated with multiple other data (several
>   samples can use the same stack), we would have been switching the
>   dictionaries of the entry multiple times.
>   We now switch dictionaries for dictionary table data only once, before
>   switching the resource profiles.

### `$ref` 解決時に `cmd/mdatagen` がローカル拡張を保持

- 影響対象: `$ref` ノードにローカル拡張を持つ `cmd/mdatagen` のスキーマ

ノードが外部または内部のスキーマを参照する場合、`x-customType`、`x-pointer`、`x-optional`、`default`、`description` などのローカル定義プロパティが上書きされて失われ、生成される Go 構造体が不正になることがありました。

> - `cmd/mdatagen`: Preserve custom extensions (e.g., `x-customType`, `x-pointer`) during schema reference resolution. (#14713, #14565)
>   Fixes an issue where custom properties defined locally on a node were
>   overwritten and lost when resolving a `$ref` to an external/internal schema.

### debug exporter のメトリックメタデータ表示の修正

- 影響対象: メタデータを持つメトリックを `verbosity: detailed` で出力する `exporter/debug` (推定)

デバッグエクスポーターは以前、メタデータを持つメトリックについて、Metric Descriptor と DataPoints は表示していましたが、Metadata フィールドを省略していました。詳細出力にこのフィールドが含まれるようになりました。

> - `exporter/debug`: Add printing of metric metadata in detailed verbosity. (#14667)

### OTLP gRPC エクスポーターの送信メソッドがパニックではなくエラーを返すように変更

- 影響対象: 送信キューとリトライを無効にして `exporter/otlp_grpc` を使用する構成

この修正以前は、`Start()` の完了前に `ConsumeTraces`、`ConsumeMetrics`、`ConsumeLogs`、または `ConsumeProfiles` を呼び出すと、nil インターフェースを参照して回復不能なパニックが発生する可能性がありました。

> - `exporter/otlp_grpc`: Prevent nil pointer panic when push methods are called before the OTLP exporter initializes its gRPC clients. (#14663)
>   When the sending queue and retry are disabled, calling ConsumeTraces,
>   ConsumeMetrics, ConsumeLogs, or ConsumeProfiles before the OTLP exporter
>   initializes its gRPC clients could cause a nil pointer dereference panic.
>   The push methods now return an error instead of panicking.

## 機能・改善 (7)

- `DeprecatedType` エイリアスの生成 (利用条件: 任意の `deprecated_type` メタデータフィールドの設定によるエイリアス生成)
- `cmd/mdatagen` への Go 設定構造体生成機能の追加
- `cmd/mdatagen` での設定用 JSON スキーマ生成
- `cmd/mdatagen` による設定スキーマの別個の YAML ファイルへの生成
- `pdata/xpdata/entity` への `NewEntity` コンストラクターの追加
- `pdata/xpdata/entity` に `Entity.CopyToResource` を追加
- `EntityAttributeMap.All` の `pdata/xpdata/entity` への追加

## 依存関係の更新 (1)

ほか1件（いずれもセキュリティへの言及なし）

- `` - `pkg/pdata`: Upgrade the OTLP protobuf definitions to version 1.10.0 (#14766) ``

## その他の変更 (2)

- cmd/mdatagen による集約可能な属性のないメトリクス向け再集約オプションの省略
- `exporter/otlp_http` のエラーに実際の宛先 URL を表示

---

整理した内容は AI が作成するため誤っている可能性があり、無保証で提供されます。
