[id='proc-configuring-kafka-bridge-smr-metrics-{context}']
= Configuring Strimzi Metrics Reporter metrics

[role="_abstract"]
Enable the Strimzi Metrics Reporter to collect Kafka Bridge metrics by setting the `bridge.metrics` option to `strimziMetricsReporter`.

.Prerequisites

* xref:proc-downloading-kafka-bridge-{context}[The Kafka Bridge installation archive is downloaded].

.Procedure

. Set the `bridge.metrics` configuration to `strimziMetricsReporter`.
+
.Configuration for enabling metrics

[source,properties]
----
bridge.metrics=strimziMetricsReporter
----
+
Optionally, you can configure a comma-separated list of regular expressions to filter exposed metrics using the `kafka.prometheus.metrics.reporter.allowlist` property.
If not configured, a default set of metrics is exposed.

+
When needed, it is possible to configure the `allowlist` per client type.
For example, by using the `kafka.admin` prefix and setting `kafka.admin.prometheus.metrics.reporter.allowlist=`, all admin client metrics are excluded.

+
You can add any plugin configuration to the Kafka Bridge properties file using `kafka.`, `kafka.admin.`, `kafka.producer.`, and `kafka.consumer.` prefixes.
In the event that the same property is configured with multiple prefixes, the most specific prefix takes precedence.
For example, `kafka.producer.prometheus.metrics.reporter.allowlist` takes precedence over `kafka.prometheus.metrics.reporter.allowlist`.

. Run the Kafka Bridge run script.
+
.Running the Kafka Bridge
[source,shell]
----
./bin/kafka_bridge_run.sh --config-file=<path>/application.properties
----
+
With metrics enabled, you can scrape metrics in Prometheus format from the `/metrics` endpoint of the Kafka Bridge.
