Skip to content

Explicitly set histogram bucket bounds (#6167) - #6168

Merged
NinoFloris merged 2 commits into
npgsql:mainfrom
KeterSCP:explicit-histogram-buckets
Oct 29, 2025
Merged

NinoFloris merged 2 commits into
npgsql:mainfrom
KeterSCP:explicit-histogram-buckets

Conversation

@KeterSCP

Copy link
Copy Markdown
Contributor

Closes #6167

@KeterSCP
KeterSCP requested review from roji and vonzshik as code owners July 27, 2025 11:21
unit: "s",
description: "The duration of database commands, in seconds.");
description: "The duration of database commands, in seconds.",
advice: ShortHistogramAdvice);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, it looks like this API was added with .NET 9.

@roji are we going to continue supporting .NET 8 with Npgsql 10? As otherwise we have to add an explicit reference to System.Diagnostics.DiagnosticSource package.

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.

I think that's fine to do for the 8.0 tfm only.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, added condition to package reference

@NinoFloris NinoFloris 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.

LGTM. Would be good if @vonzshik or @roji could take a look at whether the selected buckets make sense.

@NinoFloris
NinoFloris force-pushed the explicit-histogram-buckets branch 2 times, most recently from 11bfd88 to 8b33f62 Compare October 29, 2025 16:54
@NinoFloris
NinoFloris force-pushed the explicit-histogram-buckets branch from 8b33f62 to bbfae6e Compare October 29, 2025 16:59
@NinoFloris
NinoFloris enabled auto-merge (squash) October 29, 2025 17:20
@NinoFloris

Copy link
Copy Markdown
Member

Considering the spec requests these buckets I'll merge this. Thanks again @KeterSCP.

@NinoFloris
NinoFloris merged commit 05e0427 into npgsql:main Oct 29, 2025
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.

Missing explicit bounds for db.client.commands.duration and db.client.connections.create_time

3 participants