Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.92k stars 441 forks source link

`APPINSIGHTS_INSTRUMENTATIONKEY` interfers with multi-dimensional telemetry #7507

Open tomkerkhove opened 3 years ago

tomkerkhove commented 3 years ago

Check for a solution in the Azure portal

For issues in production, please check for a solution to common issues in the Azure portal before opening a bug. In the Azure portal, navigate to your function app, select Diagnose and solve problems from the left, and view relevant dashboards before opening your issue.

Investigative information

Please provide the following:

Repro steps

Provide the steps required to reproduce the problem:

I have deployed the same application on 2 Function Apps:

  1. Deploy Function App
  2. Configure Application Insights key
  3. Call endpoint
  4. Write metric with multiple dimensions (through Arcus Observability, not the built-in LogMetric extension, see https://github.com/tomkerkhove/azure-autoscaling-toolbox/blob/main/samples/autoscaling-over-time-dashboard/src/AzureAutoscalingToolbox.Samples.StatefulAppInstances/Entities/ApplicationEntity.cs#L71)

Expected behavior

Provide consistent telemetry

Actual behavior

Custom dimensions are ommitted through some voodoo.

image

Known workarounds

Use another configuration key than APPINSIGHTS_INSTRUMENTATIONKEY.

Related information

Provide any related information

v-bbalaiagar commented 3 years ago

Hi @tomkerkhove, Thank you for reaching out to us, checking this internally for the possibilities. We will update you with any information found.

v-bbalaiagar commented 3 years ago

Hi @tomkerkhove, We see that both app settings APPLICATIONINSIGHTS_CONNECTION_STRING and APPINSIGHTS_INSTRUMENTATIONKEY are being used with your app. In this scenario the connection string will take precedence and as discussed at APPLICATIONINSIGHTS_CONNECTION_STRING it will send the data to the endpoints from the connection string. If this is not the expected behavior for your custom container, please configure WEBSITES_ENABLE_APP_SERVICE_STORAGE to false in app settings. Please go through the document here for more information- https://docs.microsoft.com/en-us/azure/app-service/faq-app-service-linux#custom-containers

Let us know if you are able to solve with this information.

tomkerkhove commented 3 years ago

Thanks for checking, but the problem is not that it's sending it to the wrong Application Insights instance but rather that it removes information from the telemetry as per the image above.

v-bbalaiagar commented 3 years ago

Hi @tomkerkhove , Thank you for your feedback! We will investigate this further and update as appropriate.

tomkerkhove commented 3 years ago

Any update on this @v-bbalaiagar?

v-bbalaiagar commented 3 years ago

Tagging @brettsam for further investigation.

tomkerkhove commented 3 years ago

Any update on this?

tomkerkhove commented 3 years ago

Is there a reason why people were unassigned @fabiocav?