Skip to content
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

Multiple issues when upgrading exception handling code to v2 #2118

Open
ThomasArdal opened this issue Feb 8, 2019 · 7 comments
Open

Multiple issues when upgrading exception handling code to v2 #2118

ThomasArdal opened this issue Feb 8, 2019 · 7 comments
Milestone

Comments

@ThomasArdal
Copy link

I'm trying to upgrade Elmah.Io.Functions to support Azure Functions v2. In that context, I have a couple of questions for the new way of developing filters and logging, that I feel are lacking good answers on the official documentation.

  1. FunctionExceptionFilterAttribute and FunctionExceptionContext are marked as Obsolete. What is the alternative to exception filters?
  2. Previously, I could resolve setting names by doing something like this:
var resolver = new DefaultNameResolver();
var connection = resolver.ResolveWholeString("%connection%");

This is no longer possible, since DefaultNameResolver requires an IConfiguration. I can see why it require that, but I don't have a reference to IConfiguration inside a FunctionExceptionFilterAttribute subclass.

I could start doing something like this:

var configurationBuilder = new ConfigurationBuilder();
...
var config = configurationBuilder.Build();

But I don't know how users are structuring and naming their config files inside the filter.

@fabiocav
Copy link
Member

Unfortunately, this feature didn't quite get as polished up as we had hoped for the 3.x release.

Adding @mathewc as he can provide more details.

@ThomasArdal
Copy link
Author

Any news on this one?

@ThomasArdal
Copy link
Author

@mathewc Would really love some input on this one.

@ThomasArdal
Copy link
Author

@fabiocav Do you know anyone else who could input on this?

@sierrapeaks
Copy link

@mathewc @fabiocav any status update on this one? thank you

@rasmuschristensen
Copy link

Will it get into the new Extensions where we also have DI? Any new status @fabiocav ?

@fabiocav
Copy link
Member

fabiocav commented May 9, 2019

Apologies about the lack of response here.

Unfortunately, there hasn't been any work done on filters since our last update. There are a couple of approaches that could potentially work, but that set of APIs is not currently stable, and adopting them would be problematic as it could en up leading to customers impacted by a service upgrade.

Adding @mathewc here in case he has anything else to share.

@fabiocav fabiocav added this to the Triaged milestone May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants