Skip to content

chore(metrics): deprecate the latency Summaries of invitations and webfinger - #3827

Open
pbleser-oc wants to merge 1 commit into
opencloud-eu:mainfrom
pbleser-oc:feat/3824-deprecate-latency-summaries
Open

pbleser-oc wants to merge 1 commit into
opencloud-eu:mainfrom
pbleser-oc:feat/3824-deprecate-latency-summaries

Conversation

@pbleser-oc

Copy link
Copy Markdown
Member

Fixes #3824 (part of #3817)

Changes

Deprecate the two remaining Prometheus Summaries, so that they can be removed in a future release (#3826):

Deprecated Summary Use instead
opencloud_invitations_invitation_latency_microseconds opencloud_invitations_invitation_duration_seconds
opencloud_webfinger_webfinger_latency_microseconds opencloud_webfinger_webfinger_duration_seconds
  • Their Help text now says they are deprecated and names the replacement histogram.
  • The Latency fields of both metrics structs have a Deprecated: doc comment.
  • The metrics themselves are unchanged and keep being recorded.

Summaries compute their quantiles on each instance, so they can't be aggregated across instances. The histograms measure the same requests, and already exist next to the Summaries.

For the release notes

The Summaries opencloud_invitations_invitation_latency_microseconds and opencloud_webfinger_webfinger_latency_microseconds are deprecated and will be removed in a future release. Use the histograms opencloud_invitations_invitation_duration_seconds and opencloud_webfinger_webfinger_duration_seconds instead. Note that they are in seconds, not microseconds, and that quantiles are computed with histogram_quantile(), e.g.:

histogram_quantile(0.99, sum by (le) (rate(opencloud_webfinger_webfinger_duration_seconds_bucket[5m])))

With native histograms enabled in Prometheus (once #3825 is merged), the same query on the native histogram is:

histogram_quantile(0.99, sum(rate(opencloud_webfinger_webfinger_duration_seconds[5m])))

Tests

go build, go vet and the tests of both services pass.

…bfinger

Mark the Summaries opencloud_invitations_invitation_latency_microseconds
and opencloud_webfinger_webfinger_latency_microseconds as deprecated, in
their Help text and on the Latency fields of the metrics structs, so
that they can be removed in a future release (opencloud-eu#3826).

Summaries compute their quantiles on each instance, so they can't be
aggregated across instances. Both services already expose the same
measurement as a histogram (opencloud_invitations_invitation_duration_seconds
and opencloud_webfinger_webfinger_duration_seconds), which should be
used instead: note that it is in seconds, not in microseconds.

The metrics themselves are unchanged and keep being recorded.

Fixes opencloud-eu#3824
@codacy-production

codacy-production Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage 0.00% diff coverage · -0.01% coverage variation

Metric Results
Coverage variation ✅ -0.01% coverage variation (-1.00%)
Diff coverage ✅ 0.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (4c6d7e7) 92640 25430 27.45%
Head commit (63a5343) 92640 (+0) 25420 (-10) 27.44% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3827) 2 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metrics: deprecate the latency Summaries in invitations and webfinger

1 participant