diff --git a/ledger/metrics/src/main/scala/com/daml/metrics/Metrics.scala b/ledger/metrics/src/main/scala/com/daml/metrics/Metrics.scala index 1208511a23ba..cfd6edf13168 100644 --- a/ledger/metrics/src/main/scala/com/daml/metrics/Metrics.scala +++ b/ledger/metrics/src/main/scala/com/daml/metrics/Metrics.scala @@ -38,16 +38,11 @@ final class Metrics(val registry: MetricRegistry) { val validSubmissions: Meter = registry.meter(Prefix :+ "valid_submissions") - def inputBufferLength(firstParty: String): Counter = - registry.counter(Prefix :+ firstParty :+ "input_buffer_length") - def inputBufferCapacity(firstParty: String): Counter = - registry.counter(Prefix :+ firstParty :+ "input_buffer_capacity") - def inputBufferDelay(firstParty: String): Timer = - registry.timer(Prefix :+ firstParty :+ "input_buffer_delay") - def maxInFlightLength(firstParty: String): Counter = - registry.counter(Prefix :+ firstParty :+ "max_in_flight_length") - def maxInFlightCapacity(firstParty: String): Counter = - registry.counter(Prefix :+ firstParty :+ "max_in_flight_capacity") + val inputBufferLength: Counter = registry.counter(Prefix :+ "input_buffer_length") + val inputBufferCapacity: Counter = registry.counter(Prefix :+ "input_buffer_capacity") + val inputBufferDelay: Timer = registry.timer(Prefix :+ "input_buffer_delay") + val maxInFlightLength: Counter = registry.counter(Prefix :+ "max_in_flight_length") + val maxInFlightCapacity: Counter = registry.counter(Prefix :+ "max_in_flight_capacity") } object execution { diff --git a/ledger/participant-integration-api/src/main/scala/platform/apiserver/services/ApiCommandService.scala b/ledger/participant-integration-api/src/main/scala/platform/apiserver/services/ApiCommandService.scala index f2c8ec381d36..273d6f6f00c3 100644 --- a/ledger/participant-integration-api/src/main/scala/platform/apiserver/services/ApiCommandService.scala +++ b/ledger/participant-integration-api/src/main/scala/platform/apiserver/services/ApiCommandService.scala @@ -235,8 +235,6 @@ private[apiserver] object ApiCommandService { ): Future[Tracker] = { // Note: command completions are returned as long as at least one of the original submitters // is specified in the command completion request. - // Use just name of first party for open-ended metrics to avoid unbounded metrics name for multiple parties - val metricsPrefixFirstParty = key.parties.min for { ledgerEnd <- completionServices.getCompletionEnd().map(_.getOffset) } yield { @@ -265,16 +263,16 @@ private[apiserver] object ApiCommandService { ) val trackingFlow = MaxInFlight( configuration.maxCommandsInFlight, - capacityCounter = metrics.daml.commands.maxInFlightCapacity(metricsPrefixFirstParty), - lengthCounter = metrics.daml.commands.maxInFlightLength(metricsPrefixFirstParty), + capacityCounter = metrics.daml.commands.maxInFlightCapacity, + lengthCounter = metrics.daml.commands.maxInFlightLength, ).joinMat(commandTrackerFlow)(Keep.right) QueueBackedTracker( trackingFlow, configuration.inputBufferSize, - capacityCounter = metrics.daml.commands.inputBufferCapacity(metricsPrefixFirstParty), - lengthCounter = metrics.daml.commands.inputBufferLength(metricsPrefixFirstParty), - delayTimer = metrics.daml.commands.inputBufferDelay(metricsPrefixFirstParty), + capacityCounter = metrics.daml.commands.inputBufferCapacity, + lengthCounter = metrics.daml.commands.inputBufferLength, + delayTimer = metrics.daml.commands.inputBufferDelay, ) } }