MetricsConfig constructor

const MetricsConfig({
  1. bool enabled = true,
  2. int collectionIntervalSeconds = 60,
  3. @Deprecated('System metrics collection is not implemented; ' 'this option is ignored.') bool collectSystemMetrics = true,
  4. bool collectNetworkMetrics = true,
  5. bool collectStorageMetrics = true,
  6. bool enablePrometheusExport = false,
  7. String prometheusEndpoint = '/metrics',
  8. bool enableOpenTelemetry = false,
  9. String otlpEndpoint = 'http://localhost:4318/v1/metrics',
  10. Map<String, String> otlpHeaders = const {},
  11. int exportIntervalSeconds = 60,
})

Creates a metrics configuration with the given options. Creates a new MetricsConfig with the given collection options.

Implementation

const MetricsConfig({
  this.enabled = true,
  this.collectionIntervalSeconds = 60,
  @Deprecated(
    'System metrics collection is not implemented; '
    'this option is ignored.',
  )
  this.collectSystemMetrics = true,
  this.collectNetworkMetrics = true,
  this.collectStorageMetrics = true,
  this.enablePrometheusExport = false,
  this.prometheusEndpoint = '/metrics',
  this.enableOpenTelemetry = false,
  this.otlpEndpoint = 'http://localhost:4318/v1/metrics',
  this.otlpHeaders = const {},
  this.exportIntervalSeconds = 60,
});