Added groupable class in GroupTag [DPP-1296]. (#15382)

CHANGELOG_BEGIN
CHANGELOG_END
This commit is contained in:
atriantafyllos-da 2022-11-03 10:57:56 +01:00 committed by GitHub
parent ed9d9c7ae6
commit d8f907b928
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 88 deletions

View File

@ -120,16 +120,8 @@ class ExecutionMetrics(val prefix: MetricName, override val registry: MetricRegi
val engineRunning: Meter = meter(prefix :+ "engine_running")
@MetricDoc.GroupTag(
representative = "daml.execution.cache.<state_cache>.hits"
)
@MetricDoc.GroupTag(
representative = "daml.execution.cache.<state_cache>.misses"
)
@MetricDoc.GroupTag(
representative = "daml.execution.cache.<state_cache>.evictions"
)
@MetricDoc.GroupTag(
representative = "daml.execution.cache.<state_cache>.evicted_weight"
representative = "daml.execution.cache.<state_cache>",
groupableClass = classOf[CacheMetrics],
)
object cache extends DropwizardFactory {
val prefix: MetricName = ExecutionMetrics.this.prefix :+ "cache"

View File

@ -10,22 +10,8 @@ import com.daml.metrics.api.dropwizard.FactoryWithDBMetrics
import com.daml.metrics.api.{MetricDoc, MetricName}
@MetricDoc.GroupTag(
representative = "daml.index.db.<operation>.wait"
)
@MetricDoc.GroupTag(
representative = "daml.index.db.<operation>.exec"
)
@MetricDoc.GroupTag(
representative = "daml.index.db.<operation>.translation"
)
@MetricDoc.GroupTag(
representative = "daml.index.db.<operation>.compression"
)
@MetricDoc.GroupTag(
representative = "daml.index.db.<operation>.commit"
)
@MetricDoc.GroupTag(
representative = "daml.index.db.<operation>.query"
representative = "daml.index.db.<operation>",
groupableClass = classOf[DatabaseMetrics],
)
class IndexDBMetrics(override val prefix: MetricName, override val registry: MetricRegistry)
extends FactoryWithDBMetrics {

View File

@ -10,37 +10,12 @@ import com.daml.metrics.api.dropwizard.{DropwizardFactory, DropwizardTimer}
import com.daml.metrics.api.{MetricDoc, MetricName}
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.wait"
representative = "daml.parallel_indexer.<stage>.executor",
groupableClass = classOf[InstrumentedExecutorServiceForDocs],
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.exec"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.translation"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.compression"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.commit"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.query"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.executor.submitted"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.executor.running"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.executor.completed"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.executor.idle"
)
@MetricDoc.GroupTag(
representative = "daml.parallel_indexer.<stage>.executor.duration"
representative = "daml.parallel_indexer.<stage>",
groupableClass = classOf[DatabaseMetrics],
)
class ParallelIndexerMetrics(val prefix: MetricName, override val registry: MetricRegistry)
extends DropwizardFactory {

View File

@ -8,22 +8,8 @@ import com.daml.metrics.api.{MetricDoc, MetricName}
import com.daml.metrics.api.dropwizard.FactoryWithDBMetrics
@MetricDoc.GroupTag(
representative = "daml.party_record_store.<operation>.wait"
)
@MetricDoc.GroupTag(
representative = "daml.party_record_store.<operation>.exec"
)
@MetricDoc.GroupTag(
representative = "daml.party_record_store.<operation>.translation"
)
@MetricDoc.GroupTag(
representative = "daml.party_record_store.<operation>.compression"
)
@MetricDoc.GroupTag(
representative = "daml.party_record_store.<operation>.commit"
)
@MetricDoc.GroupTag(
representative = "daml.party_record_store.<operation>.query"
representative = "daml.party_record_store.<operation>",
groupableClass = classOf[DatabaseMetrics],
)
class PartyRecordStoreMetrics(
override val prefix: MetricName,

View File

@ -8,22 +8,8 @@ import com.daml.metrics.api.{MetricDoc, MetricName}
import com.daml.metrics.api.dropwizard.FactoryWithDBMetrics
@MetricDoc.GroupTag(
representative = "daml.user_management.<operation>.wait"
)
@MetricDoc.GroupTag(
representative = "daml.user_management.<operation>.exec"
)
@MetricDoc.GroupTag(
representative = "daml.user_management.<operation>.translation"
)
@MetricDoc.GroupTag(
representative = "daml.user_management.<operation>.compression"
)
@MetricDoc.GroupTag(
representative = "daml.user_management.<operation>.commit"
)
@MetricDoc.GroupTag(
representative = "daml.user_management.<operation>.query"
representative = "daml.user_management.<operation>",
groupableClass = classOf[DatabaseMetrics],
)
class UserManagementMetrics(override val prefix: MetricName, override val registry: MetricRegistry)
extends FactoryWithDBMetrics {

View File

@ -24,6 +24,6 @@ object MetricDoc {
// The GroupTag can be defined for metrics that share similar names and should be grouped using a
// wildcard (the representative).
case class GroupTag(representative: String) extends StaticAnnotation
case class GroupTag(representative: String, groupableClass: Class[_]) extends StaticAnnotation
}