autofac / Autofac.Extras.DynamicProxy

Interceptor and decorator support for Autofac IoC via Castle DynamicProxy
MIT License
106 stars 33 forks source link

How to register target instance with interceptors #17

Closed mwpowellhtx closed 7 years ago

mwpowellhtx commented 7 years ago

Hello,

Okay, so I register my IInterceptor with the container builder. However, InterceptedBy does not want provide any sort of context, nor does it seem to want any types in terms of IInterceptor.

Further, InterceptedBy seems to want Services, Types, or names; not sure how that aligns to my IInterceptor. Or perhaps I've got the wrong extension method in mind here...

Thanks...

tillig commented 7 years ago

Have you read the docs?

Also, usage questions ("How do I...?") are great candidates for StackOverflow rather than issues. We monitor both spots, but you have a lot more people who can get you help faster on SO.

mwpowellhtx commented 7 years ago

Thanks for the feedback. I reviewed the docs you provided, as far as I know I am registering with Autofac in the expected manner. However, the instrumentation dots do not seem to be connecting properly.

FWIW, I posted on SO.

Or if there's a better performance monitoring instrumentation choice, I'm open to that as well.

Thanks!

mwpowellhtx commented 7 years ago

Been chewing on this, and it just doesn't make sense to me. What's the point of identifying an interceptor for whichever classes need to be instrumented if I've still got to "install" a Perf runtime? It just seems to me that something isn't being initialize quite right, but either DynamicProxy and/or PerfIt; which is the blurred distinction for me at the moment. Just looking for some clarity.

tillig commented 7 years ago

Any follow up here will be on SO. If you have additional things you have tried that will help answer the question, update the question on SO. That will help everyone looking at the question understand what you've tried and what's not working.