Span/log processors and PeriodicMetricReader use static ComponentId, causing all instances to share otel.component.name "<type>/0"

オープン
#9,012 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java

調査の方向性

Read the five processor and reader source files linked in the issue, then inspect how GrpcExporterBuilder and HttpExporterBuilder generate ComponentId values. Check the related tests for component names and add coverage for multiple instances of each affected class. Done means instances receive distinct otel.component.name values such as <type>/0 and <type>/1, with the SDK tests passing.

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

説明

Description

In the following classes, COMPONENT_ID is declared as private static final ComponentId instead of an instance field:

Because COMPONENT_ID is static, ComponentId.generateLazy(...) is only invoked once per class load, so every instance of BatchSpanProcessor, SimpleSpanProcessor, BatchLogRecordProcessor, SimpleLogRecordProcessor, or PeriodicMetricReader in the JVM reports <type>/0 for otel.component.name (unlike GrpcExporterBuilder and HttpExporterBuilder, which call ComponentId.generateLazy(...) per exporter instance).

Expected behavior

Each processor and metric reader instance should generate its own ComponentId (<type>/0, <type>/1, ...) so otel.component.name uniquely identifies each instance.

主要言語
Java
スター
2.5k
フォーク
1k
平均マージ
4日 3時間
マージ済み PR(30日)
52

環境構築

はじめの一歩

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

open-telemetry/opentelemetry-java のほかの issue

open-telemetry/opentelemetry-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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