You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BUG] Http triggered Azure Function throws System.UriFormatException, no support for Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore integration?
#2311
Operating system and version:
At least Windows, but I guess this isn't OS spesific.. .NET Framework/Core name and version
Dotnet 8, Azure Functions
Describe the bug
Using the APM package for a HTTP Triggered Azure Function fails when the Azure Function uses the 'Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore' integration. This integration seems to be the default when creating a HTTP Triggerend function app in Visual Studio as well.
When triggering the function, the APM Middleware throws an System.UriFormatException . The exception is thrown in the method Elastic.Apm.Azure.Functions.ApmMiddleware.GetTriggerSpecificData.
To Reproduce
Steps to reproduce the behavior:
Create HTTP Triggered function app and add the middelware ApmMiddelware
Trigger the Function
Watch it failing...
Expected behavior
The APM integration for Azure Functions should support the default behaviour implemented by Microsofts own templates.
The text was updated successfully, but these errors were encountered:
I'm also experiencing this issue on .NET 8 with 1.28.5 Elastic.Apm.Azure.Functions, so I'm guessing its not going to be fixed soon. I'm surprised more aren't running into this. @oysteinthoensisjord or @SparkenV, did you folks ever find solutions for this? Or do we have to omit APM tracking for HTTP triggers now?
The only way I found to add APM to Http triggered functions was to "downgrade" the function to not use the "Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore"-package. This makes it possible to have APM-tracking. The downside is, of course, that we cannot make use of the functionality provided by the extension package.
Apologies for the delay in getting to this. Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore, in the current implementation, throws an exception when we access the Url property, which is surprising. We need to rely on different implementation details to access the URL for instrumentation. I will be working on this soon.
APM Agent version
Elastic.Apm.Azure.Functions version 1.26.0
Environment
Operating system and version:
At least Windows, but I guess this isn't OS spesific..
.NET Framework/Core name and version
Dotnet 8, Azure Functions
Describe the bug
Using the APM package for a HTTP Triggered Azure Function fails when the Azure Function uses the 'Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore' integration. This integration seems to be the default when creating a HTTP Triggerend function app in Visual Studio as well.
When triggering the function, the APM Middleware throws an
System.UriFormatException
. The exception is thrown in the methodElastic.Apm.Azure.Functions.ApmMiddleware.GetTriggerSpecificData
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The APM integration for Azure Functions should support the default behaviour implemented by Microsofts own templates.
The text was updated successfully, but these errors were encountered: