Skip to content

Conversation

@SystemKeeper
Copy link
Contributor

@SystemKeeper SystemKeeper commented Jan 23, 2026

Add some basic talk metrics to the OpenMetrics endpoint:

# TYPE nextcloud_talk_active_calls gauge
# UNIT nextcloud_talk_active_calls calls
# HELP nextcloud_talk_active_calls Number of active calls in talk
nextcloud_talk_active_calls 0 1769185753

# TYPE nextcloud_talk_participants_in_calls gauge
# UNIT nextcloud_talk_participants_in_calls calas
# HELP nextcloud_talk_participants_in_calls Number of participants in calls in talk
nextcloud_talk_participants_in_calls 0 1769185753

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@SystemKeeper SystemKeeper force-pushed the feat/noid/openmetrics-calls branch from 2da4b8e to 0a496b8 Compare January 23, 2026 16:53
@SystemKeeper SystemKeeper self-assigned this Jan 23, 2026
@SystemKeeper SystemKeeper added feature: api 🛠️ OCS API for conversations, chats and participants feature: integration 📦 Integration with 3rd party (chat) service 3. to review enhancement labels Jan 23, 2026
@SystemKeeper SystemKeeper added this to the 🏖️ Next Major (34) milestone Jan 23, 2026
@SystemKeeper
Copy link
Contributor Author

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

Nitpick: I'd call it sessions, as many users with the same user id count as multiple and cause load like multiple, but it might be a confusing detail.

The unit however has to change to sessions or participants

@SystemKeeper
Copy link
Contributor Author

SystemKeeper commented Jan 24, 2026

I would then also change participants -> sessions in

$numParticipants = $this->metricsService->getNumberOfParticipantsInCalls();
if ($input->getOption('output') === 'plain') {
$output->writeln(sprintf('<error>There are currently %1$d calls in progress with %2$d participants</error>', $numCalls, $numParticipants));
} else {
$data = ['calls' => $numCalls, 'participants' => $numParticipants];
$this->writeArrayInOutputFormat($input, $output, $data);
}
, which would be breaking for non-plain output. Fine or should we keep participants here (or additionally as fallback)?

@nickvergessen
Copy link
Member

I'd not change the command to not break scripting done with it

@SystemKeeper SystemKeeper force-pushed the feat/noid/openmetrics-calls branch from 0a496b8 to 321fb84 Compare January 24, 2026 11:39
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@SystemKeeper SystemKeeper force-pushed the feat/noid/openmetrics-calls branch from 321fb84 to 973bc6a Compare January 24, 2026 11:46
@SystemKeeper
Copy link
Contributor Author

Unit specifies MetricFamily units. If non-empty, it MUST be a suffix of the MetricFamily name separated by an underscore. Be aware that further generation rules might make it an infix in the text format.

https://prometheus.io/docs/specs/om/open_metrics_spec/#unit

Needs to be fixed. Server has currently the same issue, it's only a SHOULD in version 2.0.0, but we export 1.0.0 and there it's a MUST.

@SystemKeeper SystemKeeper marked this pull request as draft January 25, 2026 22:17
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@SystemKeeper SystemKeeper force-pushed the feat/noid/openmetrics-calls branch from f9b8827 to 52600b9 Compare January 26, 2026 21:40
@SystemKeeper
Copy link
Contributor Author

Fixed in last commit

@SystemKeeper SystemKeeper marked this pull request as ready for review January 26, 2026 21:40
@nickvergessen nickvergessen merged commit 6a9af82 into main Jan 27, 2026
81 of 85 checks passed
@nickvergessen nickvergessen deleted the feat/noid/openmetrics-calls branch January 27, 2026 07:52
@nickvergessen
Copy link
Member

/backport to stable33

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

Labels

3. to review enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: integration 📦 Integration with 3rd party (chat) service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants