How to setup Application Insights for Azure Cognitive Service Container (OCR Read)?

Yutaro Inoue 0 Reputation points
2023-01-15T04:33:20.7033333+00:00

Hi Community, 

I'm using Cognitive Service Container (Custom Vision OCR Read Container) and trying to setup Application Insights for it but don't know how.

There's a guide here but here and understand Instrumentation key needs to be set. (Actually linked document in the below doc seems general one so couldn't understand excatly what step I need to take for cognitive service container..)

[https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/computer-vision-resource-container-config?tabs=version-3-2#applicationinsights-setting

I created Application Insights resource on Azure and set its instrumentation key into Docker Run option like below but no telemetory was sent. (No outbound access to Azure is prohibited)

--- Command I tried ---

docker run --rm -it -p 5000:5000 \

--memory 8g --cpus 2 \

mcr.microsoft.com/azure-cognitive-services/vision/read:3.2-model-2022-04-30 \

Eula=accept \

Billing=https://xxxxxxx.cognitiveservices.azure.com/ \

ApiKey=xxxxxx \

InstrumentationKey=xxxxxx \

Could you please let me know exactly what step needs to be taken other than that?

Regards,

Yutaro

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,691 questions
Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
287 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,223 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Roderick Bant 2,041 Reputation points
    2023-01-15T09:17:33.4633333+00:00

    Hi, thanks for your question at Q&A.

    Not being an expert at cognitive services at all I checked the documentation link you supplied and some other sections of the same documentation. In those docs I see it is mentioned "The following table describes the configuration settings supported under the ApplicationInsights section." which kind of leads me to believe the option needs to be declared a little different from you example.

    Some of the configuration settings documented in this section of the docs seem to use a Section:ConfigurationSettting or even a Section:Subsection:ConfigurationSetting format for the settings. For example Storage:DocumentStore;MongoDB

    So i think you should try setting the parameter as ApplicationInsights:InstrumentationKey=<YOURKEY>

    0 comments No comments