-
Notifications
You must be signed in to change notification settings - Fork 14
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
Removing ClearProvidersExceptFunctionProviders causes the Application Insights OperationName to change #364
Comments
Caused in v2.4. |
Ok, @pim-simons , I found the reason why this happened. The
This last one was removed by the So, in conclusion, the @fgheysels , some insights from you would be helpful. |
@stijnmoreels that is some great investigation work 👍🏻 |
I was wondering if we can make sure that we re-implement the function to only remove this Application Insights logger provider, instead of the current implementation (which loops and removes something other than default logger providers). Maybe this could be in a different extension method for clearer understanding, but we do, indeed, would require to 'undeprecated' the current Azure Functions package. |
If there is a way to disable this request tracking altering without fully removing the built-in Application Insights tracking (like dependencies and metrics), ... maybe that would be cool, but haven't found it yet. |
Adding @fgheysels to this for his insights. |
I find it strange that, by specifying the See also #336 I think the best thing to do, is to provide an extension method with a name which clearly reveals its intention, which would only be used in http triggered Azure Functions then I guess. For instance:
or something. I think it is important that the name guides users to only use this in a specific case, and not by default for all Azure Functions. I'm also wondering what other side-effects removing the AppInsights provider might cause. |
The request telemetry was written by our own
We will use request tracking for non-HTTP functions as well, like Azure Service Bus triggered functions. We will use a different logging extension of course ( |
As far as I know, when you configure Application Insights in an Azure Function, and your Function uses a ServiceBus trigger, this request-logging is already build in in App Insights. So I wonder why would we use Arcus for that ? |
Because the Arcus variant makes sure that we can log the dependency ID from the previous call in our request telemetry tracking, and so, make sure that the service-to-service correlation is streamlined. |
We could add a new extension (in the like of |
So if I understand correctly, it will only be a change in the name of the extension to make it more clear what it does? The actual functionality will stay the same? |
Yeah, that's right. The implementation will only be more robust and it will be more clear what it does by the name of the extension. 👍 |
I can live with the suggested name, it reveals what it is doing. However, it doesn't communicate on why you want to do it, but that can be handled by documentation. |
We could also create our own We could also add a warning message when the |
Describe the bug
Since the package Arcus.Observability.Telemetry.AzureFunctions has been marked as obsolete I have removed this package from my Azure Function. This meant I had to remove the
ClearProvidersExceptFunctionProviders
functionality from the startup.As a result the OperationName in Application Insights has changed from for example
GET /api/person/12345
to the FunctionName defined in[FunctionName("MyFunction")]
.Even specifying the OperationName to a custom value in the
LogRequest
results in the FunctionName and not the custom value.This means the overview of performance in Application Insights becomes unusable as it only shows the FunctionName instead of the API path.
To Reproduce
Remove
ClearProvidersExceptFunctionProviders
functionality from the startup.Expected behavior
The OperationName stays the same.
Additional context
Latest versions of all the Arcus.Observability packages.
The text was updated successfully, but these errors were encountered: