MetricsConfiguration

pydantic settings safir.metrics.MetricsConfiguration

Configuration for emitting metrics.

Parameters:

Show JSON schema
{
   "title": "MetricsConfiguration",
   "description": "Configuration for emitting metrics.",
   "type": "object",
   "properties": {
      "topic_prefix": {
         "default": "lsst.square.metrics.events",
         "description": "You probably should use the default here. It could be useful in development scenarios to change this.",
         "title": "Metrics topic prefix",
         "type": "string"
      },
      "app_name": {
         "description": "The name of the application that is emitting these metrics",
         "title": "Application name",
         "type": "string"
      },
      "disable": {
         "default": false,
         "description": "Set to \"True\" to prevent actually publishing metrics",
         "title": "Disable",
         "type": "boolean"
      }
   },
   "additionalProperties": false,
   "required": [
      "app_name"
   ]
}

Config:
  • env_prefix: str = METRICS_

Fields:
field app_name: str [Required]

The name of the application that is emitting these metrics

field disable: bool = False

Set to “True” to prevent actually publishing metrics

field topic_prefix: str = 'lsst.square.metrics.events'

You probably should use the default here. It could be useful in development scenarios to change this.