// Api app config — the observability + testing showcase. Read by `voltro dev`. // // Two observability plugins, both turnkey: // • prometheusPlugin() — exposes GET /metrics in the text exposition format. // The framework already records rpc / http / subscription / cache metrics // into Effect's global MetricRegistry; the plugin just exports them. Your // OWN counters (see mutations/notes.create) show up there too, automatically. // • sentryPlugin() — reports rpc-handler + REST + workflow + render errors, // correlated to the active trace. INERT without SENTRY_DSN, so it's safe to // ship wired: set the env to turn it on, no code change. // // Tracing is on by default in `voltro dev` (a buffer-only tracer powers the // DevTools Traces panel + traceId-in-logs); set OTEL_EXPORTER_OTLP_ENDPOINT to // ship spans to Jaeger / Tempo / Honeycomb. // // `store: 'memory'` keeps first-run zero-infra. import { prometheusPlugin } from '@voltro/plugin-prometheus' import { sentryPlugin } from '@voltro/plugin-sentry' export default { type: 'api' as const, name: '{{capProjectName}}{{capAppName}}', store: 'memory' as const, plugins: [ // GET /metrics → Prometheus text. Optional bearer gate: prometheusPlugin({ token }) // / PROMETHEUS_TOKEN. processMetrics defaults on (RSS + CPU). prometheusPlugin(), // Inert until SENTRY_DSN is set; then errors flow correlated to the traceId. sentryPlugin(), ], }