add middleware enter/exit/finish instrumentations to hono
What does this PR do?
This PR adds middleware enter, exit, and finish instrumentations to the Hono plugin. These new instrumentations allow better tracking and visibility into the middleware lifecycle within Hono applications by separately marking when middleware is entered, exited, and completely finished. This improves the granularity of trace data and helps diagnose middleware-related performance issues.
Motivation
The current integration with Hono does not provide detailed visibility into middleware execution. By instrumenting middleware entry, exit, and finish points, users will be able to better observe and debug middleware performance and behavior, which is particularly useful in complex request handling flows or when diagnosing slow middleware execution.
Plugin Checklist
- [ ] Unit tests.
- [x] Integration tests.
- [ ] Benchmarks.
- [ ] TypeScript definitions.
- [ ] TypeScript tests.
- [ ] API documentation.
- [ ] CI jobs/workflows.
Additional Notes
@longlho thank you for your contribution, it is strongly appreciated! I am going to see that someone looks into it sometime soon, while I can't give any concrete time for that right now.
Thank you!!
@BridgeAR gentle ping :)