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

Update Hanami to use Rack middleware #1113

Merged
merged 2 commits into from
Jun 26, 2024
Merged

Update Hanami to use Rack middleware #1113

merged 2 commits into from
Jun 26, 2024

Conversation

tombruijn
Copy link
Member

As part of #329, update the Hanami integration to use Rack middleware and the EventHandler to instrument requests made to Hanami apps. This standardizes the instrumentation as much as possible between Rack apps and minimizes our reliance on monkeypatches.

The only monkeypatch that remains is setting the action name to the Action class name. I have found no other way yet to fetch this metadata from the request metadata, environment or the Hanami router.

Part of #329
Mostly solves #911

As part of #329, update the Hanami integration to use Rack middleware
and the EventHandler to instrument requests made to Hanami apps. This
standardizes the instrumentation as much as possible between Rack apps
and minimizes our reliance on monkeypatches.

The only monkeypatch that remains is setting the action name to the
Action class name. I have found no other way yet to fetch this metadata
from the request metadata, environment or the Hanami router.

Part of #329
Mostly solves #911
Add a test that makes sure we don't install the middleware on the Hanami
app when AppSignal is not active.
@tombruijn tombruijn merged commit 519b4f4 into main Jun 26, 2024
16 checks passed
@tombruijn tombruijn deleted the hanami-refactor branch July 10, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants