Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NpgsqlDataSource #1442

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Use NpgsqlDataSource #1442

merged 1 commit into from
Jul 25, 2024

Conversation

gunndabad
Copy link
Collaborator

The /metrics endpoint published database-related metrics with a pool-name that matches the connection string (minus the password). We don't really want to be exposing that. This PR moves to using NpgsqlDataSource with a Name of TrsDb; this changes the pool-name on the metrics to TrsDb.

It turns out NpgsqlDataSource is quite a nice thing to be passing around so I've updated a few places to use it over IDbContextFactory<TrsDbContext> (or the plain connection string).

Copy link
Member

@saliceti saliceti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gunndabad gunndabad merged commit ce719db into main Jul 25, 2024
13 checks passed
@gunndabad gunndabad deleted the metrics-db-pool-name branch July 25, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants