I’m using the preview for NServiceBus with Azure Functions.
I want to use some custom metrics with Application Insights.
This website states that if you want to use Azure Functions with Application Insights, you shouldn’t use AddApplicationInsightsTelemetry(), which is available from the ApplicationInsights package. Instead, Azure Functions will inject TelemetryConfiguration. You can create your own TelemetryClient from there.
However, when using NServiceBus preview with Azure Functions, your classes will be static. As the function endpoint is static as well.
I’m not able to inject the TelemetryConfiguration now, is there a workaround for this?
As stated, all I want to do is track some Application Insights metrics.