Skip to content

Log plugin name and attribute errors to plugins #3194

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

Merged
merged 9 commits into from
Sep 21, 2022
Merged

Conversation

pepeiborra
Copy link
Collaborator

@pepeiborra pepeiborra commented Sep 18, 2022

Here's another PR to make our logs slightly less useful: include the plugin name in plugin log messages and handler error messages. While there I also lowered the priority of some plugin log messages.

The end result can be seen in the log lines below.

2022-09-18T17:03:12.866214Z | Warning | retrie: InternalError: typecheck
2022-09-18T17:03:12.867001Z | Warning | retrie: InternalError: typecheck
2022-09-18T17:03:12.867141Z | Warning | retrie: InternalError: typecheck
2022-09-18T17:03:12.867250Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.867558Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.868251Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.868727Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.869204Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.875347Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.875602Z | Warning | retrie: InternalError: typecheck
[Warn  - 7:03:12 PM] retrie: InternalError: typecheck
2022-09-18T17:03:12.876245Z | Warning | class: InternalError: Unable to typecheck
[Warn  - 7:03:12 PM] class: InternalError: Unable to typecheck

Logs are still way too noisy as we log a warning when a plugin handler returns a ResponseError. I suspect that some plugins are generating ResponseErrors for things that are not really errors.

@pepeiborra pepeiborra force-pushed the log-plugin-name branch 4 times, most recently from 2e1ab65 to 6975503 Compare September 18, 2022 14:18
@pepeiborra pepeiborra changed the title Log plugin name Log plugin name and attribute errors to plugins Sep 18, 2022
@pepeiborra pepeiborra marked this pull request as ready for review September 20, 2022 05:25
@drsooch
Copy link
Collaborator

drsooch commented Sep 20, 2022

Logs are still way too noisy as we log a warning when a plugin handler returns a ResponseError. I suspect that some plugins are generating ResponseErrors for things that are not really errors.

Agreed when I originally made the change I didn't really expect to see some of the errors (like failing to typecheck or get a parsed module).

I think sending back a ResponseError should more be in line with a logic bug or an unexpected code path. (Some of my plugins are guilty of sending a ResponseError when it probably shouldn't.)

Copy link
Collaborator

@drsooch drsooch left a comment

Choose a reason for hiding this comment

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

LGTM

@pepeiborra pepeiborra enabled auto-merge (squash) September 21, 2022 15:56
@pepeiborra pepeiborra merged commit dca5cc3 into master Sep 21, 2022
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.

2 participants