Skip to content

Commit 8db8332

Browse files
committed
Sync documentation of main branch
1 parent f353945 commit 8db8332

File tree

8 files changed

+123
-56
lines changed

8 files changed

+123
-56
lines changed

_generated-doc/main/config/quarkus-all-config.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10081,6 +10081,29 @@ endif::add-copy-button-to-env-var[]
1008110081
|string
1008210082
|
1008310083

10084+
a|icon:lock[title=Fixed at build time] [[quarkus-core_quarkus-package-output-timestamp]] [.property-path]##link:#quarkus-core_quarkus-package-output-timestamp[`quarkus.package.output-timestamp`]##
10085+
ifdef::add-copy-button-to-config-props[]
10086+
config_property_copy_button:+++quarkus.package.output-timestamp+++[]
10087+
endif::add-copy-button-to-config-props[]
10088+
10089+
10090+
[.description]
10091+
--
10092+
The timestamp used as a reference for generating the packages (e.g. for the creation timestamp of ZIP entries).
10093+
10094+
The approach is similar to what is done by the maven-jar-plugin with `project.build.outputTimestamp`.
10095+
10096+
10097+
ifdef::add-copy-button-to-env-var[]
10098+
Environment variable: env_var_with_copy_button:+++QUARKUS_PACKAGE_OUTPUT_TIMESTAMP+++[]
10099+
endif::add-copy-button-to-env-var[]
10100+
ifndef::add-copy-button-to-env-var[]
10101+
Environment variable: `+++QUARKUS_PACKAGE_OUTPUT_TIMESTAMP+++`
10102+
endif::add-copy-button-to-env-var[]
10103+
--
10104+
|link:https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/Instant.html[Instant]
10105+
|
10106+
1008410107
a|icon:lock[title=Fixed at build time] [[quarkus-core_quarkus-package-write-transformed-bytecode-to-build-output]] [.property-path]##link:#quarkus-core_quarkus-package-write-transformed-bytecode-to-build-output[`quarkus.package.write-transformed-bytecode-to-build-output`]##
1008510108
ifdef::add-copy-button-to-config-props[]
1008610109
config_property_copy_button:+++quarkus.package.write-transformed-bytecode-to-build-output+++[]

_generated-doc/main/config/quarkus-core_quarkus.package.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,29 @@ endif::add-copy-button-to-env-var[]
497497
|string
498498
|
499499

500+
a|icon:lock[title=Fixed at build time] [[quarkus-core_quarkus-package-output-timestamp]] [.property-path]##link:#quarkus-core_quarkus-package-output-timestamp[`quarkus.package.output-timestamp`]##
501+
ifdef::add-copy-button-to-config-props[]
502+
config_property_copy_button:+++quarkus.package.output-timestamp+++[]
503+
endif::add-copy-button-to-config-props[]
504+
505+
506+
[.description]
507+
--
508+
The timestamp used as a reference for generating the packages (e.g. for the creation timestamp of ZIP entries).
509+
510+
The approach is similar to what is done by the maven-jar-plugin with `project.build.outputTimestamp`.
511+
512+
513+
ifdef::add-copy-button-to-env-var[]
514+
Environment variable: env_var_with_copy_button:+++QUARKUS_PACKAGE_OUTPUT_TIMESTAMP+++[]
515+
endif::add-copy-button-to-env-var[]
516+
ifndef::add-copy-button-to-env-var[]
517+
Environment variable: `+++QUARKUS_PACKAGE_OUTPUT_TIMESTAMP+++`
518+
endif::add-copy-button-to-env-var[]
519+
--
520+
|link:https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/Instant.html[Instant]
521+
|
522+
500523
a|icon:lock[title=Fixed at build time] [[quarkus-core_quarkus-package-write-transformed-bytecode-to-build-output]] [.property-path]##link:#quarkus-core_quarkus-package-write-transformed-bytecode-to-build-output[`quarkus.package.write-transformed-bytecode-to-build-output`]##
501524
ifdef::add-copy-button-to-config-props[]
502525
config_property_copy_button:+++quarkus.package.write-transformed-bytecode-to-build-output+++[]

_versions/main/guides/command-mode-reference.adoc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,17 @@ public class HelloIT extends HelloTest {
248248
}
249249
----
250250

251-
=== Mocking
251+
=== Limitations
252+
253+
`@QuarkusMainTest` does **not** support the following features:
254+
255+
- Injection of CDI beans
256+
- Using Panache entities
257+
- Using mocks with `@InjectMock`
258+
259+
Usually, it's best to use a combination of `@QuarkusMainTest` tests for testing application externals, and `@QuarkusTest` tests for fine-grained testing which requires access to application internals.
260+
261+
==== Mocking
252262

253263
CDI injection is not supported in the `@QuarkusMainTest` tests.
254264
Consequently, mocking CDI beans with `QuarkusMock` or `@InjectMock` is not supported either.

_versions/main/guides/container-image.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ when all that is needed is the ability to push to a container image registry.
3030

3131
To use this feature, add the following extension to your project:
3232

33-
:add-extension-extensions: container-image-jib
33+
:add-extension-extensions: quarkus-container-image-jib
3434
include::{includes}/devtools/extension-add.adoc[]
3535

3636
WARNING: In situations where all that is needed to build a container image and no push to a registry is necessary (essentially by having set `quarkus.container-image.build=true` and left `quarkus.container-image.push` unset - it defaults to `false`), then this extension creates a container image and registers
@@ -114,7 +114,7 @@ The extension `quarkus-container-image-docker` is using the Docker binary and th
114114

115115
To use this feature, add the following extension to your project.
116116

117-
:add-extension-extensions: container-image-docker
117+
:add-extension-extensions: quarkus-container-image-docker
118118
include::{includes}/devtools/extension-add.adoc[]
119119

120120
The `quarkus-container-image-docker` extension is capable of https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images/[creating multi-platform (or multi-arch)] images using https://docs.docker.com/engine/reference/commandline/buildx_build/[`docker buildx build`]. See the `quarkus.docker.buildx.*` configuration items in the <<#DockerOptions,Docker Options>> section below.
@@ -133,7 +133,7 @@ The extension `quarkus-container-image-podman` uses https://podman.io/[Podman] a
133133

134134
To use this feature, add the following extension to your project.
135135

136-
:add-extension-extensions: container-image-podman
136+
:add-extension-extensions: quarkus-container-image-podman
137137
include::{includes}/devtools/extension-add.adoc[]
138138

139139
[TIP]
@@ -156,7 +156,7 @@ The benefit of this approach, is that it can be combined with OpenShift's `Deplo
156156

157157
To use this feature, add the following extension to your project.
158158

159-
:add-extension-extensions: container-image-openshift
159+
:add-extension-extensions: quarkus-container-image-openshift
160160
include::{includes}/devtools/extension-add.adoc[]
161161

162162
OpenShift builds require creating a `BuildConfig` and two `ImageStream` resources, one for the builder image and one for the output image.
@@ -186,7 +186,7 @@ quarkus.buildpack.native-builder-image=<native builder image>
186186

187187
To use this feature, add the following extension to your project.
188188

189-
:add-extension-extensions: container-image-buildpack
189+
:add-extension-extensions: quarkus-container-image-buildpack
190190
include::{includes}/devtools/extension-add.adoc[]
191191

192192
NOTE: When using the buildpack container image extension it is strongly advised to avoid adding `quarkus.container-image.build=true` in your properties configuration as it might trigger nesting builds within builds. It's preferable to pass it as an option to the build command instead.

_versions/main/guides/opentelemetry-metrics.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ IMPORTANT: Each unique combination of metric name and dimension produces a uniqu
362362
Using an unbounded set of dimensional data (many different values like a userId) can lead to a "cardinality explosion", an exponential increase in the creation of new time series.
363363
Avoid!
364364

365-
OpenTelemetry provides many other types of Counters: `LongUpDownCounter`, `DoubleCounter`, `DoubleUpDownCounter` and also Observable, async counters like `ObservableLongCounter`, `ObservableDoubleCounter`, `ObservableLongUpDownCounter` and `ObservableDoubleUpDownCounter`.
365+
OpenTelemetry provides many other types of Counters: `LongUpDownCounter`, `DoubleCounter`, `UpDownCounter`, `DoubleUpDownCounter` and also Observable, async counters like `ObservableLongCounter`, `ObservableDoubleCounter`, `ObservableLongUpDownCounter` and `ObservableDoubleUpDownCounter`.
366366

367-
For more details please refer to the https://opentelemetry.io/docs/languages/java/instrumentation/#using-counters[OpenTelemetry Java documentation about Counters].
367+
For more details please refer to the https://opentelemetry.io/docs/languages/java/api/#counter[OpenTelemetry Java documentation about Counters].
368368

369369
=== Gauges
370370
Observable Gauges should be used to measure non-additive values.

_versions/main/guides/opentelemetry.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ You can also use the xref:logging-exporter-for-debugging[logging exporter] to ou
398398

399399
Quarkus supports the OpenTelemetry Autoconfiguration for Traces.
400400
The configurations match what you can see at
401-
https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md[OpenTelemetry SDK Autoconfigure]
401+
https://opentelemetry.io/docs/languages/java/configuration/[OpenTelemetry SDK Autoconfigure]
402402
adding the usual `quarkus.*` prefix.
403403

404404
Quarkus OpenTelemetry configuration properties now have the `quarkus.otel.*` prefix.

_versions/main/guides/rest.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,15 @@ See <<execution-model,Execution Model documentation>> for more information.
917917
The link:{jdkapi}/java/util/concurrent/CompletionStage.html[`CompletionStage`] return
918918
type is also supported.
919919

920+
==== Request cancellation
921+
922+
Async endpoints that return `Uni` support request cancellation, which means that if the underlying HTTP connection is closed for whatever reason,
923+
the request pipeline defined by the returned `Uni` is also cancelled. This can be very useful in avoiding unnecessary work on the server
924+
when the client isn't going to use the response anyway.
925+
926+
If instead of cancelling the pipeline, it should be completed regardless of the state of the HTTP connection, Quarkus REST provides the `org.jboss.resteasy.reactive.server.Cancellable` annotation
927+
which can be applied to REST classes or methods to control the cancellation behavior.
928+
920929
=== Streaming support
921930

922931
If you want to stream your response element by element, you can make your endpoint method return a

_versions/main/guides/telemetry-micrometer-to-opentelemetry.adoc

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -134,73 +134,75 @@ quarkus.micrometer.binder.http-server.enabled=true
134134

135135
The JVM and HTTP server metrics are collected by Micrometer.
136136

137-
Next, are examples of the metrics collected by Micrometer and a comparison of what would be the `quarkus-micrometer-registry-prometheus` output vs the one on this bridge. A link to the equivalent OpenTelemetry Semantic Convention is also provided for reference and is not currently used in the bridge.
137+
Next, are examples of the metrics collected by Micrometer compared with what would be the `quarkus-micrometer-registry-prometheus` endpoint output (`/q/metrics`) vs the OTLP protocol output on this bridge.
138138

139+
A link to the equivalent OpenTelemetry Semantic Convention is also provided for reference and is not currently used by the bridge.
140+
141+
.Micrometer metrics output comparison. Prometheus registry vs. OpenTelemetry bridge
139142
|===
140-
|Micrometer Meter |Quarkus Micrometer Prometheus output | This bridge OpenTelemetry output name | Related OpenTelemetry Semantic Convention (not applied)
143+
|Micrometer Meter Java definition |Quarkus Micrometer Prometheus output (as seen at `/q/metrics/`) | This bridge OpenTelemetry output name (as seen in the OTLP output) | Related OpenTelemetry Semantic Convention (not applied)
141144

142-
|Using the @Timed interceptor.
145+
|Using the xref:telemetry-micrometer#create-a-timer[@Timed] interceptor.
143146
|
144-
|method.timed (Histogram), method.timed.max (DoubleGauge)
147+
|method.timed (xref:opentelemetry-metrics#histograms[Histogram]), method.timed.max (xref:opentelemetry-metrics#gauges[DoubleGauge])
145148
|NA
146149

147-
|Using the @Counted interceptor.
150+
|Using the xref:telemetry-micrometer#counters[@Counted] interceptor.
148151
|
149-
|method.counted (DoubleSum)
152+
|method.counted (https://opentelemetry.io/docs/specs/otel/metrics/sdk/#sum-aggregation[DoubleSum])
150153
|NA
151154

152-
|`http.server.active.requests` (Gauge)
153-
|`http_server_active_requests` (Gauge)
154-
|`http.server.active.requests` (DoubleGauge)
155-
|https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserveractive_requests[`http.server.active_requests`] (UpDownCounter)
155+
|`http.server.active.requests` (xref:telemetry-micrometer#gauges[Gauge])
156+
|`http_server_active_requests` (xref:telemetry-micrometer#gauges[Gauge])
157+
|`http.server.active.requests` (xref:opentelemetry-metrics#gauges[DoubleGauge])
158+
|https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserveractive_requests[`http.server.active_requests`] (xref:opentelemetry-metrics#counters[UpDownCounter])
156159

157160
|`http.server.requests` (Timer)
158-
|`http_server_requests_seconds_count`, `http_server_requests_seconds_sum`, `http_server_requests_seconds_max` (Gauge)
159-
|`http.server.requests` (Histogram), `http.server.requests.max` (DoubleGauge)
160-
|https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestduration[`http.server.request.duration`] (Histogram)
161-
162-
|`http.server.bytes.read` (DistributionSummary)
163-
|`http_server_bytes_read_count`, `http_server_bytes_read_sum` , `http_server_bytes_read_max` (Gauge)
164-
|`http.server.bytes.read` (Histogram), `http.server.bytes.read.max` (DoubleGauge)
165-
|https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestbodysize[`http.server.request.body.size`] (Histogram)
166-
167-
|`http.server.bytes.write` (DistributionSummary)
168-
|`http_server_bytes_write_count`, `http_server_bytes_write_sum` , `http_server_bytes_write_max` (Gauge)
169-
|`http.server.bytes.write` (Histogram), `http.server.bytes.write.max` (DoubleGauge)
170-
|https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverresponsebodysize[`http.server.response.body.size`] (Histogram)
171-
172-
|`http.server.connections` (LongTaskTimer)
173-
|`http_server_connections_seconds_active_count`, `http_server_connections_seconds_duration_sum` `http_server_connections_seconds_max` (Gauge)
174-
|`http.server.connections.active` (LongSum), `http.server.connections.duration` (DoubleGauge)
161+
|`http_server_requests_seconds_count`, `http_server_requests_seconds_sum`, `http_server_requests_seconds_max` (xref:telemetry-micrometer#gauges[Gauge])
162+
|`http.server.requests` (xref:opentelemetry-metrics#histograms[Histogram]), `http.server.requests.max` (xref:opentelemetry-metrics#gauges[DoubleGauge])
163+
|https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestduration[`http.server.request.duration`] (xref:opentelemetry-metrics#histograms[Histogram])
164+
165+
|`http.server.bytes.read` (xref:telemetry-micrometer#create-a-distribution-summary[DistributionSummary])
166+
|`http_server_bytes_read_count`, `http_server_bytes_read_sum` , `http_server_bytes_read_max` (xref:telemetry-micrometer#gauges[Gauge])
167+
|`http.server.bytes.read` (xref:opentelemetry-metrics#histograms[Histogram]), `http.server.bytes.read.max` (xref:opentelemetry-metrics#gauges[DoubleGauge])
168+
|https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestbodysize[`http.server.request.body.size`] (xref:opentelemetry-metrics#histograms[Histogram])
169+
170+
|`http.server.bytes.write` (xref:telemetry-micrometer#create-a-distribution-summary[DistributionSummary])
171+
|`http_server_bytes_write_count`, `http_server_bytes_write_sum` , `http_server_bytes_write_max` (xref:telemetry-micrometer#gauges[Gauge])
172+
|`http.server.bytes.write` (xref:opentelemetry-metrics#histograms[Histogram]), `http.server.bytes.write.max` (xref:opentelemetry-metrics#gauges[DoubleGauge])
173+
|https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverresponsebodysize[`http.server.response.body.size`] (xref:opentelemetry-metrics#histograms[Histogram])
174+
175+
|`http.server.connections` (https://docs.micrometer.io/micrometer/reference/concepts/long-task-timers.html[LongTaskTimer])
176+
|`http_server_connections_seconds_active_count`, `http_server_connections_seconds_duration_sum` `http_server_connections_seconds_max` (xref:telemetry-micrometer#gauges[Gauge])
177+
|`http.server.connections.active` (https://opentelemetry.io/docs/specs/otel/metrics/sdk/#sum-aggregation[LongSum]), `http.server.connections.duration` (xref:opentelemetry-metrics#gauges[DoubleGauge])
175178
| N/A
176179

177-
|`jvm.threads.live` (Gauge)
178-
|`jvm_threads_live_threads` (Gauge)
179-
|`jvm.threads.live` (DoubleGauge)
180-
|https://opentelemetry.io/docs/specs/semconv/runtime/jvm-metrics/#metric-jvmthreadcount[`jvm.threads.live`] (UpDownCounter)
180+
|`jvm.threads.live` (xref:telemetry-micrometer#gauges[Gauge])
181+
|`jvm_threads_live_threads` (xref:telemetry-micrometer#gauges[Gauge])
182+
|`jvm.threads.live` (xref:opentelemetry-metrics#gauges[DoubleGauge])
183+
|https://opentelemetry.io/docs/specs/semconv/runtime/jvm-metrics/#metric-jvmthreadcount[`jvm.threads.live`] (xref:opentelemetry-metrics#counters[UpDownCounter])
181184

182-
|`jvm.threads.started` (FunctionCounter)
183-
|`jvm_threads_started_threads_total` (Counter)
184-
|`jvm.threads.started` (DoubleSum)
185-
|https://opentelemetry.io/docs/specs/semconv/runtime/jvm-metrics/#metric-jvmthreadcount[`jvm.threads.live`] (UpDownCounter)
185+
|`jvm.threads.started` (https://docs.micrometer.io/micrometer/reference/concepts/counters.html#_function_tracking_counters[FunctionCounter])
186+
|`jvm_threads_started_threads_total` (xref:telemetry-micrometer#counters[Counter])
187+
|`jvm.threads.started` (https://opentelemetry.io/docs/specs/otel/metrics/sdk/#sum-aggregation[DoubleSum])
188+
|https://opentelemetry.io/docs/specs/semconv/runtime/jvm-metrics/#metric-jvmthreadcount[`jvm.threads.live`] (xref:opentelemetry-metrics#counters[UpDownCounter])
186189

187-
|`jvm.threads.daemon` (Gauge)
188-
|`jvm_threads_daemon_threads` (Gauge)
189-
|`jvm.threads.daemon` (DoubleGauge)
190-
|https://opentelemetry.io/docs/specs/semconv/runtime/jvm-metrics/#metric-jvmthreadcount[`jvm.threads.live`] (UpDownCounter)
190+
|`jvm.threads.daemon` (xref:telemetry-micrometer#gauges[Gauge])
191+
|`jvm_threads_daemon_threads` (xref:telemetry-micrometer#gauges[Gauge])
192+
|`jvm.threads.daemon` (xref:opentelemetry-metrics#gauges[DoubleGauge])
193+
|https://opentelemetry.io/docs/specs/semconv/runtime/jvm-metrics/#metric-jvmthreadcount[`jvm.threads.live`] (xref:opentelemetry-metrics#counters[UpDownCounter])
191194

192-
|`jvm.threads.peak` (Gauge)
193-
|`jvm_threads_peak_threads` (Gauge)
194-
|`jvm.threads.peak` (DoubleGauge)
195+
|`jvm.threads.peak` (xref:telemetry-micrometer#gauges[Gauge])
196+
|`jvm_threads_peak_threads` (xref:telemetry-micrometer#gauges[Gauge])
197+
|`jvm.threads.peak` (xref:opentelemetry-metrics#gauges[DoubleGauge])
195198
|N/A
196199

197-
|`jvm.threads.states` (Gauge per state)
198-
|`jvm_threads_states_threads` (Gauge)
199-
|`jvm.threads.states` (DoubleGauge)
200-
|https://opentelemetry.io/docs/specs/semconv/runtime/jvm-metrics/#metric-jvmthreadcount[`jvm.threads.live`] (UpDownCounter)
200+
|`jvm.threads.states` (xref:telemetry-micrometer#gauges[Gauge] per state)
201+
|`jvm_threads_states_threads` (xref:telemetry-micrometer#gauges[Gauge])
202+
|`jvm.threads.states` (xref:opentelemetry-metrics#gauges[DoubleGauge])
203+
|https://opentelemetry.io/docs/specs/semconv/runtime/jvm-metrics/#metric-jvmthreadcount[`jvm.threads.live`] (xref:opentelemetry-metrics#counters[UpDownCounter])
201204
|===
202205

203-
204206
[NOTE]
205207
====
206208
Some metrics might be missing from the output if they contain no data.

0 commit comments

Comments
 (0)