App Insights dynamic tracing does not work against Docker Images
Investigative information
This is easy to replicate.
Repro steps
Usually, to enable application insights 3, we need to add the following config ApplicationInsightsAgent_EXTENSION_VERSION=~3. And the dynamic tracing functionality automatically works.
But if the azure function is deployed using the docker image. Then the auto-tracing does not work. To make it work, I have to manually put the agent on the classpath.
Expected behavior
Either one of:
- Adding the flag
ApplicationInsightsAgent_EXTENSION_VERSIONshould make it work for Docker images as well. (Maybe the agent can be part of the parent docker image). - Or explicitly mention in that docs, that this functionality is only limited to
code runtimeand does not work against docker.
Actual behavior
Auto tracing does not work
Known workarounds
Handle it manually. As shown here: https://stackoverflow.com/questions/71085054/java-azure-application-insights-dynamic-tracing-not-working-with-docker-images/71085468
Related information
Provide any related information
- Programming language used: Java
Adding @trask and @MadhuraBharadwaj-MSFT just for awareness.
@purijatin thanks for reporting this issue. We have public review 2 of distributed tracing released now. In public preview 2 this issue is resovled. Thanks.
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.