diff --git a/.server-changes/db-pool-metrics-per-client.md b/.server-changes/db-pool-metrics-per-client.md index cccaaa05c..100eb23a3 100644 --- a/.server-changes/db-pool-metrics-per-client.md +++ b/.server-changes/db-pool-metrics-per-client.md @@ -3,4 +3,4 @@ area: webapp type: improvement --- -Database connection-pool and query metrics are now reported for every configured database connection rather than only the primary, and keep working regardless of which database driver a connection uses. These metrics are now emitted only through the OpenTelemetry exporter; the Prometheus `/metrics` endpoint no longer includes the `prisma_*` series, so if you scrape that endpoint for database metrics, enable the OpenTelemetry metric exporter instead. +Database connection metrics are now reported for every configured database connection instead of only the primary one, and stay accurate regardless of connection type. diff --git a/apps/webapp/app/utils/databaseMetrics.server.ts b/apps/webapp/app/utils/databaseMetrics.server.ts index 40abe7996..6ec0dce11 100644 --- a/apps/webapp/app/utils/databaseMetrics.server.ts +++ b/apps/webapp/app/utils/databaseMetrics.server.ts @@ -52,10 +52,7 @@ export type NormalizedDatabaseMetrics = { }; }; -const sources = singleton( - "databaseMetricsSources", - () => new Map() -); +const sources = singleton("databaseMetricsSources", () => new Map()); export function registerDatabaseMetricsSource(source: DatabaseMetricsSource): void { sources.set(source.clientType, source);