-
Notifications
You must be signed in to change notification settings - Fork 116
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
Replace Hanami monkeypatch with middleware #911
Comments
Looked into subscribing to Dry Monitor events for Rack, as mentioned here. This is not useful, because it doesn't include any route information (or in Hanami here. Request instrumentation is better done with our Rack EventHandler or a subclass of AbstractMiddleware. |
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
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
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
Asked for more insights on the Hanami discourse |
Tracking issue for the change to report the action name in the request env in the Hanami project: hanami/controller#445 |
PR merged in the Hanami project. We can pick this up. Maybe wait until it's released so we can test it in a real app. |
Remove the need for the monkeypatch in the Hanami loader and fetch the Hanami action instance from the request env to determine the action name. I'll remove the monkeypatch in the next commit. This only works on Hanami 2.2 and newer. Part of #911
In the previous commit we started reading the action name from the Hanami Action instance on the request env. Disable the monkeypatch on Hanami 2.2+ so it's not doing the same thing twice. We'll leave the monkeypatch for now, but eventually we should be able to remove it. Like on the next major Hanami version or after some years. Part of #911
Remove the need for the monkeypatch in the Hanami loader and fetch the Hanami action instance from the request env to determine the action name. I'll remove the monkeypatch in the next commit. This only works on Hanami 2.2 and newer. Part of #911
In the previous commit we started reading the action name from the Hanami Action instance on the request env. Disable the monkeypatch on Hanami 2.2+ so it's not doing the same thing twice. We'll leave the monkeypatch for now, but eventually we should be able to remove it. Like on the next major Hanami version or after some years. Part of #911
Remove the need for the monkeypatch in the Hanami loader and fetch the Hanami action instance from the request env to determine the action name. I'll remove the monkeypatch in the next commit. This only works on Hanami 2.2 and newer. Part of #911
In the previous commit we started reading the action name from the Hanami Action instance on the request env. Disable the monkeypatch on Hanami 2.2+ so it's not doing the same thing twice. We'll leave the monkeypatch for now, but eventually we should be able to remove it. Like on the next major Hanami version or after some years. Part of #911
TODO
The text was updated successfully, but these errors were encountered: