Skip to content
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

perf: don't insert middleware at all if they've been disabled #549

Merged
merged 1 commit into from
May 23, 2024

Conversation

bradleypriest
Copy link
Contributor

Following up on my comment from 7 years ago.

ab2c8cb#r22137232

If I've disabled the middlewares I would like to not see them in rails middleware

@bradleypriest bradleypriest changed the title perf: Don't insert middleware at all if they've been disabled perf: don't insert middleware at all if they've been disabled May 23, 2024
Copy link
Member

@stympy stympy left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@stympy
Copy link
Member

stympy commented May 23, 2024

I approved this before I saw that the tests were failing, but once the tests pass, I think this is ready to go. :)

@stympy stympy merged commit 0060dcf into honeybadger-io:master May 23, 2024
41 checks passed
@bradleypriest
Copy link
Contributor Author

I had a bit of a play around and it looks like the Agent and Config should be instantiated at this point

tadast added a commit to tadast/honeybadger-ruby that referenced this pull request Nov 4, 2024
While honeybadger-io#549
has removed middleware loading for Rails unless configured, it has
also removed the code that prevented the middleware from executing
unless configured.

A similar change is also required for Sinatra, because currently
it tries to execute when not configured.

When a Sinatra app does not use i18n gem and has user feedback
disabled, it errs with a "I18n::InvalidLocale - :en is not a valid
locale" exception from ERB, because Honeybadger tries to render
the feedback form.
tadast added a commit to tadast/honeybadger-ruby that referenced this pull request Nov 4, 2024
While honeybadger-io#549
has removed middleware loading for Rails unless configured, it has
also removed the code that prevented the middleware from executing
unless configured.

A similar change is also required for Sinatra, because currently
it tries to execute when not configured.

When a Sinatra app does not use i18n gem and has user feedback
disabled, it errs with a "I18n::InvalidLocale - :en is not a valid
locale" exception from ERB, because Honeybadger tries to render
the feedback form.
tadast added a commit to tadast/honeybadger-ruby that referenced this pull request Nov 4, 2024
While honeybadger-io#549
has removed middleware loading for Rails unless configured, it has
also removed the code that prevented the middleware from executing
unless configured.

A similar change is also required for Sinatra, because currently
it tries to execute when not configured.

When a Sinatra app does not use i18n gem and has user feedback
disabled, it errs with a "I18n::InvalidLocale - :en is not a valid
locale" exception from ERB, because Honeybadger tries to render
the feedback form.
tadast added a commit to tadast/honeybadger-ruby that referenced this pull request Nov 5, 2024
While honeybadger-io#549
has removed middleware loading for Rails unless configured, it has
also removed the code that prevented the middleware from executing
unless configured.

A similar change is also required for Sinatra, because currently
it tries to execute when not configured.

When a Sinatra app does not use i18n gem and has user feedback
disabled, it errs with a "I18n::InvalidLocale - :en is not a valid
locale" exception from ERB, because Honeybadger tries to render
the feedback form.
roelbondoc pushed a commit that referenced this pull request Nov 5, 2024
While #549
has removed middleware loading for Rails unless configured, it has
also removed the code that prevented the middleware from executing
unless configured.

A similar change is also required for Sinatra, because currently
it tries to execute when not configured.

When a Sinatra app does not use i18n gem and has user feedback
disabled, it errs with a "I18n::InvalidLocale - :en is not a valid
locale" exception from ERB, because Honeybadger tries to render
the feedback form.
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