feat(telemetry): respect OTEL_EXPORTER_OTLP_PROTOCOL — support HTTP/protobuf exporter

オープン 初心者向け
#1,210 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
66/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
observability

調査の方向性

gRPC エクスポーターは opentelemetry.exporter.otlp.proto.grpc から無条件にインポートされています(OTLPSpanExporter と OTLPMetricExporter)。まず mellea のテレメトリ設定がそれらをどこでインポートしているかを見つけてください。エンドポイントと環境変数をどのように読み取っているかを確認し、OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf の分岐を追加して、opentelemetry.exporter.otlp.proto.http のエクスポーターを使うようにしてください。この設定で HTTP エクスポーターが選択され、デフォルトと grpc がこれまでどおり動作し、テストまたは手動実行で HTTP のパスが確認できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

area/telemetry enhancement p2

Mellea unconditionally imports `OTLPSpanExporter` and `OTLPMetricExporter` from `opentelemetry.exporter.otlp.proto.grpc`, hardcoding the gRPC transport for all signals. The standard `OTEL_EXPORTER_OTLP_PROTOCOL` environment variable is ignored.

The OTel SDK specification requires that `OTEL_EXPORTER_OTLP_PROTOCOL` be honoured. Most production collector stacks support both gRPC (port 4317) and HTTP/protobuf (port 4318), so this is not a critical gap for most deployments. However:

  • Users who prefer or require HTTP/protobuf (e.g. environments where gRPC is blocked, or sidecar collectors configured for HTTP only) cannot switch without patching mellea.
  • The hardcoded gRPC path means the transport cannot be overridden via the standard env var, diverging from the behaviour users expect from any other OTel-instrumented service.

Expected behaviour

When `OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf` is set, mellea should use `opentelemetry.exporter.otlp.proto.http` exporters targeting port 4318. When unset or `grpc`, current behaviour is correct.

HTTP/protobuf on port 4318 is confirmed to work with standard OTLP receivers; the exporter package is already a transitive dependency of the OTel Python SDK.

主要言語
Python
スター
1.8k
フォーク
161
平均マージ
4日 3時間
マージ済み PR(30日)
45

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

generative-computing/mellea のほかの issue

generative-computing/mellea の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。