Correlation between pageViews and requests (operation_Id) across all sub-request to Web API services

%3CLINGO-SUB%20id%3D%22lingo-sub-330257%22%20slang%3D%22en-US%22%3ECorrelation%20between%20pageViews%20and%20requests%20(operation_Id)%20across%20all%20sub-request%20to%20Web%20API%20services%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-330257%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20an%20angular%20app%20which%20is%20used%20UI%20for%20users%20and%20several%20web%20API%26nbsp%3Bservices%20from%20which%20the%20angular%20app%20gets%20data.%20All%20of%20those%20web%20API%26nbsp%3Bservices%2C%20the%20angular%20is%20included%2C%20send%20information%20into%20the%20same%20application%26nbsp%3Binsights%20(AI).%20We%20are%20trying%26nbsp%3Bto%20correlate%20requests%20and%20page%20views%20between%20angular%20app%20and%20web%20API%20services.%20Do%20to%20so%2C%20we%20used%20documentation%20on%20Microsoft%26nbsp%3Bdocs%20site%20and%20did%20as%20it%20said%20but%20without%20any%20success.%3C%2FP%3E%3CP%3EThe%20issue%20comes%20when%20we%20try%20to%20unite%20request%20and%20pageviews%20tables%20in%20AI.%20We%20can%20not%20unite%20those%20because%20of%20operation_Id%20and%20operation_ParentId%20containment.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%20(how%20it%20works%20now)%3A%3C%2FP%3E%3CP%3E1.%20We%20are%20on%20some%20page%2C%20on%20that%20page%20we%20call%20ai.trackPageView()%26nbsp%3B(info%20appears%20on%20AI)%3C%2FP%3E%3CP%3EpageViews%20(table)%20contains%20-%26gt%3B%20operation_Id%20%3D%3D%26nbsp%3B%20tPn1I%3C%2FP%3E%3CP%3E2.%20From%20that%20page%2C%20we%20call%20web%20API%20service%20method%20(in%20cookies%20we%20have%20ai_user%20and%20ai_session)%3C%2FP%3E%3CP%3E3.%20On%20the%20server%20side%20(info%20sent%20to%20AI%20where%20ai_user%20and%20ai_session%20got%20from%20cookies%20as%20expected)%20and%20%26nbsp%3B%3C%2FP%3E%3CP%3Erequests%20(table)%20-%26gt%3B%20operation_Id%20%3D%3D%20operation_ParentId%20%3D%3D%20552e023f7f66e74aa19b0029c477d95e%3C%2FP%3E%3CP%3Ebut%20we%20expected%20(at%20least%20one%20operation_Id%20or%20operation_ParentId%20to%20be%20%3D%3D%26nbsp%3B%20tPn1I)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20set%20up%20application%20insights%20and%20to%20enable%20to%20use%20correlation%20we%20used%20documentation%20links%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fapp%2Fasp-net%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fapp%2Fasp-net%3C%2FA%3E%3CBR%20%2F%3Eand%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-US%2Fazure%2Fazure-monitor%2Fapp%2Fcorrelation%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-US%2Fazure%2Fazure-monitor%2Fapp%2Fcorrelation%3C%2FA%3E%3C%2FP%3E%3CP%3E---%3C%2FP%3E%3CP%3EHas%20somebody%20faced%20this%20issue%20and%20has%20it%20have%20some%20workaround%20or%20maybe%20the%20exact%20path%20to%20solving%20that%20issue%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

We have an angular app which is used UI for users and several web API services from which the angular app gets data. All of those web API services, the angular is included, send information into the same application insights (AI). We are trying to correlate requests and page views between angular app and web API services. Do to so, we used documentation on Microsoft docs site and did as it said but without any success.

The issue comes when we try to unite request and pageviews tables in AI. We can not unite those because of operation_Id and operation_ParentId containment. 

 

For example (how it works now):

1. We are on some page, on that page we call ai.trackPageView() (info appears on AI)

pageViews (table) contains -> operation_Id ==  tPn1I

2. From that page, we call web API service method (in cookies we have ai_user and ai_session)

3. On the server side (info sent to AI where ai_user and ai_session got from cookies as expected) and  

requests (table) -> operation_Id == operation_ParentId == 552e023f7f66e74aa19b0029c477d95e

but we expected (at least one operation_Id or operation_ParentId to be ==  tPn1I)

 

To set up application insights and to enable to use correlation we used documentation links:

https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net
and
https://docs.microsoft.com/en-US/azure/azure-monitor/app/correlation

---

Has somebody faced this issue and has it have some workaround or maybe the exact path to solving that issue?

0 Replies