-
Notifications
You must be signed in to change notification settings - Fork 484
Warn about skipping reactor metrics when using unknown reactor type #19383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Warn about skipping reactor metrics when using unknown reactor type. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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", | ||
| selector, | ||
| asyncio_loop, | ||
| ) | ||
| else: | ||
| logger.warning( | ||
| "Skipping configuring reactor metrics: unexpected reactor type: %r", | ||
| reactor, | ||
| ) | ||
|
Comment on lines
+165
to
+169
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (o_O) What's a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: | ||
|
|
||
There was a problem hiding this comment.
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
ReactorLastSeenMetricbecause we're actually configuringpython_twisted_reactor_last_seenANDpython_twisted_reactor_tick_timehereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call.