Skip to content

Fix dotnet-counters command to explicitly specify Npgsql provider via --counters#467

Merged
roji merged 1 commit into
npgsql:mainfrom
softworm:patch-1
Jul 21, 2026
Merged

Fix dotnet-counters command to explicitly specify Npgsql provider via --counters#467
roji merged 1 commit into
npgsql:mainfrom
softworm:patch-1

Conversation

@softworm

@softworm softworm commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The documentation currently shows a generic dotnet counters monitor command. However, by default, this tool only displays System.Runtime metrics and does not automatically discover Npgsql counters.
To successfully monitor Npgsql connection pool metrics, the provider name must be explicitly passed using the --counters parameter. Without this flag, the Npgsql metrics are not displayed even if the application is actively using the database.
This PR updates the command example to include --counters Npgsql, ensuring users can view the metrics correctly.
Before:

dotnet counters monitor Npgsql -p <pid>

After:

dotnet counters monitor --counters Npgsql -p <pid>

Updated command for monitoring Npgsql metrics with dotnet-counters.

@roji roji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@roji
roji enabled auto-merge (squash) July 21, 2026 00:04
@roji
roji merged commit 4a528c6 into npgsql:main Jul 21, 2026
2 checks passed
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.

2 participants