Hi @Kumar ,
Based on my understanding of the scenario, I did some test and here are my suggestions/findings.
You are right. These values are auto-generated by the ApplicationInsight SDK ( *ifAppInsights is enabled for the deployed app service, AND they are not supplied in request header *). Refer to this link for detail.
When the Web Service is called from APIM, these values are passed as header along with the request. Please ensure that the following is enabled:
1. In APIM --> select your API --> Settings. Please ensure that the following settings are available, as shown in screenshot below:
Note that: Application Insights is transitioning to W3C Trace-Context, and newer version of AppInsights SDK already has this mode enabled. For more information, refer Correlation headers using W3C TraceContext
2. As a test, you may use the "Test" feature in APIM to send a request to backend API and note the headers being sent. This information will be available in "Trace" under "Test". The header traceparent
is sent along with the request which contains the operation_id
. In App service this operation_id
along with the parent_id is logged
. Even if you are using separate ApplicationInsights resource for logging with APIM and App Service, the operation_id
remains the same.
Hope it helps. In case this does not answer your question, can you please share more details with screenshots to help us better understand the scenario.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.