Skip to content

Commit 2ec585b

Browse files
ericallamclaude
andcommitted
fix(webapp): oxfmt the metrics module and simplify the server-changes note
Run oxfmt on databaseMetrics.server.ts (code-quality check). Reword the server-changes note to a single user-facing sentence with no infra names, per the release-note guidance. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KHjfL7qXHia5DTnxi1RePS
1 parent 0a93dc0 commit 2ec585b

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

.server-changes/db-pool-metrics-per-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ area: webapp
33
type: improvement
44
---
55

6-
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.
6+
Database connection metrics are now reported for every configured database connection instead of only the primary one, and stay accurate regardless of connection type.

apps/webapp/app/utils/databaseMetrics.server.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ export type NormalizedDatabaseMetrics = {
5252
};
5353
};
5454

55-
const sources = singleton(
56-
"databaseMetricsSources",
57-
() => new Map<string, DatabaseMetricsSource>()
58-
);
55+
const sources = singleton("databaseMetricsSources", () => new Map<string, DatabaseMetricsSource>());
5956

6057
export function registerDatabaseMetricsSource(source: DatabaseMetricsSource): void {
6158
sources.set(source.clientType, source);

0 commit comments

Comments
 (0)