クラス OpenTelemetryResourceAttributes
java.lang.ObjectSE
org.springframework.boot.actuate.autoconfigure.opentelemetry.OpenTelemetryResourceAttributes
OpenTelemetryResourceAttributes
は、OTEL_RESOURCE_ATTRIBUTES
および OTEL_SERVICE_NAME
環境変数から情報を取得し、それをユーザーが提供するリソース属性とマージします。ユーザーが提供するリソース属性が優先されます。さらに、spring.application.*
関連のプロパティをデフォルトとして適用できます。- 導入:
- 3.5.0
- 作成者:
- Dmytro Nosan
コンストラクターの概要
コンストラクターコンストラクター説明OpenTelemetryResourceAttributes
(Environment environment, MapSE<StringSE, StringSE> resourceAttributes) OpenTelemetryResourceAttributes
の新しいインスタンスを作成します。メソッドのサマリー
修飾子と型メソッド説明void
applyTo
(BiConsumerSE<StringSE, StringSE> consumer) 環境変数とユーザー定義のリソース属性を組み合わせた後、提供されたBiConsumer
SE にリソース属性を適用します。
コンストラクターの詳細
OpenTelemetryResourceAttributes
public OpenTelemetryResourceAttributes(Environment environment, MapSE<StringSE, StringSE> resourceAttributes) OpenTelemetryResourceAttributes
の新しいインスタンスを作成します。- パラメーター:
environment
- 環境resourceAttributes
- user provided resource attributes to be used
メソッドの詳細
applyTo
環境変数とユーザー定義のリソース属性を組み合わせた後、提供されたBiConsumer
SE にリソース属性を適用します。環境変数とユーザー定義リソースの両方にキーが存在する場合、たとえ空であっても、ユーザー定義リソースの値が優先されます。
さらに、
spring.application.name
またはunknown_service
がservice.name
のデフォルトとして使用され、spring.application.group
がservice.group
およびservice.namespace
のデフォルトとして機能します。- パラメーター:
consumer
- 適用するBiConsumer
SE