-
Notifications
You must be signed in to change notification settings - Fork 357
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
Is there a way to intercept function invocation? #734
Comments
Any response, please? |
I'm not sure if we have pre/post hooks for invocations. Mathew should be able to answer that. This might turn into a feature request. |
Having such hooks would greatly improve the SDK in my opinion, also help us (at MPSIT Engineering), to have better logging at least. |
Is the existing logging mechanism insufficient in some way? Is there something we could do to make it better? |
Please send some pointers where to look at? We've tried |
We've got the |
Yes, of course :) Here's the thing (it's related to #735): we write and then read logs programmatically as part of out end-to-end test. We didn't find another way to keep track which jobs were triggered by which messages. |
We've discussed allowing pre/post hooks before, and I thought we had a feature request logged for it, but I just looked and couldn't find it. I do think that would be a good idea. Not exactly what you're asking for I don't think, but we do log Started/Completed events through our TraceWriter infrastructure. You can add your own TraceWriter instance to the |
Check out my post in this thread #716 If you don't mind getting down and dirty into an IoC-based AOP framework, it'll do ya. |
Is there we can have something like ActionFilters like MVC. We have been using to extend the functionality of API greatly with this. Is that possible |
Intercepting WebJobs would be helpful for incorporating Application Insights. I'm currently creating an operation context in the body of each job in order to correlate the job's telemetry data, but if that context could be created before the WebJob fires and finalized when it ends it would greatly simplify the code inside the job. |
Humble, check out my last post and link - this is exactly what I do to log messages from all functions to an external logging server. |
Telemetry/AI and logging is also what we need the interception for. Looking for an organic, built-in, extensible way to achieve this. |
We're tracking first-class AI integration here: Azure/azure-functions-host#727 |
@brettsam Is that conversation just for Functions or applicable for WebJobs in general? |
I just created a new feature issue to track this. I'll close this one and we can continue any feature discussion there, thanks everyone :) |
Can you please share the link to the new feature |
In the purpose of logging and make it transparent, I'd like to be able to intercept/override the methods before and after function invocation? Is it possible now? if not, is is something you're considering to add?
The text was updated successfully, but these errors were encountered: