Skip to content

Configuration

Config section: monitor (MonitorConfig). Env prefix: QK_MONITOR__.

KeyTypeDefaultEnv VarDescription
enabledboolTrueQK_MONITOR__ENABLEDEnable monitoring
namestr"quadkit-service"QK_MONITOR__NAMEService name / provider name
backend_typeBackendTypememoryQK_MONITOR__BACKEND_TYPEMonitoring backend (opentelemetry / prometheus / memory)
environmentEnvironmentdevelopment—Deployment environment
envstr | NoneNoneQK_MONITOR__ENVEnvironment override string
debugboolFalseQK_MONITOR__DEBUGEnable debug mode
KeyTypeDefaultEnv VarDescription
metrics.enabledboolTrueQK_MONITOR__METRICS__ENABLEDEnable metrics collection
metrics.prefixstr"quadkit_"QK_MONITOR__METRICS__PREFIXMetric name prefix
metrics.default_labelsdict[str, str]{}—Default labels for all metrics
metrics.histogram_bucketslist[float][0.1, 0.5, 1.0, 2.0, 5.0, 10.0]—Default histogram bucket boundaries
metrics.collection_intervalfloat60.0QK_MONITOR__METRICS__COLLECTION_INTERVALMetrics collection interval (seconds)
KeyTypeDefaultEnv VarDescription
tracing.enabledboolTrueQK_MONITOR__TRACING__ENABLEDEnable tracing
tracing.service_namestr"quadkit-service"QK_MONITOR__TRACING__SERVICE_NAMEService name for traces
tracing.sampler_typeSamplerTypealways_onQK_MONITOR__TRACING__SAMPLER_TYPESampling strategy
tracing.sample_ratefloat1.0QK_MONITOR__TRACING__SAMPLE_RATESample rate (0.0–1.0)
tracing.max_traces_per_secondint100—Rate limit for rate_limiting sampler
tracing.propagation_formatslist[str]["tracecontext", "baggage"]—Trace propagation formats
tracing.max_attributesint128—Max attributes per span
tracing.max_eventsint128—Max events per span
tracing.max_linksint128—Max links per span
tracing.max_spansint1000—Max in-memory spans
KeyTypeDefaultEnv VarDescription
health.enabledboolTrueQK_MONITOR__HEALTH__ENABLEDEnable health checks
health.pathstr"/health"QK_MONITOR__HEALTH__PATHHealth endpoint path
health.include_detailsboolTrue—Include detailed health info
health.timeoutfloat5.0QK_MONITOR__HEALTH__TIMEOUTHealth check timeout (seconds)
health.checkslist[str][]—Health check names to run
health.intervalint30QK_MONITOR__HEALTH__INTERVALHealth check interval (seconds)

Structured logging is owned by quadkit.core and configured through the core logging section (QK_QUADKIT__LOGGING__*), not MonitorConfig. When the monitor package is used with core, use QK_QUADKIT__LOGGING__* to set log level, format, redaction, sampling, and per-logger levels. See the core logging configuration documentation for the full key list.

KeyTypeDefaultEnv VarDescription
opentelemetry.endpointstr | NoneNoneQK_MONITOR__OPENTELEMETRY__ENDPOINTOTLP endpoint URL
opentelemetry.headersdict[str, str]{}—OTLP request headers
opentelemetry.insecureboolFalse—Use insecure connection
opentelemetry.timeoutfloat30.0—Export timeout (seconds)
opentelemetry.compressionstr"none"—Compression (none / gzip)
opentelemetry.batch_sizeint512—Export batch size
opentelemetry.export_intervalfloat5.0—Export interval (seconds)
opentelemetry.tracing_exporterslist[OTelExporterConfig][{"type":"console"}]—Tracing exporter configs
opentelemetry.metrics_exporterslist[OTelExporterConfig][{"type":"console"}]—Metrics exporter configs
KeyTypeDefaultEnv VarDescription
prometheus.portint8000QK_MONITOR__PROMETHEUS__PORTMetrics server port
prometheus.pathstr"/metrics"QK_MONITOR__PROMETHEUS__PATHMetrics endpoint path
prometheus.enable_default_metricsboolTrue—Enable default process metrics
prometheus.pushgateway_urlstr | NoneNone—Pushgateway URL
prometheus.push_intervalfloat10.0—Pushgateway push interval
prometheus.store_in_dbboolFalse—Persist metrics to database
prometheus.metrics_tablestr"metrics_samples"—DB metrics table name
monitor:
backend_type: prometheus
environment: production
metrics:
enabled: true
prefix: myapp_
histogram_buckets: [0.05, 0.1, 0.5, 1.0, 5.0]
tracing:
enabled: true
service_name: my-service
sampler_type: probability
sample_rate: 0.1
health:
path: /health
include_details: true
prometheus:
port: 8000
path: /metrics
Terminal window
export QK_MONITOR__BACKEND_TYPE=prometheus
export QK_MONITOR__TRACING__ENABLED=true
export QK_MONITOR__TRACING__SAMPLE_RATE=0.1
export QK_MONITOR__PROMETHEUS__PORT=8000