diff --git a/_generated-doc/main/config/quarkus-all-config.adoc b/_generated-doc/main/config/quarkus-all-config.adoc index 73b0326b2d..38289b774f 100644 --- a/_generated-doc/main/config/quarkus-all-config.adoc +++ b/_generated-doc/main/config/quarkus-all-config.adoc @@ -60859,6 +60859,40 @@ endif::add-copy-button-to-env-var[] |boolean |`true` +a| [[quarkus-opentelemetry_quarkus-otel-instrument-jvm-metrics]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-instrument-jvm-metrics[`quarkus.otel.instrument.jvm-metrics`]## + +[.description] +-- +Enables instrumentation for JVM Metrics. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_OTEL_INSTRUMENT_JVM_METRICS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_OTEL_INSTRUMENT_JVM_METRICS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +|`true` + +a| [[quarkus-opentelemetry_quarkus-otel-instrument-http-server-metrics]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-instrument-http-server-metrics[`quarkus.otel.instrument.http-server-metrics`]## + +[.description] +-- +Enables instrumentation for HTTP Server Metrics. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_OTEL_INSTRUMENT_HTTP_SERVER_METRICS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_OTEL_INSTRUMENT_HTTP_SERVER_METRICS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +|`true` + a| [[quarkus-opentelemetry_quarkus-otel-mp-compatibility]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-mp-compatibility[`quarkus.otel.mp.compatibility`]## [.description] diff --git a/_generated-doc/main/config/quarkus-opentelemetry.adoc b/_generated-doc/main/config/quarkus-opentelemetry.adoc index fb143bc7fb..7e32583f9d 100644 --- a/_generated-doc/main/config/quarkus-opentelemetry.adoc +++ b/_generated-doc/main/config/quarkus-opentelemetry.adoc @@ -829,6 +829,40 @@ endif::add-copy-button-to-env-var[] |boolean |`true` +a| [[quarkus-opentelemetry_quarkus-otel-instrument-jvm-metrics]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-instrument-jvm-metrics[`quarkus.otel.instrument.jvm-metrics`]## + +[.description] +-- +Enables instrumentation for JVM Metrics. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_OTEL_INSTRUMENT_JVM_METRICS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_OTEL_INSTRUMENT_JVM_METRICS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +|`true` + +a| [[quarkus-opentelemetry_quarkus-otel-instrument-http-server-metrics]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-instrument-http-server-metrics[`quarkus.otel.instrument.http-server-metrics`]## + +[.description] +-- +Enables instrumentation for HTTP Server Metrics. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_OTEL_INSTRUMENT_HTTP_SERVER_METRICS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_OTEL_INSTRUMENT_HTTP_SERVER_METRICS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +|`true` + a| [[quarkus-opentelemetry_quarkus-otel-mp-compatibility]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-mp-compatibility[`quarkus.otel.mp.compatibility`]## [.description] diff --git a/_generated-doc/main/config/quarkus-opentelemetry_quarkus.otel.adoc b/_generated-doc/main/config/quarkus-opentelemetry_quarkus.otel.adoc index fb143bc7fb..7e32583f9d 100644 --- a/_generated-doc/main/config/quarkus-opentelemetry_quarkus.otel.adoc +++ b/_generated-doc/main/config/quarkus-opentelemetry_quarkus.otel.adoc @@ -829,6 +829,40 @@ endif::add-copy-button-to-env-var[] |boolean |`true` +a| [[quarkus-opentelemetry_quarkus-otel-instrument-jvm-metrics]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-instrument-jvm-metrics[`quarkus.otel.instrument.jvm-metrics`]## + +[.description] +-- +Enables instrumentation for JVM Metrics. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_OTEL_INSTRUMENT_JVM_METRICS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_OTEL_INSTRUMENT_JVM_METRICS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +|`true` + +a| [[quarkus-opentelemetry_quarkus-otel-instrument-http-server-metrics]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-instrument-http-server-metrics[`quarkus.otel.instrument.http-server-metrics`]## + +[.description] +-- +Enables instrumentation for HTTP Server Metrics. + + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_OTEL_INSTRUMENT_HTTP_SERVER_METRICS+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_OTEL_INSTRUMENT_HTTP_SERVER_METRICS+++` +endif::add-copy-button-to-env-var[] +-- +|boolean +|`true` + a| [[quarkus-opentelemetry_quarkus-otel-mp-compatibility]] [.property-path]##link:#quarkus-opentelemetry_quarkus-otel-mp-compatibility[`quarkus.otel.mp.compatibility`]## [.description] diff --git a/_versions/main/guides/cdi.adoc b/_versions/main/guides/cdi.adoc index 2dfba1a962..6c06a35c5e 100644 --- a/_versions/main/guides/cdi.adoc +++ b/_versions/main/guides/cdi.adoc @@ -455,10 +455,15 @@ public class LargeTxAccount implements Account { <3> Account delegate; <4> @Inject - LogService logService; <5> + @Decorated + Bean delegateInfo; <5> + + + @Inject + LogService logService; <6> void withdraw(BigDecimal amount) { - delegate.withdraw(amount); <6> + delegate.withdraw(amount); <7> if (amount.compareTo(1000) > 0) { logService.logWithdrawal(delegate, amount); } @@ -470,8 +475,9 @@ public class LargeTxAccount implements Account { <3> <2> `@Decorator` marks a decorator component. <3> The set of decorated types includes all bean types which are Java interfaces, except for `java.io.Serializable`. <4> Each decorator must declare exactly one _delegate injection point_. The decorator applies to beans that are assignable to this delegate injection point. -<5> Decorators can inject other beans. -<6> The decorator may invoke any method of the delegate object. And the container invokes either the next decorator in the chain or the business method of the intercepted instance. +<5> It is possible to obtain information about the decorated bean by using the `@Decorated` qualifier. +<6> Decorators can inject other beans. +<7> The decorator may invoke any method of the delegate object. And the container invokes either the next decorator in the chain or the business method of the intercepted instance. NOTE: Instances of decorators are dependent objects of the bean instance they intercept, i.e. a new decorator instance is created for each intercepted bean. diff --git a/_versions/main/guides/datasource.adoc b/_versions/main/guides/datasource.adoc index cc16c346dd..9548ccc566 100644 --- a/_versions/main/guides/datasource.adoc +++ b/_versions/main/guides/datasource.adoc @@ -169,7 +169,7 @@ endif::note-quarkus-derby[] + [NOTE] ==== -You can use any JDBC driver in a Quarkus app in JVM mode as described in <>. +You can use any JDBC driver in a Quarkus app in JVM mode as described in <>. However, using a non-built-in database kind is unlikely to work when compiling your application to a native executable. For native executable builds, it is recommended to either use the available JDBC Quarkus extensions or contribute a custom extension for your specific driver. @@ -217,7 +217,9 @@ Read <> for suggestions re * MySQL - `quarkus-jdbc-mysql` * Oracle - `quarkus-jdbc-oracle` * PostgreSQL - `quarkus-jdbc-postgresql` +ifndef::no-quarkiverse[] * Other JDBC extensions, such as link:https://github.com/quarkiverse/quarkus-jdbc-sqlite[SQLite] and its link:https://docs.quarkiverse.io/quarkus-jdbc-sqlite/dev/index.html[documentation], can be found in the https://github.com/quarkiverse[Quarkiverse]. +ifndef::no-quarkiverse[] + For example, to add the PostgreSQL driver dependency: + @@ -567,7 +569,7 @@ If your transaction involves non-datasource resources, be aware that they might If XA cannot be enabled for one of your datasources: -* Be aware that enabling XA for all datasources _except one_ (and only one) is still supported through https://www.narayana.io/docs/project/index.html#d5e857[Last Resource Commit Optimization (LRCO)]. +* Be aware that enabling XA for all datasources _except one_ (and only one) is still supported through link:https://www.narayana.io/docs/project/index.html#_last_resource_commit_optimization_lrco[Last Resource Commit Optimization (LRCO)]. * If you do not need a rollback for one datasource to trigger a rollback for other datasources, consider splitting your code into multiple transactions. To do so, use xref:transaction.adoc#programmatic-approach[`QuarkusTransaction.requiringNew()`]/xref:transaction.adoc#declarative-approach[`@Transactional(REQUIRES_NEW)`] (preferably) or xref:transaction.adoc#legacy-api-approach[`UserTransaction`] (for more complex use cases). diff --git a/_versions/main/guides/kotlin.adoc b/_versions/main/guides/kotlin.adoc index 2ff3227ba3..767e610cf8 100644 --- a/_versions/main/guides/kotlin.adoc +++ b/_versions/main/guides/kotlin.adoc @@ -301,9 +301,11 @@ allOpen { // <2> annotation("io.quarkus.test.junit.QuarkusTest") } -tasks.withType { - kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString() - kotlinOptions.javaParameters = true +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 + javaParameters = true + } } ---- diff --git a/_versions/main/guides/opentelemetry-metrics.adoc b/_versions/main/guides/opentelemetry-metrics.adoc index 91dc46d533..7192d198b8 100644 --- a/_versions/main/guides/opentelemetry-metrics.adoc +++ b/_versions/main/guides/opentelemetry-metrics.adoc @@ -529,9 +529,23 @@ We only show 1 of 3 exemplars for brevity. === Resource See the main xref:opentelemetry.adoc#resource[OpenTelemetry Guide resources] section. -== Additional instrumentation +== Automatic instrumentation + +We provide automatic instrumentation for JVM metrics and HTTP server requests metrics according to the https://github.com/eclipse/microprofile-telemetry/blob/2.0/spec/src/main/asciidoc/metrics.adoc[Microprofile Metrics 2.0 specification]. + +These metrics can be disabled by setting the following properties to `false`: + +[source,properties] +---- +quarkus.otel.instrument.jvm-metrics=false +quarkus.otel.instrument.http-server-metrics=false +---- + +[NOTE] +==== +- It is recommended to disable these instrumentations if you are using the Micrometer extension as well. +==== -Automatic metrics are not yet provided by the Quarkus OpenTelemetry extension. We plan to bridge the existing Quarkus Micrometer extension metrics to OpenTelemetry in the future. == Exporters diff --git a/_versions/main/guides/opentelemetry.adoc b/_versions/main/guides/opentelemetry.adoc index aea471d1c8..21ce9a0ed3 100644 --- a/_versions/main/guides/opentelemetry.adoc +++ b/_versions/main/guides/opentelemetry.adoc @@ -58,11 +58,6 @@ quarkus.otel.metrics.enabled=true ---- At build time on your `application.properties` file. -==== Manual instrumentation only -For now only manual instrumentation is supported. You can use the OpenTelemetry API to create and record metrics but Quarkus is not yet providing automatic instrumentation for metrics. - -In the future, we plan to bridge current Micrometer metrics to OpenTelemetry and maintain compatibility when possible. - === xref:opentelemetry-logging.adoc[OpenTelemetry Logging Guide] ==== Enable Logs