PerformanceMetrics: Use cfg section that doesn't conflict with tracing cfg
tracing.<traceid> subsections are used to configure tracing. Using
the tracing.metric subsection to configure traced operation conflicted
with that. E.g. in combination with the issue that is fixed by change
I9c9fac92f configuring performance metrics for any operation turned on
tracing for all requests.
Release-Notes: skip
Bug: Google b/355393292
Change-Id: Ia82a9abe0261cf52bf06e99f184ac7b171781524
Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index e862e3f..e061dda 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -5123,6 +5123,22 @@
+
By default, 25 which means that formatting happens in the caller thread.
+[[performance]]
+=== Section performance
+
+[[performance.metric]]
+==== Subsection performance.metric
+
+Section to control for which operations latency and counts should be recorded
+in the link:metrics.html#performance[performance metrics].
+
+[[performance.metric.operation]]performance.metric.operation::
++
+Name of a Gerrit operation for which latency and counts should be recorded in
+the link:metrics.html#performance[performance metrics].
++
+The operation name must match the operation name that is used with TraceTimer.
+
[[receiveemail]]
=== Section receiveemail
@@ -5982,19 +5998,6 @@
+
By default, unset (all projects are matched).
-[[tracing.metric]]
-==== Subsection tracing.metric
-
-Section to control for which operations latency and counts should be recorded
-in the link:metrics.html#performance[performance metrics].
-
-[[tracing.metric.operation]]tracing.metric.operation::
-+
-Name of a Gerrit operation for which latency and counts should be recorded in
-the link:metrics.html#performance[performance metrics].
-+
-The operation name must match the operation name that is used with TraceTimer.
-
[[deadline.id]]
==== Subsection deadline.<id>
diff --git a/java/com/google/gerrit/server/PerformanceMetrics.java b/java/com/google/gerrit/server/PerformanceMetrics.java
index b894d49..ee989d5 100644
--- a/java/com/google/gerrit/server/PerformanceMetrics.java
+++ b/java/com/google/gerrit/server/PerformanceMetrics.java
@@ -48,7 +48,7 @@
@Inject
PerformanceMetrics(@GerritServerConfig Config cfg, MetricMaker metricMaker) {
this.tracedOperations =
- ImmutableList.copyOf(cfg.getStringList("tracing", "metric", "operation"));
+ ImmutableList.copyOf(cfg.getStringList("performance", "metric", "operation"));
Field<String> operationNameField =
Field.ofString(