dry-rb / dry-effects

Algebraic effects in Ruby
https://dry-rb.org/gems/dry-effects/
MIT License
112 stars 20 forks source link

Messy data in profilers (New Relic, etc.) #79

Open vladislav-yashin opened 4 years ago

vladislav-yashin commented 4 years ago

Describe the bug

Code wrapped by effect handler is not analyzed by profilers (such as New Relic and Skylight) properly (e.g. no sql queries data when wrapped in rails controller and complete mess when wrapped with middleware)

To Reproduce

Wrap code by effect handler and introduce some profiler in the app.

Expected behavior

Code is profiled as usual.

Your environment

I'm not sure whether it's new relic/skylight problem or dry's, but hope to get some hint at least.

flash-gordon commented 4 years ago

Hm, it's not a bug, every piece of code relying on Thread.current will need some sort of interoperability with dry-effects. I'll take a look at these libraries for more information.