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
Is your question related to a specific version? If so, please specify:
Azure Functions v2
What language does your question apply to? (e.g. C#, JavaScript, Java, All)
.NET Core 3.1
Question
I would like to instrument my function using an Application Insights SDK and make calls to TrackRequest and TrackDependency as I see fit. Currently my example here would be track calls to CosmosDb since it appears that CosmosDb isn't an autotracked dependency in Functions even thought it is in App Service (Gateway Mode at least).
See here -> https://docs.microsoft.com/en-us/azure/azure-monitor/app/azure-functions-supported-features#supported-features
I am having trouble figuring out which NuGet to use and how to properly leverage the SDK. The documentation related to Application Insight + Azure Functions isn't super clear. I'm currently trying to follow this article (https://docs.microsoft.com/en-us/azure/azure-monitor/app/azure-functions-supported-features#sampling) which instructs me to inject an instance of TelemetryConfiguration into my Function class so as to ensure my TelemetryClient uses the same configuration as the Functions App itself otherwise I "may experience strange behavior if your sampling configuration is different than the Functions' sampling configuration".
The article doesn't explain which Nuget to use or how to configure dependency injection of the TelemetryConfiguration.
At this point, no matter what I do I end up with the following error:
Microsoft.Extensions.DependencyInjection.Abstractions: Unable to resolve service for type 'Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration' while attempting to activate 'FunctionApp.ExampleLoggingTimerFunction'.
Need assist
The text was updated successfully, but these errors were encountered:
ForteUnited
changed the title
Using TelemtryConfiguration and TelemtryClient in Azure Functions v2+
Using TelemetryConfiguration and TelemetryClient in Azure Functions v2+
Nov 12, 2021
Hi @ForteUnited, Thank you for your feedback! As mentioned in comment here #3741 (comment), setting the value to some dummy string (like "abc") will cause the TelemetryConfiguration to be registered.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Is your question related to a specific version? If so, please specify:
Azure Functions v2
What language does your question apply to? (e.g. C#, JavaScript, Java, All)
.NET Core 3.1
Question
I would like to instrument my function using an Application Insights SDK and make calls to TrackRequest and TrackDependency as I see fit. Currently my example here would be track calls to CosmosDb since it appears that CosmosDb isn't an autotracked dependency in Functions even thought it is in App Service (Gateway Mode at least).
See here -> https://docs.microsoft.com/en-us/azure/azure-monitor/app/azure-functions-supported-features#supported-features
I am having trouble figuring out which NuGet to use and how to properly leverage the SDK. The documentation related to Application Insight + Azure Functions isn't super clear. I'm currently trying to follow this article (https://docs.microsoft.com/en-us/azure/azure-monitor/app/azure-functions-supported-features#sampling) which instructs me to inject an instance of TelemetryConfiguration into my Function class so as to ensure my TelemetryClient uses the same configuration as the Functions App itself otherwise I "may experience strange behavior if your sampling configuration is different than the Functions' sampling configuration".
The article doesn't explain which Nuget to use or how to configure dependency injection of the TelemetryConfiguration.
At this point, no matter what I do I end up with the following error:
Microsoft.Extensions.DependencyInjection.Abstractions: Unable to resolve service for type 'Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration' while attempting to activate 'FunctionApp.ExampleLoggingTimerFunction'.
Need assist
The text was updated successfully, but these errors were encountered: