The English version of quarkus.io is the official project site. Translated sites are community supported on a best-effort basis.
このページを編集

OpenTelemetryの使用

このガイドでは、Quarkus アプリケーションで OpenTelemetry (OTel) を利用して、インタラクティブなWebアプリケーションにオブザーバビリティを提供する方法について説明します。

このページでは、シグナルに依存しないエクステンション機能について説明します。

このドキュメントは、 QuarkusのObservabilityリファレンスガイド の一部です。

はじめに

OpenTelemetry は、トレース、メトリクス、ログなどのテレメトリーデータを作成および管理するために設計されたオブザーバビリティフレームワークおよびツールキットです。ここで重要なのは、OpenTelemetry がベンダーやツールに依存しないことです。

Quarkus は、トレース用の手動および自動計装と、メトリクスの手動計装機能を提供します。

これにより、Quarkus ベースのアプリケーションを OpenTelemetry をサポートするツールやサービスで監視できるようになります。

Quarkus の自動メトリクス計装は、Quarkus Micrometer エクステンション により実行されます。将来的には、これらのメトリクスを OpenTelemetry でも利用できるようにするためのブリッジを提供する予定です。

Quarkus は OpenTelemetry Autoconfiguration をサポートしています。設定は、 OpenTelemetry SDK Autoconfigure に表示される内容に quarkus.* の接頭辞を付けたものと一致します。

このガイドでは、OpenTelemetry エクステンションとその使用方法について、横断的に説明します。特定のシグナル (トレースまたはメトリクス) の詳細が必要な場合は、シグナル固有のガイドを参照してください。

OpenTelemetry メトリクスの導入により、1 ページで構成されていた元のガイドを、次のように信号の種類に応じて分割することが必要になりました。。

OpenTelemetry トレースガイド

トレース機能はサポートされており、デフォルトで on になっています。

OpenTelemetry メトリクスガイド

メトリクスの有効化

メトリクス機能は実験的なものであり、デフォルトで off になっています。これは、次の設定で有効にする必要があります。

quarkus.otel.metrics.enabled=true

ビルド時に application.properties ファイルで実行します。

OpenTelemetry Loggingガイド

ログの有効化

ロギング機能は実験的なものであり、デフォルトで off になっています。これは、次の設定で有効にする必要があります。

quarkus.otel.logs.enabled=true

ビルド時に application.properties ファイルで実行します。

エクステンションの使用

Quarkusプロジェクトがすでに存在する場合、プロジェクトのベースディレクトリーで次のコマンドを実行することで、 quarkus-opentelemetry エクステンションを追加できます。

コマンドラインインタフェース
quarkus extension add opentelemetry
Maven
./mvnw quarkus:add-extension -Dextensions='opentelemetry'
Gradle
./gradlew addExtension --extensions='opentelemetry'

これにより、ビルドファイルに次の内容が追加されます。

pom.xml
<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-opentelemetry</artifactId>
</dependency>
build.gradle
implementation("io.quarkus:quarkus-opentelemetry")

構成の作成

デフォルトでは、エクスポータはgRPCプロトコルとエンドポイント http://localhost:4317 を使用して、バッチでデータを送信します。

デフォルトのプロパティ値を変更する必要がある場合、 src/main/resources/application.properties ファイルを使用して、アプリケーション内でデフォルトの OTLP gRPC Exporter を設定する方法の例を以下に示します:

quarkus.application.name=myservice (1)
quarkus.otel.exporter.otlp.endpoint=http://localhost:4317 (2)
quarkus.otel.exporter.otlp.headers=authorization=Bearer my_secret (3)
quarkus.log.console.format=%d{HH:mm:ss} %-5p traceId=%X{traceId}, parentId=%X{parentId}, spanId=%X{spanId}, sampled=%X{sampled} [%c{2.}] (%t) %s%e%n  (4)

# Alternative to the console log
quarkus.http.access-log.pattern="...traceId=%{X,traceId} spanId=%{X,spanId}" (5)
1 アプリケーションから作成されたすべてのテレメトリには、 myservice アプリケーションによって作成されたことを示す OpenTelemetry Resource 属性が含まれます。 設定されていない場合、デフォルトでアーティファクト ID が設定されます。
2 テレメトリを送信する gRPC エンドポイント。設定されていない場合、デフォルトは http://localhost:4317 .
3 認証によく使われるオプションのgRPCヘッダー
4 ログメッセージにトレース情報を追加する。
5 また、アクセスログにのみトレース情報を記載することもできます。この場合、コンソールログ形式の情報を省略する必要があります。

接続関連のプロパティには、シグナルに依存しない設定を提供しています。つまり、設定時にトレースとメトリクスの両方に同じプロパティを使用できます:

quarkus.otel.exporter.otlp.endpoint=http://localhost:4317

シグナルごとに異なる設定が必要な場合は、特定のプロパティを使用できます:

quarkus.otel.exporter.otlp.traces.endpoint=http://trace-uri:4317 (1)
quarkus.otel.exporter.otlp.metrics.endpoint=http://metrics-uri:4317 (2)
quarkus.otel.exporter.otlp.logs.endpoint=http://logs-uri:4317 (3)
1 トレースエクスポーターのエンドポイント。
2 メトリクスエクスポーターのエンドポイント。
3 ログエクスポーターのエンドポイント。

スパンやログを終了時に直接エクスポートする必要がある場合(サーバーレス環境/アプリケーションなど)、このプロパティを true に設定できます。 これは、データのデフォルトのバッチ処理を置き換えます。

quarkus.otel.simple=true

OpenTelemetry エクステンション全体または一部を無効にする

依存関係を追加すると、デフォルトでエクステンションはトレースデータを生成します。メトリクスを有効にする、もしくは OpenTelemetry エクステンションをグローバルまたは部分的に無効化するには、次のプロパティーを使用します (以下の設定リファレンスから展開されています)。

影響を受けるシグナル プロパティー名 デフォルト値 説明

すべて

quarkus.otel.enabled

true

false の場合、ビルド 時に OpenTelemetry の使用を無効にします。

すべて

quarkus.otel.sdk.disabled

false

OpenTelemetry autoconfiguration から取得されます。true の場合、実行時 に OpenTelemetry SDK の使用が無効化されます。

すべての出力

quarkus.otel.exporter.otlp.enabled

true

削除のため非推奨となっています。

false の場合、ビルド 時にデフォルトの OTLP エクスポーターが無効になります。

トレース

quarkus.otel.traces.enabled

true

false の場合、ビルド 時に OpenTelemetry トレースの使用を無効にします。

トレース出力

quarkus.otel.traces.exporter

cdi

トレースに使用するエクスポーターの、コンマ区切りリスト。ExporterTypeotlpcdinone のいずれかの値が指定されています。これは ビルド 時のプロパティーであり、 none に設定するとトレースデータの出力が無効になります。

メトリクス

quarkus.otel.metrics.enabled

false

メトリクスは実験的なものであるため、ビルド 時にデフォルトで無効になっています。

メトリクス出力

quarkus.otel.metrics.exporter

cdi

メトリクスに使用するエクスポーターの、コンマ区切りリスト。ExporterTypeotlpcdinone のいずれかの値が指定されています。これは ビルド 時のプロパティーであり、 none に設定するとメトリクスデータの出力が無効になります。

ログ

quarkus.otel.logs.enabled

false

ログは実験的なものなので、 ビルド 時にはデフォルトで無効になっています。

ログ出力

quarkus.otel.logs.exporter

cdi

カンマ区切りでログに使用するエキスポーターのリスト。 ExporterType のいずれかの値を持ちます: otlp , cdi , none . これは ビルド 時のプロパティで、 none に設定するとログデータの出力が無効になります。

ログ出力

quarkus.otel.logs.handler.enabled

true

false の場合、 実行 時に OpenTelemetry ログハンドラを無効にします。これにより、Quarkus ログシステム (JBoss LogManager) と OpenTelemetry ログ間のブリッジが削除されます。

実行時にエクスポーターを有効または無効にする必要がある場合は、必要に応じてすべてのスパンをフィルタリングできる sampler を使用します。

特定の計装コンポーネントは、トレースで無効にすることができます。たとえば、クライアントリクエストを無視し、サーバーリクエストを保持することができます。詳細は、OpenTelemetry トレースガイド を参照してください。

リソース

リソース は、テレメトリを生成しているエンティティーの表現です。 エクスポートされたトレースまたはメトリクスに属性を追加し、何がテレメトリを生成しているかを示します。Quarkus は、Java OpenTelemetry SDK で指定された リソースの自動設定 に従います。

デフォルト

次の属性はデフォルトでリソースに追加されます。

Attribute name コンテンツ例 起源

service.name

"opentelemetry-quickstart"

値は、artifactId、 quarkus.application.name プロパティー、または quarkus.otel.resource.attributes=service.name=cart プロパティーから取得されます。

host.name

"myHost"

起動時に解決

service.version

"1.0-SNAPSHOT"

ビルド時にアーティファクトバージョンから解決

telemetry.sdk.language

"java"

静的値

telemetry.sdk.name

"opentelemetry"

ビルド時に解決

telemetry.sdk.version

"1.32.0"

ビルド時に解決

webengine.name

"Quarkus"

静的値

webengine.version

"999-SNAPSHOT"

Quarkus のバージョンはビルド時に解決されます

設定の使用

OpenTelemetry 設定リファレンス に記載されている quarkus.otel.resource.attributes config プロパティーを設定することで、さらに属性を追加できます。 このプロパティーは実行時にオーバーライドできるため、OpenTelemetry エクステンションは、 Quarkus Configuration Reference に記載されている優先順位に従ってその値をピックアップします。

quarkus.otel.resource.attributes=deployment.environment=dev,service.name=cart,service.namespace=shopping

これにより、 deployment.environmentservice.nameservice.namespace の属性がリソースに追加され、トレースとメトリクスに含まれます。

CDI Bean の使用

カスタムリソースや、いずれかの OpenTelemetry SDK Extensions で提供されているカスタムリソースを使用する必要がある場合は、 複数のリソースプロデューサーを作成できます。OpenTelemetry エクステンションは Resource CDI Bean を検出し、OTel SDK 設定時にそれらをマージします。

@ApplicationScoped
public class CustomConfiguration {

    @Produces
    @ApplicationScoped
    public Resource osResource() {
        return OsResource.get();
    }

    @Produces
    @ApplicationScoped
    public Resource ecsResource() {
        return EcsResource.get();
    }
}

セマンティック規約

OpenTelemetry は、計装によって収集されたデータを標準化するための セマンティック規約 のセットを提供します。

手動計装を作成する場合、これらの規則に従ってメトリクスまたは属性の名前を決定し、既存の規則を表す新しい名前は使用しないでください。これにより、サービス間でデータの相関関係を簡単に実行できるようになります。

エクスポーター

デフォルト

Quarkus OpenTelemetry エクステンションは、Vert.x 上にビルドされた独自のシグナルエクスポーターを使用して、最適なパフォーマンスと保守性を実現します。

エクスポーターは自動的に CDI と接続されるため、 quarkus.otel.traces.exporter および quarkus.otel.metrics.exporter プロパティーはデフォルトで cdi になります。

quarkus.otel.exporter.otlp.protocol のデフォルトは grpc ですが、 http/protobuf も使用できます。

プロトコルを変更する場合は、エンドポイントのポートも変更する必要があります。 grpc のデフォルトポートは 4317 で、 http/protobuf のデフォルトポートは 4318 です。

Quarkiverse について

Quarkiverse quarkus-opentelemetry-exporter プロジェクトで、追加のエクスポーターを使用できるようになる予定です。

現在、次のエクスポーターが利用可能です (古い可能性があります)。

  • Legacy Jaeger

  • Microsoft Azure

  • Google Cloud

Logging エクスポーター (デバッグ用)

デバッグ/開発目的で、すべてのメトリクスをコンソールに出力できます。

実稼働環境では使用しないでください。

プロジェクトに次の依存関係を追加する必要があります。

pom.xml
<dependency>
    <groupId>io.opentelemetry</groupId>
    <artifactId>opentelemetry-exporter-logging</artifactId>
</dependency>
build.gradle
implementation("io.opentelemetry:opentelemetry-exporter-logging")

次に、 application.properties ファイルでエクスポーターを logging に設定します。

quarkus.otel.metrics.exporter=logging (1)
quarkus.otel.metric.export.interval=10000ms (2)
quarkus.otel.traces.exporter=logging (3)
1 メトリクスエクスポーターを logging に設定します。通常、これを設定する必要はありません。デフォルトは cdi です。
2 メトリクスのエクスポート間隔を設定します。デフォルトは 1m ですが、デバッグには長すぎます。
3 トレースエクスポーターを logging に設定します。通常、これを設定する必要はありません。デフォルトは cdi です。

データの可視化

Grafana-OTel-LGTM の使用 が推奨されます。

これは、"オールインワン" の Grafana OTel LGTM を使用して Quarkus Dev サービスを提供します。

Grafana はデータの可視化、Loki はログの保存、Tempo はトレースの保存、Prometheus はメトリクスの保存に使用されます。データを受信するための OTel コレクターも提供されます。

これにより、アプリケーションが生成したすべての OpenTelemetry データを簡単に可視化できます。

ロギングエクスポーター を使用して、すべてのトレースとメトリクスをコンソールに出力することもできます。

OpenTelemetry 設定リファレンス

Quarkus は、OpenTelemetry の Autoconfiguration for Traces をサポートしています。設定は、 OpenTelemetry SDK Autoconfigure で確認できるものと一致し、通常の接頭辞である quarkus.* が追加されます。

Quarkus OpenTelemetry の設定プロパティには、接頭辞として quarkus.otel.* が追加されるようになりました。

ビルド時に固定された設定プロパティー。その他の設定プロパティーは、すべて実行時にオーバーライド可能です。

Configuration property

デフォルト

If false, disable the OpenTelemetry usage at build time. All other Otel properties will be ignored at runtime.

Will pick up value from legacy property quarkus.opentelemetry.enabled

Defaults to true.

Environment variable: QUARKUS_OTEL_ENABLED

Show more

boolean

true

Should we use simple processor for spans and log records. This will disable batch processing and the exporter will send telemetry data right away. This is recommended for serverless applications.

Defaults to false.

Environment variable: QUARKUS_OTEL_SIMPLE

Show more

boolean

false

List of exporters supported by Quarkus.

List of exporters to be used for tracing, separated by commas. Has one of the values on ExporterType otlp, cdi, none or the full qualified name of a class implementing io.opentelemetry.sdk.trace.export.SpanExporter

Default on Quarkus is ExporterType.Constants#CDI_VALUE.

Environment variable: QUARKUS_OTEL_TRACES_EXPORTER

Show more

list of string

cdi

The sampler to use for tracing.

Has one of the values on SamplerType always_on, always_off, traceidratio, parentbased_always_on, parentbased_always_off, parentbased_traceidratio or the Sampler SPI name. This will use the OTel SPI hooks for the io.opentelemetry.sdk.trace.samplers.Sampler implementation set in the provider: io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSamplerProvider.

Fallbacks to the legacy property quarkus.opentelemetry.tracer.sampler.sampler.name or defaults to SamplerType.Constants#PARENT_BASED_ALWAYS_ON.

Environment variable: QUARKUS_OTEL_TRACES_SAMPLER

Show more

string

parentbased_always_on

If OpenTelemetry End User attributes should be added as Span attributes on a best-efforts basis.

Environment variable: QUARKUS_OTEL_TRACES_EUSP_ENABLED

Show more

boolean

false

Enable metrics with OpenTelemetry.

This property is not available in the Open Telemetry SDK. It’s Quarkus specific.

Support for metrics will be enabled if OpenTelemetry support is enabled and either this value is true, or this value is unset.

Environment variable: QUARKUS_OTEL_METRICS_ENABLED

Show more

boolean

false

The Metrics exporter to use.

Environment variable: QUARKUS_OTEL_METRICS_EXPORTER

Show more

list of string

cdi

Enable logs with OpenTelemetry.

This property is not available in the Open Telemetry SDK. It’s Quarkus specific.

Support for logs will be enabled if OpenTelemetry support is enabled and either this value is true, or this value is unset.

Environment variable: QUARKUS_OTEL_LOGS_ENABLED

Show more

boolean

false

The Logs exporter to use.

Environment variable: QUARKUS_OTEL_LOGS_EXPORTER

Show more

list of string

cdi

The propagators to be used. Use a comma-separated list for multiple propagators.

Has values from PropagatorType or the full qualified name of a class implementing io.opentelemetry.context.propagation.TextMapPropagator.

Default is PropagatorType.Constants#TRACE_CONTEXT,PropagatorType.Constants#BAGGAGE (W3C).

Environment variable: QUARKUS_OTEL_PROPAGATORS

Show more

list of string

tracecontext,baggage

Enables instrumentation for gRPC.

Environment variable: QUARKUS_OTEL_INSTRUMENT_GRPC

Show more

boolean

true

Enables instrumentation for Messaging.

Environment variable: QUARKUS_OTEL_INSTRUMENT_MESSAGING

Show more

boolean

true

Enables instrumentation for REST Client backed by RESTEasy Classic.

Environment variable: QUARKUS_OTEL_INSTRUMENT_RESTEASY_CLIENT

Show more

boolean

true

Enables instrumentation for Quarkus REST.

Environment variable: QUARKUS_OTEL_INSTRUMENT_REST

Show more

boolean

true

Enables instrumentation for RESTEasy Classic.

Environment variable: QUARKUS_OTEL_INSTRUMENT_RESTEASY

Show more

boolean

true

Whether exporting of the security events is enabled.

Environment variable: QUARKUS_OTEL_SECURITY_EVENTS_ENABLED

Show more

boolean

false

Selects security event types.

Environment variable: QUARKUS_OTEL_SECURITY_EVENTS_EVENT_TYPES

Show more

list of all, authentication-success, authentication-failure, authorization-success, authorization-failure, other

all

If true, disable the OpenTelemetry SDK. Runtime configuration.

Defaults to false.

Environment variable: QUARKUS_OTEL_SDK_DISABLED

Show more

boolean

false

Suppress non-application uris from trace collection. This will suppress tracing of /q endpoints.

Providing a custom io.opentelemetry.sdk.trace.samplers.Sampler CDI Bean will ignore this setting.

This is a Quarkus specific property. Suppressing non-application uris is enabled by default.

Fallbacks to the legacy property quarkus.opentelemetry.tracer.suppress-non-application-uris or defaults to true.

Environment variable: QUARKUS_OTEL_TRACES_SUPPRESS_NON_APPLICATION_URIS

Show more

boolean

true

Comma-separated, suppress application uris from trace collection.

This will suppress all uris set by this property.

If you are using quarkus.http.root-path, you need to consider it when setting your uris, in other words, you need to configure it using the root-path if necessary.

Environment variable: QUARKUS_OTEL_TRACES_SUPPRESS_APPLICATION_URIS

Show more

list of string

Include static resources from trace collection.

This is a Quarkus specific property. Include static resources is disabled by default. Providing a custom io.opentelemetry.sdk.trace.samplers.Sampler CDI Bean will ignore this setting.

Fallbacks to the legacy property quarkus.opentelemetry.tracer.include-static-resources or defaults to false.

Environment variable: QUARKUS_OTEL_TRACES_INCLUDE_STATIC_RESOURCES

Show more

boolean

false

Sampler argument. Depends on the quarkus.otel.traces.sampler property. Fallbacks to the legacy property quarkus.opentelemetry.tracer.sampler.ratio.

When setting the stock sampler to traceidratio or parentbased_traceidratio you need to set a double compatible value between 0.0d and 1.0d, like 0.01d or 0.5d. It is kept as a String to allow the flexible customisation of alternative samplers.

Defaults to 1.0d.

Environment variable: QUARKUS_OTEL_TRACES_SAMPLER_ARG

Show more

string

1.0d

The interval, between the start of two metric export attempts.

Default is 1min.

Environment variable: QUARKUS_OTEL_METRIC_EXPORT_INTERVAL

Show more

Duration 

60S

Determine whether to enable the OpenTelemetry logging handler.

This is a Quarkus specific property. The OpenTelemetry logging handler is enabled by default.

Environment variable: QUARKUS_OTEL_LOGS_HANDLER_ENABLED

Show more

boolean

true

The maximum length of attribute values. Applies to spans and logs.

By default, there is no limit.

Environment variable: QUARKUS_OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT

Show more

string

The maximum number of attributes. Applies to spans, span events, span links, and logs.

Default is 128.

Environment variable: QUARKUS_OTEL_ATTRIBUTE_COUNT_LIMIT

Show more

int

128

The maximum length of span attribute values. Takes precedence over otel.attribute.value.length.limit.

By default, there is no limit.

Environment variable: QUARKUS_OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT

Show more

int

The maximum number of attributes per span. Takes precedence over otel.attribute.count.limit.

Default is 128.

Environment variable: QUARKUS_OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT

Show more

int

128

The maximum number of events per span.

Default is 128.

Environment variable: QUARKUS_OTEL_SPAN_EVENT_COUNT_LIMIT

Show more

int

128

The maximum number of links per span.

Default is 128.

Environment variable: QUARKUS_OTEL_SPAN_LINK_COUNT_LIMIT

Show more

int

128

The Batch Span Processor interval Duration between two consecutive exports.

Default is 5s.

Environment variable: QUARKUS_OTEL_BSP_SCHEDULE_DELAY

Show more

Duration 

5S

The Batch Span Processor maximum queue size.

Default is 2048.

Environment variable: QUARKUS_OTEL_BSP_MAX_QUEUE_SIZE

Show more

int

2048

The Batch Span Processor maximum batch size.

Default is 512.

Environment variable: QUARKUS_OTEL_BSP_MAX_EXPORT_BATCH_SIZE

Show more

int

512

The Batch Span Processor maximum allowed time Duration to export data.

Default is 30s.

Environment variable: QUARKUS_OTEL_BSP_EXPORT_TIMEOUT

Show more

Duration 

30S

The Batch Log Record Processor interval Duration between two consecutive exports.

Default is 1S.

Environment variable: QUARKUS_OTEL_BLRP_SCHEDULE_DELAY

Show more

Duration 

1S

The Batch Log Record Processor maximum queue size.

Default is 2048.

Environment variable: QUARKUS_OTEL_BLRP_MAX_QUEUE_SIZE

Show more

int

2048

The Batch Log Record Processor maximum batch size.

Default is 512.

Environment variable: QUARKUS_OTEL_BLRP_MAX_EXPORT_BATCH_SIZE

Show more

int

512

The Batch Log Record Processor maximum allowed time Duration to export data.

Default is 30s.

Environment variable: QUARKUS_OTEL_BLRP_EXPORT_TIMEOUT

Show more

Duration 

30S

Specify resource attributes in the following format: key1=val1,key2=val2,key3=val3.

Environment variable: QUARKUS_OTEL_RESOURCE_ATTRIBUTES

Show more

list of string

Specify logical service name. Takes precedence over service.name defined with otel.resource.attributes and from quarkus.application.name.

Defaults to quarkus.application.name.

Environment variable: QUARKUS_OTEL_SERVICE_NAME

Show more

string

${quarkus.application.name:unset}

Specify resource attribute keys that are filtered.

Environment variable: QUARKUS_OTEL_EXPERIMENTAL_RESOURCE_DISABLED_KEYS

Show more

list of string

The maximum amount of time Quarkus will wait for the OpenTelemetry SDK to flush unsent spans and shutdown.

Environment variable: QUARKUS_OTEL_EXPERIMENTAL_SHUTDOWN_WAIT_TIME

Show more

Duration 

2S

Enables instrumentation for Vert.x HTTP.

Environment variable: QUARKUS_OTEL_INSTRUMENT_VERTX_HTTP

Show more

boolean

true

Enables instrumentation for Vert.x Event Bus.

Environment variable: QUARKUS_OTEL_INSTRUMENT_VERTX_EVENT_BUS

Show more

boolean

true

Enables instrumentation for Vert.x SQL Client.

Environment variable: QUARKUS_OTEL_INSTRUMENT_VERTX_SQL_CLIENT

Show more

boolean

true

Enables instrumentation for Vert.x Redis Client.

Environment variable: QUARKUS_OTEL_INSTRUMENT_VERTX_REDIS_CLIENT

Show more

boolean

true

Enables instrumentation for JVM Metrics.

Environment variable: QUARKUS_OTEL_INSTRUMENT_JVM_METRICS

Show more

boolean

true

Enables instrumentation for HTTP Server Metrics.

Environment variable: QUARKUS_OTEL_INSTRUMENT_HTTP_SERVER_METRICS

Show more

boolean

true

Prioritize OpenTelemetry configuration otel. on top of Quarkus OpenTelemetry configuration quarkus.otel.

By default, Quarkus configuration has priority over OpenTelemetry configuration.

Environment variable: QUARKUS_OTEL_MP_COMPATIBILITY

Show more

boolean

false

Sets the OTLP endpoint to send telemetry data. If unset, defaults to OtlpExporterRuntimeConfig#DEFAULT_GRPC_BASE_URI.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..endpoint where is one of the supported signal types, like traces or metrics.

If protocol is http/protobuf the version and signal will be appended to the path (e.g. v1/traces or v1/metrics) and the default port will be OtlpExporterRuntimeConfig#DEFAULT_HTTP_BASE_URI.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_ENDPOINT

Show more

string

http://localhost:4317/

Key-value pairs to be used as headers associated with exporter requests. The format is similar to the OTEL_EXPORTER_OTLP_HEADERS environment variable, a list of key-value pairs separated by the "=" character. i.e.: key1=value1,key2=value2

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..headers where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_HEADERS

Show more

list of string

Sets the method used to compress payloads. If unset, compression is disabled. Currently supported compression methods include gzip and none.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..compression where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_COMPRESSION

Show more

gzip, none

Sets the maximum time to wait for the collector to process an exported batch of telemetry data. If unset, defaults to `OtlpExporterRuntimeConfig#DEFAULT_TIMEOUT_SECS`s.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..timeout where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TIMEOUT

Show more

Duration 

10s

OTLP defines the encoding of telemetry data and the protocol used to exchange data between the client and the server. Depending on the exporter, the available protocols will be different.

Currently, only grpc and http/protobuf are allowed.

Please mind that changing the protocol requires changing the port in the endpoint as well.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..protocol where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_PROTOCOL

Show more

string

grpc

Comma-separated list of the path to the key files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_KEY_CERT_KEYS

Show more

list of string

Comma-separated list of the path to the certificate files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_KEY_CERT_CERTS

Show more

list of string

Comma-separated list of the trust certificate files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRUST_CERT_CERTS

Show more

list of string

The name of the TLS configuration to use.

If not set and the default TLS configuration is configured (quarkus.tls.*) then that will be used. If a name is configured, it uses the configuration from quarkus.tls.<name>.* If a name is configured, but no TLS configuration is found with that name then an error will be thrown.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..tls-configuration-name where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TLS_CONFIGURATION_NAME

Show more

string

If proxy connection must be used.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.enabled where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_PROXY_OPTIONS_ENABLED

Show more

boolean

false

Set proxy username.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.username where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_PROXY_OPTIONS_USERNAME

Show more

string

Set proxy password.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.password where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_PROXY_OPTIONS_PASSWORD

Show more

string

Set proxy port.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.port where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_PROXY_OPTIONS_PORT

Show more

int

Set proxy host.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.host where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_PROXY_OPTIONS_HOST

Show more

string

Sets the OTLP endpoint to send telemetry data. If unset, defaults to OtlpExporterRuntimeConfig#DEFAULT_GRPC_BASE_URI.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..endpoint where is one of the supported signal types, like traces or metrics.

If protocol is http/protobuf the version and signal will be appended to the path (e.g. v1/traces or v1/metrics) and the default port will be OtlpExporterRuntimeConfig#DEFAULT_HTTP_BASE_URI.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT

Show more

string

http://localhost:4317/

Key-value pairs to be used as headers associated with exporter requests. The format is similar to the OTEL_EXPORTER_OTLP_HEADERS environment variable, a list of key-value pairs separated by the "=" character. i.e.: key1=value1,key2=value2

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..headers where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_HEADERS

Show more

list of string

Sets the method used to compress payloads. If unset, compression is disabled. Currently supported compression methods include gzip and none.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..compression where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_COMPRESSION

Show more

gzip, none

Sets the maximum time to wait for the collector to process an exported batch of telemetry data. If unset, defaults to `OtlpExporterRuntimeConfig#DEFAULT_TIMEOUT_SECS`s.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..timeout where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_TIMEOUT

Show more

Duration 

10s

OTLP defines the encoding of telemetry data and the protocol used to exchange data between the client and the server. Depending on the exporter, the available protocols will be different.

Currently, only grpc and http/protobuf are allowed.

Please mind that changing the protocol requires changing the port in the endpoint as well.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..protocol where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_PROTOCOL

Show more

string

grpc

Comma-separated list of the path to the key files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_KEY_CERT_KEYS

Show more

list of string

Comma-separated list of the path to the certificate files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_KEY_CERT_CERTS

Show more

list of string

Comma-separated list of the trust certificate files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_TRUST_CERT_CERTS

Show more

list of string

The name of the TLS configuration to use.

If not set and the default TLS configuration is configured (quarkus.tls.*) then that will be used. If a name is configured, it uses the configuration from quarkus.tls.<name>.* If a name is configured, but no TLS configuration is found with that name then an error will be thrown.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..tls-configuration-name where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_TLS_CONFIGURATION_NAME

Show more

string

If proxy connection must be used.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.enabled where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_PROXY_OPTIONS_ENABLED

Show more

boolean

false

Set proxy username.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.username where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_PROXY_OPTIONS_USERNAME

Show more

string

Set proxy password.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.password where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_PROXY_OPTIONS_PASSWORD

Show more

string

Set proxy port.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.port where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_PROXY_OPTIONS_PORT

Show more

int

Set proxy host.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.host where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_TRACES_PROXY_OPTIONS_HOST

Show more

string

Sets the OTLP endpoint to send telemetry data. If unset, defaults to OtlpExporterRuntimeConfig#DEFAULT_GRPC_BASE_URI.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..endpoint where is one of the supported signal types, like traces or metrics.

If protocol is http/protobuf the version and signal will be appended to the path (e.g. v1/traces or v1/metrics) and the default port will be OtlpExporterRuntimeConfig#DEFAULT_HTTP_BASE_URI.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT

Show more

string

http://localhost:4317/

Key-value pairs to be used as headers associated with exporter requests. The format is similar to the OTEL_EXPORTER_OTLP_HEADERS environment variable, a list of key-value pairs separated by the "=" character. i.e.: key1=value1,key2=value2

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..headers where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_HEADERS

Show more

list of string

Sets the method used to compress payloads. If unset, compression is disabled. Currently supported compression methods include gzip and none.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..compression where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_COMPRESSION

Show more

gzip, none

Sets the maximum time to wait for the collector to process an exported batch of telemetry data. If unset, defaults to `OtlpExporterRuntimeConfig#DEFAULT_TIMEOUT_SECS`s.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..timeout where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_TIMEOUT

Show more

Duration 

10s

OTLP defines the encoding of telemetry data and the protocol used to exchange data between the client and the server. Depending on the exporter, the available protocols will be different.

Currently, only grpc and http/protobuf are allowed.

Please mind that changing the protocol requires changing the port in the endpoint as well.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..protocol where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_PROTOCOL

Show more

string

grpc

Comma-separated list of the path to the key files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_KEY_CERT_KEYS

Show more

list of string

Comma-separated list of the path to the certificate files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_KEY_CERT_CERTS

Show more

list of string

Comma-separated list of the trust certificate files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_TRUST_CERT_CERTS

Show more

list of string

The name of the TLS configuration to use.

If not set and the default TLS configuration is configured (quarkus.tls.*) then that will be used. If a name is configured, it uses the configuration from quarkus.tls.<name>.* If a name is configured, but no TLS configuration is found with that name then an error will be thrown.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..tls-configuration-name where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_TLS_CONFIGURATION_NAME

Show more

string

If proxy connection must be used.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.enabled where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_PROXY_OPTIONS_ENABLED

Show more

boolean

false

Set proxy username.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.username where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_PROXY_OPTIONS_USERNAME

Show more

string

Set proxy password.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.password where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_PROXY_OPTIONS_PASSWORD

Show more

string

Set proxy port.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.port where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_PROXY_OPTIONS_PORT

Show more

int

Set proxy host.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.host where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_PROXY_OPTIONS_HOST

Show more

string

The preferred output aggregation temporality. Options include DELTA, LOWMEMORY, and CUMULATIVE.

If CUMULATIVE, all instruments will have cumulative temporality. If DELTA, counter (sync and async) and histograms will be delta, up down counters (sync and async) will be cumulative. If LOWMEMORY, sync counter and histograms will be delta, async counter and up down counters (sync and async) will be cumulative.

Default is CUMULATIVE.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE

Show more

string

cumulative

The preferred default histogram aggregation.

Options include BASE2_EXPONENTIAL_BUCKET_HISTOGRAM and EXPLICIT_BUCKET_HISTOGRAM.

Default is EXPLICIT_BUCKET_HISTOGRAM.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION

Show more

string

explicit_bucket_histogram

Sets the OTLP endpoint to send telemetry data. If unset, defaults to OtlpExporterRuntimeConfig#DEFAULT_GRPC_BASE_URI.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..endpoint where is one of the supported signal types, like traces or metrics.

If protocol is http/protobuf the version and signal will be appended to the path (e.g. v1/traces or v1/metrics) and the default port will be OtlpExporterRuntimeConfig#DEFAULT_HTTP_BASE_URI.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_ENDPOINT

Show more

string

http://localhost:4317/

Key-value pairs to be used as headers associated with exporter requests. The format is similar to the OTEL_EXPORTER_OTLP_HEADERS environment variable, a list of key-value pairs separated by the "=" character. i.e.: key1=value1,key2=value2

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..headers where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_HEADERS

Show more

list of string

Sets the method used to compress payloads. If unset, compression is disabled. Currently supported compression methods include gzip and none.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..compression where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_COMPRESSION

Show more

gzip, none

Sets the maximum time to wait for the collector to process an exported batch of telemetry data. If unset, defaults to `OtlpExporterRuntimeConfig#DEFAULT_TIMEOUT_SECS`s.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..timeout where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_TIMEOUT

Show more

Duration 

10s

OTLP defines the encoding of telemetry data and the protocol used to exchange data between the client and the server. Depending on the exporter, the available protocols will be different.

Currently, only grpc and http/protobuf are allowed.

Please mind that changing the protocol requires changing the port in the endpoint as well.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..protocol where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_PROTOCOL

Show more

string

grpc

Comma-separated list of the path to the key files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_KEY_CERT_KEYS

Show more

list of string

Comma-separated list of the path to the certificate files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_KEY_CERT_CERTS

Show more

list of string

Comma-separated list of the trust certificate files (Pem format).

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_TRUST_CERT_CERTS

Show more

list of string

The name of the TLS configuration to use.

If not set and the default TLS configuration is configured (quarkus.tls.*) then that will be used. If a name is configured, it uses the configuration from quarkus.tls.<name>.* If a name is configured, but no TLS configuration is found with that name then an error will be thrown.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..tls-configuration-name where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_TLS_CONFIGURATION_NAME

Show more

string

If proxy connection must be used.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.enabled where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_PROXY_OPTIONS_ENABLED

Show more

boolean

false

Set proxy username.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.username where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_PROXY_OPTIONS_USERNAME

Show more

string

Set proxy password.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.password where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_PROXY_OPTIONS_PASSWORD

Show more

string

Set proxy port.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.port where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_PROXY_OPTIONS_PORT

Show more

int

Set proxy host.

There is a generic property, that will apply to all signals and a signal specific one, following the pattern: quarkus.otel.exporter.otlp..proxy-options.host where is one of the supported signal types, like traces or metrics.

Environment variable: QUARKUS_OTEL_EXPORTER_OTLP_LOGS_PROXY_OPTIONS_HOST

Show more

string

期間フォーマットについて

期間の値を書くには、標準の java.time.Duration フォーマットを使います。 詳細は Duration#parse() Java API documentation を参照してください。

数字で始まる簡略化した書式を使うこともできます:

  • 数値のみの場合は、秒単位の時間を表します。

  • 数値の後に ms が続く場合は、ミリ秒単位の時間を表します。

その他の場合は、簡略化されたフォーマットが解析のために java.time.Duration フォーマットに変換されます:

  • 数値の後に hms が続く場合は、その前に PT が付けられます。

  • 数値の後に d が続く場合は、その前に P が付けられます。

関連コンテンツ