Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/19383.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Warn about skipping reactor metrics when using unknown reactor type.
9 changes: 7 additions & 2 deletions synapse/metrics/_reactor_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,17 @@ def collect(self) -> Iterable[Metric]:
else:
# E.g. this does not support the (Windows-only) ProactorEventLoop.
logger.warning(
"Skipping configuring ReactorLastSeenMetric: unexpected asyncio loop selector: %r via %r",
"Skipping configuring reactor metrics: unexpected asyncio loop selector: %r via %r",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made this generic as "reactor metrics" instead of ReactorLastSeenMetric because we're actually configuring python_twisted_reactor_last_seen AND python_twisted_reactor_tick_time here

Copy link
Member

Choose a reason for hiding this comment

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

Good call.

selector,
asyncio_loop,
)
else:
logger.warning(
"Skipping configuring reactor metrics: unexpected reactor type: %r",
reactor,
)
Comment on lines +165 to +169
Copy link
Contributor Author

@MadLittleMods MadLittleMods Jan 15, 2026

Choose a reason for hiding this comment

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

This is the new warning when we see a new unexpected reactor type.

In my case, we we're running up against ProxiedReactor which isn't handled yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

More investigation in #19385

This PR was mainly just to give better feedback regardless of the reactor.

except Exception as e:
logger.warning("Configuring ReactorLastSeenMetric failed: %r", e)
logger.warning("Configuring reactor metrics failed: %r", e)


if wrapper:
Expand Down