Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable messaging observation by default for backwards compatibility #38894

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions docs/src/main/asciidoc/kafka.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2048,14 +2048,31 @@
If the xref:telemetry-micrometer.adoc[Micrometer extension] is present,
then Kafka producer and consumer clients metrics are exposed as Micrometer meters.

Per channel metrics are also exposed as Micrometer meters.
The number of messages produced or received per channel, acknowledgments and duration of processing are exposed.
=== Channel metrics

The messaging meters can be disabled:
Per channel metrics can also be gathered and exposed as Micrometer meters.
Following metrics can be gathered per channel, identified with the _channel_ tag:

* `quarkus.messaging.message.count` : The number of messages produced or received
* `quarkus.messaging.message.acks` : The number of messages processed successfully
* `quarkus.messaging.message.failures` : The number of messages processed with failures
* `quarkus.messaging.message.duration` : The duration of the message processing.

For backwards compatibility reasons channel metrics are not enabled by default and can be enabled with:

[IMPORTANT]
====
The https://smallrye.io/smallrye-reactive-messaging/latest/concepts/observability/[message observation]
depends on intercepting messages and therefore doesn't support channels consuming messages with
a custom message type such as `IncomingKafkaRecord`, `KafkaRecord`, `IncomingKafkaRecordBatch` or `KafkaRecordBatch`.

The message interception, and observation, still work with channels consuming the generic `Message` type,
or custom payloads enabled by https://smallrye.io/smallrye-reactive-messaging/latest/concepts/converters/[converters].
====

[source, properties]
----
quarkus.micrometer.binder.messaging.enabled=false
smallrye.messaging.observation.enabled=true

Check warning on line 2075 in docs/src/main/asciidoc/kafka.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Kafka Streams'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Kafka Streams'.", "location": {"path": "docs/src/main/asciidoc/kafka.adoc", "range": {"start": {"line": 2075, "column": 33}}}, "severity": "INFO"}
----


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ public void transform(AnnotationsTransformer.TransformationContext ctx) {
});
}

@BuildStep
public void disableObservation(BuildProducer<RunTimeConfigurationDefaultBuildItem> runtimeConfigProducer) {
runtimeConfigProducer.produce(
new RunTimeConfigurationDefaultBuildItem("smallrye.messaging.observation.enabled", "false"));
}

@BuildStep
public void enableHealth(ReactiveMessagingBuildTimeConfig buildTimeConfig,
BuildProducer<HealthBuildItem> producer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ mp.messaging.outgoing.request-reply.topic=request
mp.messaging.outgoing.request-reply.reply.batch=true

quarkus.micrometer.binder.messaging.enabled=true
smallrye.messaging.observation.enabled=true
Loading