Observability
Monitoring
Application monitoring — Prometheus ServiceMonitor for your app.
Component:
MonitoringExamples
01
Example 1
import { Monitoring } from '@r8s/recipes'
export default <Monitoring name="api-monitor" selector={{ app: 'api' }} />02
Example 2
import { Monitoring } from '@r8s/recipes'
export default (
<Monitoring
name="api-monitor"
selector={{ app: 'api' }}
path="/actuator/prometheus"
interval="15s"
/>
)Props
namestringRequired—Resource name (used for ServiceMonitor labels)
namespacestringOptional—Kubernetes namespace where the app runs (defaults to 'default')
selectorRecordRequired—Labels matching the Kubernetes Service to monitor (e.g., { app: 'api' })
portstringOptional—Metrics endpoint port name (defaults to 'metrics')
pathstringOptional—Metrics path (defaults to '/metrics')
intervalstringOptional—Scrape interval (defaults to '30s')
logsbooleanOptional—Enable log aggregation with Loki (default: false)
logsStoragestringOptional—Loki storage size (default: '10Gi')